diff --git a/sdk/compute/azure-mgmt-compute/_meta.json b/sdk/compute/azure-mgmt-compute/_meta.json index 687eb3719284c..ebba573aadcf9 100644 --- a/sdk/compute/azure-mgmt-compute/_meta.json +++ b/sdk/compute/azure-mgmt-compute/_meta.json @@ -1,12 +1,12 @@ { - "commit": "3d87a71fb30062a70d5adf9cd7653639f00c3b92", + "commit": "7ad8b8cc3bcd39fdf44425c4191d705932aba68a", "repository_url": "https://github.com/Azure/azure-rest-api-specs", "autorest": "3.10.2", "use": [ - "@autorest/python@6.17.0", + "@autorest/python@6.26.4", "@autorest/modelerfour@4.27.0" ], - "autorest_command": "autorest specification/compute/resource-manager/readme.md --generate-sample=True --generate-test=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --use=@autorest/python@6.17.0 --use=@autorest/modelerfour@4.27.0 --version=3.10.2 --version-tolerant=False", + "autorest_command": "autorest specification/compute/resource-manager/readme.md --generate-sample=True --generate-test=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-python/sdk --use=@autorest/python@6.26.4 --use=@autorest/modelerfour@4.27.0 --version=3.10.2 --version-tolerant=False", "readme": "specification/compute/resource-manager/readme.md", "package-2024-03-02-only": "2024-07-16 12:23:13 -0400 602fb5144a226577186e35845422c11db9067cf8 Microsoft.Compute/DiskRP/stable/2024-03-02/snapshot.json", "package-2024-03-01-only": "2024-06-05 15:03:47 -0700 491e00d17f24909ecf5e1030b3833bed51224e92 Microsoft.Compute/ComputeRP/stable/2024-03-01/virtualMachineScaleSet.json", diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/_serialization.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/_serialization.py index 59f1fcf71bc97..dc8692e6ec0f9 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/_serialization.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/_serialization.py @@ -24,7 +24,6 @@ # # -------------------------------------------------------------------------- -# pylint: skip-file # pyright: reportUnnecessaryTypeIgnoreComment=false from base64 import b64decode, b64encode @@ -52,7 +51,6 @@ MutableMapping, Type, List, - Mapping, ) try: @@ -91,6 +89,8 @@ def deserialize_from_text(cls, data: Optional[Union[AnyStr, IO]], content_type: :param data: Input, could be bytes or stream (will be decoded with UTF8) or text :type data: str or bytes or IO :param str content_type: The content type. + :return: The deserialized data. + :rtype: object """ if hasattr(data, "read"): # Assume a stream @@ -112,7 +112,7 @@ def deserialize_from_text(cls, data: Optional[Union[AnyStr, IO]], content_type: try: return json.loads(data_as_str) except ValueError as err: - raise DeserializationError("JSON is invalid: {}".format(err), err) + raise DeserializationError("JSON is invalid: {}".format(err), err) from err elif "xml" in (content_type or []): try: @@ -155,6 +155,11 @@ def deserialize_from_http_generics(cls, body_bytes: Optional[Union[AnyStr, IO]], Use bytes and headers to NOT use any requests/aiohttp or whatever specific implementation. Headers will tested for "content-type" + + :param bytes body_bytes: The body of the response. + :param dict headers: The headers of the response. + :returns: The deserialized data. + :rtype: object """ # Try to use content-type from headers if available content_type = None @@ -184,15 +189,30 @@ class UTC(datetime.tzinfo): """Time Zone info for handling UTC""" def utcoffset(self, dt): - """UTF offset for UTC is 0.""" + """UTF offset for UTC is 0. + + :param datetime.datetime dt: The datetime + :returns: The offset + :rtype: datetime.timedelta + """ return datetime.timedelta(0) def tzname(self, dt): - """Timestamp representation.""" + """Timestamp representation. + + :param datetime.datetime dt: The datetime + :returns: The timestamp representation + :rtype: str + """ return "Z" def dst(self, dt): - """No daylight saving for UTC.""" + """No daylight saving for UTC. + + :param datetime.datetime dt: The datetime + :returns: The daylight saving time + :rtype: datetime.timedelta + """ return datetime.timedelta(hours=1) @@ -206,7 +226,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): @@ -235,24 +255,26 @@ def __getinitargs__(self): _FLATTEN = re.compile(r"(? None: self.additional_properties: Optional[Dict[str, Any]] = {} - for k in kwargs: + for k in kwargs: # pylint: disable=consider-using-dict-items if k not in self._attribute_map: _LOGGER.warning("%s is not a known attribute of class %s and will be ignored", k, self.__class__) elif k in self._validation and self._validation[k].get("readonly", False): @@ -300,13 +329,23 @@ def __init__(self, **kwargs: Any) -> None: setattr(self, k, kwargs[k]) def __eq__(self, other: Any) -> bool: - """Compare objects by comparing all attributes.""" + """Compare objects by comparing all attributes. + + :param object other: The object to compare + :returns: True if objects are equal + :rtype: bool + """ if isinstance(other, self.__class__): return self.__dict__ == other.__dict__ return False def __ne__(self, other: Any) -> bool: - """Compare objects by comparing all attributes.""" + """Compare objects by comparing all attributes. + + :param object other: The object to compare + :returns: True if objects are not equal + :rtype: bool + """ return not self.__eq__(other) def __str__(self) -> str: @@ -326,7 +365,11 @@ def is_xml_model(cls) -> bool: @classmethod def _create_xml_node(cls): - """Create XML node.""" + """Create XML node. + + :returns: The XML node + :rtype: xml.etree.ElementTree.Element + """ try: xml_map = cls._xml_map # type: ignore except AttributeError: @@ -346,14 +389,14 @@ def serialize(self, keep_readonly: bool = False, **kwargs: Any) -> JSON: :rtype: dict """ serializer = Serializer(self._infer_class_models()) - return serializer._serialize(self, keep_readonly=keep_readonly, **kwargs) # type: ignore + return serializer._serialize( # type: ignore # pylint: disable=protected-access + self, keep_readonly=keep_readonly, **kwargs + ) def as_dict( self, keep_readonly: bool = True, - key_transformer: Callable[ - [str, Dict[str, Any], Any], Any - ] = attribute_transformer, + key_transformer: Callable[[str, Dict[str, Any], Any], Any] = attribute_transformer, **kwargs: Any ) -> JSON: """Return a dict that can be serialized using json.dump. @@ -382,12 +425,15 @@ def my_key_transformer(key, attr_desc, value): If you want XML serialization, you can pass the kwargs is_xml=True. + :param bool keep_readonly: If you want to serialize the readonly attributes :param function key_transformer: A key transformer function. :returns: A dict JSON compatible object :rtype: dict """ serializer = Serializer(self._infer_class_models()) - return serializer._serialize(self, key_transformer=key_transformer, keep_readonly=keep_readonly, **kwargs) # type: ignore + return serializer._serialize( # type: ignore # pylint: disable=protected-access + self, key_transformer=key_transformer, keep_readonly=keep_readonly, **kwargs + ) @classmethod def _infer_class_models(cls): @@ -397,7 +443,7 @@ def _infer_class_models(cls): client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} if cls.__name__ not in client_models: raise ValueError("Not Autorest generated code") - except Exception: + except Exception: # pylint: disable=broad-exception-caught # Assume it's not Autorest generated (tests?). Add ourselves as dependencies. client_models = {cls.__name__: cls} return client_models @@ -410,6 +456,7 @@ def deserialize(cls: Type[ModelType], data: Any, content_type: Optional[str] = N :param str content_type: JSON by default, set application/xml if XML. :returns: An instance of this model :raises: DeserializationError if something went wrong + :rtype: ModelType """ deserializer = Deserializer(cls._infer_class_models()) return deserializer(cls.__name__, data, content_type=content_type) # type: ignore @@ -428,9 +475,11 @@ def from_dict( and last_rest_key_case_insensitive_extractor) :param dict data: A dict using RestAPI structure + :param function key_extractors: A key extractor function. :param str content_type: JSON by default, set application/xml if XML. :returns: An instance of this model :raises: DeserializationError if something went wrong + :rtype: ModelType """ deserializer = Deserializer(cls._infer_class_models()) deserializer.key_extractors = ( # type: ignore @@ -450,21 +499,25 @@ def _flatten_subtype(cls, key, objects): return {} result = dict(cls._subtype_map[key]) for valuetype in cls._subtype_map[key].values(): - result.update(objects[valuetype]._flatten_subtype(key, objects)) + result.update(objects[valuetype]._flatten_subtype(key, objects)) # pylint: disable=protected-access return result @classmethod 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 + :returns: The class to be used + :rtype: class """ for subtype_key in cls.__dict__.get("_subtype_map", {}).keys(): subtype_value = None 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: @@ -503,11 +556,13 @@ def _decode_attribute_map_key(key): inside the received data. :param str key: A key string from the generated code + :returns: The decoded key + :rtype: str """ return key.replace("\\.", ".") -class Serializer(object): +class Serializer(object): # pylint: disable=too-many-public-methods """Request object model serializer.""" basic_types = {str: "str", int: "int", bool: "bool", float: "float"} @@ -542,7 +597,7 @@ class Serializer(object): "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, @@ -562,13 +617,16 @@ def __init__(self, classes: Optional[Mapping[str, type]]=None): self.key_transformer = full_restapi_key_transformer self.client_side_validation = True - def _serialize(self, target_obj, data_type=None, **kwargs): + def _serialize( # pylint: disable=too-many-nested-blocks, too-many-branches, too-many-statements, too-many-locals + self, target_obj, data_type=None, **kwargs + ): """Serialize data into a string according to type. - :param target_obj: The data to be serialized. + :param object target_obj: The data to be serialized. :param str data_type: The type to be serialized from. :rtype: str, dict :raises: SerializationError if serialization fails. + :returns: The serialized data. """ key_transformer = kwargs.get("key_transformer", self.key_transformer) keep_readonly = kwargs.get("keep_readonly", False) @@ -594,12 +652,14 @@ def _serialize(self, target_obj, data_type=None, **kwargs): serialized = {} if is_xml_model_serialization: - serialized = target_obj._create_xml_node() + serialized = target_obj._create_xml_node() # pylint: disable=protected-access try: - attributes = target_obj._attribute_map + attributes = target_obj._attribute_map # pylint: disable=protected-access for attr, attr_desc in attributes.items(): attr_name = attr - if not keep_readonly and target_obj._validation.get(attr_name, {}).get("readonly", False): + if not keep_readonly and target_obj._validation.get( # pylint: disable=protected-access + attr_name, {} + ).get("readonly", False): continue if attr_name == "additional_properties" and attr_desc["key"] == "": @@ -635,7 +695,8 @@ def _serialize(self, target_obj, data_type=None, **kwargs): if isinstance(new_attr, list): serialized.extend(new_attr) # type: ignore elif isinstance(new_attr, ET.Element): - # If the down XML has no XML/Name, we MUST replace the tag with the local tag. But keeping the namespaces. + # If the down XML has no XML/Name, + # we MUST replace the tag with the local tag. But keeping the namespaces. if "name" not in getattr(orig_attr, "_xml_map", {}): splitted_tag = new_attr.tag.split("}") if len(splitted_tag) == 2: # Namespace @@ -666,17 +727,17 @@ def _serialize(self, target_obj, data_type=None, **kwargs): except (AttributeError, KeyError, TypeError) as err: msg = "Attribute {} in object {} cannot be serialized.\n{}".format(attr_name, class_name, str(target_obj)) raise SerializationError(msg) from err - else: - return serialized + return serialized def body(self, data, data_type, **kwargs): """Serialize data intended for a request body. - :param data: The data to be serialized. + :param object data: The data to be serialized. :param str data_type: The type to be serialized from. :rtype: dict :raises: SerializationError if serialization fails. :raises: ValueError if data is None + :returns: The serialized request body """ # Just in case this is a dict @@ -705,7 +766,7 @@ def body(self, data, data_type, **kwargs): attribute_key_case_insensitive_extractor, last_rest_key_case_insensitive_extractor, ] - data = deserializer._deserialize(data_type, data) + data = deserializer._deserialize(data_type, data) # pylint: disable=protected-access except DeserializationError as err: raise SerializationError("Unable to build a model: " + str(err)) from err @@ -714,9 +775,11 @@ def body(self, data, data_type, **kwargs): def url(self, name, data, data_type, **kwargs): """Serialize data intended for a URL path. - :param data: The data to be serialized. + :param str name: The name of the URL path parameter. + :param object data: The data to be serialized. :param str data_type: The type to be serialized from. :rtype: str + :returns: The serialized URL path :raises: TypeError if serialization fails. :raises: ValueError if data is None """ @@ -730,27 +793,26 @@ def url(self, name, data, data_type, **kwargs): output = output.replace("{", quote("{")).replace("}", quote("}")) else: output = quote(str(output), safe="") - except SerializationError: - raise TypeError("{} must be type {}.".format(name, data_type)) - else: - return output + except SerializationError as exc: + raise TypeError("{} must be type {}.".format(name, data_type)) from exc + return output def query(self, name, data, data_type, **kwargs): """Serialize data intended for a URL query. - :param data: The data to be serialized. + :param str name: The name of the query parameter. + :param object data: The data to be serialized. :param str data_type: The type to be serialized from. - :keyword bool skip_quote: Whether to skip quote the serialized result. - Defaults to False. :rtype: str, list :raises: TypeError if serialization fails. :raises: ValueError if data is None + :returns: The serialized query parameter """ try: # Treat the list aside, since we don't want to encode the div separator if data_type.startswith("["): internal_data_type = data_type[1:-1] - do_quote = not kwargs.get('skip_quote', False) + do_quote = not kwargs.get("skip_quote", False) return self.serialize_iter(data, internal_data_type, do_quote=do_quote, **kwargs) # Not a list, regular serialization @@ -761,19 +823,20 @@ def query(self, name, data, data_type, **kwargs): output = str(output) else: output = quote(str(output), safe="") - except SerializationError: - raise TypeError("{} must be type {}.".format(name, data_type)) - else: - return str(output) + except SerializationError as exc: + raise TypeError("{} must be type {}.".format(name, data_type)) from exc + return str(output) def header(self, name, data, data_type, **kwargs): """Serialize data intended for a request header. - :param data: The data to be serialized. + :param str name: The name of the header. + :param object data: The data to be serialized. :param str data_type: The type to be serialized from. :rtype: str :raises: TypeError if serialization fails. :raises: ValueError if data is None + :returns: The serialized header """ try: if data_type in ["[str]"]: @@ -782,21 +845,20 @@ def header(self, name, data, data_type, **kwargs): output = self.serialize_data(data, data_type, **kwargs) if data_type == "bool": output = json.dumps(output) - except SerializationError: - raise TypeError("{} must be type {}.".format(name, data_type)) - else: - return str(output) + except SerializationError as exc: + raise TypeError("{} must be type {}.".format(name, data_type)) from exc + return str(output) def serialize_data(self, data, data_type, **kwargs): """Serialize generic data according to supplied data type. - :param data: The data to be serialized. + :param object data: The data to be serialized. :param str data_type: The type to be serialized from. - :param bool required: Whether it's essential that the data not be - empty or None :raises: AttributeError if required data is None. :raises: ValueError if data is None :raises: SerializationError if serialization fails. + :returns: The serialized data. + :rtype: str, int, float, bool, dict, list """ if data is None: raise ValueError("No value for given attribute") @@ -807,7 +869,7 @@ def serialize_data(self, data, data_type, **kwargs): if data_type in self.basic_types.values(): return self.serialize_basic(data, data_type, **kwargs) - elif data_type in self.serialize_type: + if data_type in self.serialize_type: return self.serialize_type[data_type](data, **kwargs) # If dependencies is empty, try with current data class @@ -823,11 +885,10 @@ def serialize_data(self, data, data_type, **kwargs): except (ValueError, TypeError) as err: msg = "Unable to serialize value: {!r} as type: {!r}." raise SerializationError(msg.format(data, data_type)) from err - else: - return self._serialize(data, **kwargs) + return self._serialize(data, **kwargs) @classmethod - def _get_custom_serializers(cls, data_type, **kwargs): + def _get_custom_serializers(cls, data_type, **kwargs): # pylint: disable=inconsistent-return-statements custom_serializer = kwargs.get("basic_types_serializers", {}).get(data_type) if custom_serializer: return custom_serializer @@ -843,23 +904,26 @@ def serialize_basic(cls, data, data_type, **kwargs): - basic_types_serializers dict[str, callable] : If set, use the callable as serializer - is_xml bool : If set, use xml_basic_types_serializers - :param data: Object to be serialized. + :param obj data: Object to be serialized. :param str data_type: Type of object in the iterable. + :rtype: str, int, float, bool + :return: serialized object """ custom_serializer = cls._get_custom_serializers(data_type, **kwargs) if custom_serializer: return custom_serializer(data) if data_type == "str": return cls.serialize_unicode(data) - return eval(data_type)(data) # nosec + return eval(data_type)(data) # nosec # pylint: disable=eval-used @classmethod def serialize_unicode(cls, data): """Special handling for serializing unicode strings in Py2. Encode to UTF-8 if unicode, otherwise handle as a str. - :param data: Object to be serialized. + :param str data: Object to be serialized. :rtype: str + :return: serialized object """ try: # If I received an enum, return its value return data.value @@ -873,8 +937,7 @@ def serialize_unicode(cls, data): return data except NameError: return str(data) - else: - return str(data) + return str(data) def serialize_iter(self, data, iter_type, div=None, **kwargs): """Serialize iterable. @@ -884,15 +947,13 @@ def serialize_iter(self, data, iter_type, div=None, **kwargs): serialization_ctxt['type'] should be same as data_type. - is_xml bool : If set, serialize as XML - :param list attr: Object to be serialized. + :param list data: Object to be serialized. :param str iter_type: Type of object in the iterable. - :param bool required: Whether the objects in the iterable must - not be None or empty. :param str div: If set, this str will be used to combine the elements in the iterable into a combined string. Default is 'None'. - :keyword bool do_quote: Whether to quote the serialized result of each iterable element. Defaults to False. :rtype: list, str + :return: serialized iterable """ if isinstance(data, str): raise SerializationError("Refuse str type as a valid iter type.") @@ -909,12 +970,8 @@ def serialize_iter(self, data, iter_type, div=None, **kwargs): raise serialized.append(None) - if kwargs.get('do_quote', False): - serialized = [ - '' if s is None else quote(str(s), safe='') - for s - in serialized - ] + if kwargs.get("do_quote", False): + serialized = ["" if s is None else quote(str(s), safe="") for s in serialized] if div: serialized = ["" if s is None else str(s) for s in serialized] @@ -951,9 +1008,8 @@ def serialize_dict(self, attr, dict_type, **kwargs): :param dict attr: Object to be serialized. :param str dict_type: Type of object in the dictionary. - :param bool required: Whether the objects in the dictionary must - not be None or empty. :rtype: dict + :return: serialized dictionary """ serialization_ctxt = kwargs.get("serialization_ctxt", {}) serialized = {} @@ -977,7 +1033,7 @@ def serialize_dict(self, attr, dict_type, **kwargs): return serialized - def serialize_object(self, attr, **kwargs): + def serialize_object(self, attr, **kwargs): # pylint: disable=too-many-return-statements """Serialize a generic object. This will be handled as a dictionary. If object passed in is not a basic type (str, int, float, dict, list) it will simply be @@ -985,6 +1041,7 @@ def serialize_object(self, attr, **kwargs): :param dict attr: Object to be serialized. :rtype: dict or str + :return: serialized object """ if attr is None: return None @@ -1009,7 +1066,7 @@ def serialize_object(self, attr, **kwargs): return self.serialize_decimal(attr) # If it's a model or I know this dependency, serialize as a Model - elif obj_type in self.dependencies.values() or isinstance(attr, Model): + if obj_type in self.dependencies.values() or isinstance(attr, Model): return self._serialize(attr) if obj_type == dict: @@ -1040,56 +1097,61 @@ def serialize_enum(attr, enum_obj=None): try: enum_obj(result) # type: ignore return result - except ValueError: + except ValueError as exc: for enum_value in enum_obj: # type: ignore if enum_value.value.lower() == str(attr).lower(): return enum_value.value error = "{!r} is not valid value for enum {!r}" - raise SerializationError(error.format(attr, enum_obj)) + raise SerializationError(error.format(attr, enum_obj)) from exc @staticmethod - def serialize_bytearray(attr, **kwargs): + def serialize_bytearray(attr, **kwargs): # pylint: disable=unused-argument """Serialize bytearray into base-64 string. - :param attr: Object to be serialized. + :param str attr: Object to be serialized. :rtype: str + :return: serialized base64 """ return b64encode(attr).decode() @staticmethod - def serialize_base64(attr, **kwargs): + def serialize_base64(attr, **kwargs): # pylint: disable=unused-argument """Serialize str into base-64 string. - :param attr: Object to be serialized. + :param str attr: Object to be serialized. :rtype: str + :return: serialized base64 """ encoded = b64encode(attr).decode("ascii") return encoded.strip("=").replace("+", "-").replace("/", "_") @staticmethod - def serialize_decimal(attr, **kwargs): + def serialize_decimal(attr, **kwargs): # pylint: disable=unused-argument """Serialize Decimal object to float. - :param attr: Object to be serialized. + :param decimal attr: Object to be serialized. :rtype: float + :return: serialized decimal """ return float(attr) @staticmethod - def serialize_long(attr, **kwargs): + def serialize_long(attr, **kwargs): # pylint: disable=unused-argument """Serialize long (Py2) or int (Py3). - :param attr: Object to be serialized. + :param int attr: Object to be serialized. :rtype: int/long + :return: serialized long """ return _long_type(attr) @staticmethod - def serialize_date(attr, **kwargs): + def serialize_date(attr, **kwargs): # pylint: disable=unused-argument """Serialize Date object into ISO-8601 formatted string. :param Date attr: Object to be serialized. :rtype: str + :return: serialized date """ if isinstance(attr, str): attr = isodate.parse_date(attr) @@ -1097,11 +1159,12 @@ def serialize_date(attr, **kwargs): return t @staticmethod - def serialize_time(attr, **kwargs): + def serialize_time(attr, **kwargs): # pylint: disable=unused-argument """Serialize Time object into ISO-8601 formatted string. :param datetime.time attr: Object to be serialized. :rtype: str + :return: serialized time """ if isinstance(attr, str): attr = isodate.parse_time(attr) @@ -1111,30 +1174,32 @@ def serialize_time(attr, **kwargs): return t @staticmethod - def serialize_duration(attr, **kwargs): + def serialize_duration(attr, **kwargs): # pylint: disable=unused-argument """Serialize TimeDelta object into ISO-8601 formatted string. :param TimeDelta attr: Object to be serialized. :rtype: str + :return: serialized duration """ if isinstance(attr, str): attr = isodate.parse_duration(attr) return isodate.duration_isoformat(attr) @staticmethod - def serialize_rfc(attr, **kwargs): + def serialize_rfc(attr, **kwargs): # pylint: disable=unused-argument """Serialize Datetime object into RFC-1123 formatted string. :param Datetime attr: Object to be serialized. :rtype: str :raises: TypeError if format invalid. + :return: serialized rfc """ try: if not attr.tzinfo: _LOGGER.warning("Datetime with no tzinfo will be considered UTC.") utc = attr.utctimetuple() - except AttributeError: - raise TypeError("RFC1123 object must be valid Datetime object.") + except AttributeError as exc: + raise TypeError("RFC1123 object must be valid Datetime object.") from exc return "{}, {:02} {} {:04} {:02}:{:02}:{:02} GMT".format( Serializer.days[utc.tm_wday], @@ -1147,12 +1212,13 @@ def serialize_rfc(attr, **kwargs): ) @staticmethod - def serialize_iso(attr, **kwargs): + def serialize_iso(attr, **kwargs): # pylint: disable=unused-argument """Serialize Datetime object into ISO-8601 formatted string. :param Datetime attr: Object to be serialized. :rtype: str :raises: SerializationError if format invalid. + :return: serialized iso """ if isinstance(attr, str): attr = isodate.parse_datetime(attr) @@ -1178,13 +1244,14 @@ def serialize_iso(attr, **kwargs): raise TypeError(msg) from err @staticmethod - def serialize_unix(attr, **kwargs): + def serialize_unix(attr, **kwargs): # pylint: disable=unused-argument """Serialize Datetime object into IntTime format. This is represented as seconds. :param Datetime attr: Object to be serialized. :rtype: int :raises: SerializationError if format invalid + :return: serialied unix """ if isinstance(attr, int): return attr @@ -1192,11 +1259,11 @@ def serialize_unix(attr, **kwargs): if not attr.tzinfo: _LOGGER.warning("Datetime with no tzinfo will be considered UTC.") return int(calendar.timegm(attr.utctimetuple())) - except AttributeError: - raise TypeError("Unix time object must be valid Datetime object.") + except AttributeError as exc: + raise TypeError("Unix time object must be valid Datetime object.") from exc -def rest_key_extractor(attr, attr_desc, data): +def rest_key_extractor(attr, attr_desc, data): # pylint: disable=unused-argument key = attr_desc["key"] working_data = data @@ -1217,7 +1284,9 @@ def rest_key_extractor(attr, attr_desc, data): return working_data.get(key) -def rest_key_case_insensitive_extractor(attr, attr_desc, data): +def rest_key_case_insensitive_extractor( # pylint: disable=unused-argument, inconsistent-return-statements + attr, attr_desc, data +): key = attr_desc["key"] working_data = data @@ -1238,17 +1307,29 @@ def rest_key_case_insensitive_extractor(attr, attr_desc, data): return attribute_key_case_insensitive_extractor(key, None, working_data) -def last_rest_key_extractor(attr, attr_desc, data): - """Extract the attribute in "data" based on the last part of the JSON path key.""" +def last_rest_key_extractor(attr, attr_desc, data): # pylint: disable=unused-argument + """Extract the attribute in "data" based on the last part of the JSON path key. + + :param str attr: The attribute to extract + :param dict attr_desc: The attribute description + :param dict data: The data to extract from + :rtype: object + :returns: The extracted attribute + """ key = attr_desc["key"] dict_keys = _FLATTEN.split(key) return attribute_key_extractor(dict_keys[-1], None, data) -def last_rest_key_case_insensitive_extractor(attr, attr_desc, data): +def last_rest_key_case_insensitive_extractor(attr, attr_desc, data): # pylint: disable=unused-argument """Extract the attribute in "data" based on the last part of the JSON path key. This is the case insensitive version of "last_rest_key_extractor" + :param str attr: The attribute to extract + :param dict attr_desc: The attribute description + :param dict data: The data to extract from + :rtype: object + :returns: The extracted attribute """ key = attr_desc["key"] dict_keys = _FLATTEN.split(key) @@ -1285,7 +1366,7 @@ def _extract_name_from_internal_type(internal_type): return xml_name -def xml_key_extractor(attr, attr_desc, data): +def xml_key_extractor(attr, attr_desc, data): # pylint: disable=unused-argument,too-many-return-statements if isinstance(data, dict): return None @@ -1337,22 +1418,21 @@ def xml_key_extractor(attr, attr_desc, data): if is_iter_type: if is_wrapped: return None # is_wrapped no node, we want None - else: - return [] # not wrapped, assume empty list + return [] # not wrapped, assume empty list return None # Assume it's not there, maybe an optional node. # If is_iter_type and not wrapped, return all found children if is_iter_type: if not is_wrapped: return children - else: # Iter and wrapped, should have found one node only (the wrap one) - if len(children) != 1: - raise DeserializationError( - "Tried to deserialize an array not wrapped, and found several nodes '{}'. Maybe you should declare this array as wrapped?".format( - xml_name - ) + # Iter and wrapped, should have found one node only (the wrap one) + if len(children) != 1: + raise DeserializationError( + "Tried to deserialize an array not wrapped, and found several nodes '{}'. Maybe you should declare this array as wrapped?".format( # pylint: disable=line-too-long + xml_name ) - return list(children[0]) # Might be empty list and that's ok. + ) + return list(children[0]) # Might be empty list and that's ok. # Here it's not a itertype, we should have found one element only or empty if len(children) > 1: @@ -1369,9 +1449,9 @@ class Deserializer(object): basic_types = {str: "str", int: "int", bool: "bool", float: "float"} - valid_date = re.compile(r"\d{4}[-]\d{2}[-]\d{2}T\d{2}:\d{2}:\d{2}" r"\.?\d*Z?[-+]?[\d{2}]?:?[\d{2}]?") + 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, @@ -1409,11 +1489,12 @@ def __call__(self, target_obj, response_data, content_type=None): :param str content_type: Swagger "produces" if available. :raises: DeserializationError if deserialization fails. :return: Deserialized object. + :rtype: object """ data = self._unpack_content(response_data, content_type) return self._deserialize(target_obj, data) - def _deserialize(self, target_obj, data): + def _deserialize(self, target_obj, data): # pylint: disable=inconsistent-return-statements """Call the deserializer on a model. Data needs to be already deserialized as JSON or XML ElementTree @@ -1422,12 +1503,13 @@ def _deserialize(self, target_obj, data): :param object data: Object to deserialize. :raises: DeserializationError if deserialization fails. :return: Deserialized object. + :rtype: object """ # This is already a model, go recursive just in case if hasattr(data, "_attribute_map"): constants = [name for name, config in getattr(data, "_validation", {}).items() if config.get("constant")] try: - for attr, mapconfig in data._attribute_map.items(): + for attr, mapconfig in data._attribute_map.items(): # pylint: disable=protected-access if attr in constants: continue value = getattr(data, attr) @@ -1446,13 +1528,13 @@ def _deserialize(self, target_obj, data): if isinstance(response, str): return self.deserialize_data(data, response) - elif isinstance(response, type) and issubclass(response, Enum): + if isinstance(response, type) and issubclass(response, Enum): return self.deserialize_enum(data, response) if data is None or data is CoreNull: return data try: - attributes = response._attribute_map # type: ignore + attributes = response._attribute_map # type: ignore # pylint: disable=protected-access d_attrs = {} for attr, attr_desc in attributes.items(): # Check empty string. If it's not empty, someone has a real "additionalProperties"... @@ -1482,9 +1564,8 @@ def _deserialize(self, target_obj, data): except (AttributeError, TypeError, KeyError) as err: msg = "Unable to deserialize to object: " + class_name # type: ignore raise DeserializationError(msg) from err - else: - additional_properties = self._build_additional_properties(attributes, data) - return self._instantiate_model(response, d_attrs, additional_properties) + additional_properties = self._build_additional_properties(attributes, data) + return self._instantiate_model(response, d_attrs, additional_properties) def _build_additional_properties(self, attribute_map, data): if not self.additional_properties_detection: @@ -1511,6 +1592,8 @@ def _classify_target(self, target, data): :param str target: The target object type to deserialize to. :param str/dict data: The response data to deserialize. + :return: The classified target object and its class name. + :rtype: tuple """ if target is None: return None, None @@ -1522,7 +1605,7 @@ def _classify_target(self, target, data): return target, target try: - target = target._classify(data, self.dependencies) # type: ignore + target = target._classify(data, self.dependencies) # type: ignore # pylint: disable=protected-access except AttributeError: pass # Target is not a Model, no classify return target, target.__class__.__name__ # type: ignore @@ -1537,10 +1620,12 @@ def failsafe_deserialize(self, target_obj, data, content_type=None): :param str target_obj: The target object type to deserialize to. :param str/dict data: The response data to deserialize. :param str content_type: Swagger "produces" if available. + :return: Deserialized object. + :rtype: object """ try: return self(target_obj, data, content_type=content_type) - except: + except: # pylint: disable=bare-except _LOGGER.debug( "Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True ) @@ -1558,10 +1643,12 @@ def _unpack_content(raw_data, content_type=None): If raw_data is something else, bypass all logic and return it directly. - :param raw_data: Data to be processed. - :param content_type: How to parse if raw_data is a string/bytes. + :param obj raw_data: Data to be processed. + :param str content_type: How to parse if raw_data is a string/bytes. :raises JSONDecodeError: If JSON is requested and parsing is impossible. :raises UnicodeDecodeError: If bytes is not UTF8 + :rtype: object + :return: Unpacked content. """ # Assume this is enough to detect a Pipeline Response without importing it context = getattr(raw_data, "context", {}) @@ -1585,14 +1672,21 @@ def _unpack_content(raw_data, content_type=None): def _instantiate_model(self, response, attrs, additional_properties=None): """Instantiate a response model passing in deserialized args. - :param response: The response model class. - :param d_attrs: The deserialized response attributes. + :param Response response: The response model class. + :param dict attrs: The deserialized response attributes. + :param dict additional_properties: Additional properties to be set. + :rtype: Response + :return: The instantiated response model. """ if callable(response): subtype = getattr(response, "_subtype_map", {}) try: - readonly = [k for k, v in response._validation.items() if v.get("readonly")] - const = [k for k, v in response._validation.items() if v.get("constant")] + readonly = [ + k for k, v in response._validation.items() if v.get("readonly") # pylint: disable=protected-access + ] + const = [ + k for k, v in response._validation.items() if v.get("constant") # pylint: disable=protected-access + ] 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: @@ -1602,7 +1696,7 @@ def _instantiate_model(self, response, attrs, additional_properties=None): return response_obj except TypeError as err: msg = "Unable to deserialize {} into model {}. ".format(kwargs, response) # type: ignore - raise DeserializationError(msg + str(err)) + raise DeserializationError(msg + str(err)) from err else: try: for attr, value in attrs.items(): @@ -1611,15 +1705,16 @@ def _instantiate_model(self, response, attrs, additional_properties=None): except Exception as exp: msg = "Unable to populate response model. " msg += "Type: {}, Error: {}".format(type(response), exp) - raise DeserializationError(msg) + raise DeserializationError(msg) from exp - def deserialize_data(self, data, data_type): + def deserialize_data(self, data, data_type): # pylint: disable=too-many-return-statements """Process data for deserialization according to data type. :param str data: The response string to be deserialized. :param str data_type: The type to deserialize to. :raises: DeserializationError if deserialization fails. :return: Deserialized object. + :rtype: object """ if data is None: return data @@ -1633,7 +1728,11 @@ def deserialize_data(self, data, data_type): if isinstance(data, self.deserialize_expected_types.get(data_type, tuple())): return data - is_a_text_parsing_type = lambda x: x not in ["object", "[]", r"{}"] + is_a_text_parsing_type = lambda x: x not in [ # pylint: disable=unnecessary-lambda-assignment + "object", + "[]", + r"{}", + ] if isinstance(data, ET.Element) and is_a_text_parsing_type(data_type) and not data.text: return None data_val = self.deserialize_type[data_type](data) @@ -1653,14 +1752,14 @@ def deserialize_data(self, data, data_type): msg = "Unable to deserialize response data." msg += " Data: {}, {}".format(data, data_type) raise DeserializationError(msg) from err - else: - return self._deserialize(obj_type, data) + return self._deserialize(obj_type, data) def deserialize_iter(self, attr, iter_type): """Deserialize an iterable. :param list attr: Iterable to be deserialized. :param str iter_type: The type of object in the iterable. + :return: Deserialized iterable. :rtype: list """ if attr is None: @@ -1677,6 +1776,7 @@ def deserialize_dict(self, attr, dict_type): :param dict/list attr: Dictionary to be deserialized. Also accepts a list of key, value pairs. :param str dict_type: The object type of the items in the dictionary. + :return: Deserialized dictionary. :rtype: dict """ if isinstance(attr, list): @@ -1687,11 +1787,12 @@ def deserialize_dict(self, attr, dict_type): attr = {el.tag: el.text for el in attr} return {k: self.deserialize_data(v, dict_type) for k, v in attr.items()} - def deserialize_object(self, attr, **kwargs): + def deserialize_object(self, attr, **kwargs): # pylint: disable=too-many-return-statements """Deserialize a generic object. This will be handled as a dictionary. :param dict attr: Dictionary to be deserialized. + :return: Deserialized object. :rtype: dict :raises: TypeError if non-builtin datatype encountered. """ @@ -1726,11 +1827,10 @@ def deserialize_object(self, attr, **kwargs): pass return deserialized - else: - error = "Cannot deserialize generic object with type: " - raise TypeError(error + str(obj_type)) + error = "Cannot deserialize generic object with type: " + raise TypeError(error + str(obj_type)) - def deserialize_basic(self, attr, data_type): + def deserialize_basic(self, attr, data_type): # pylint: disable=too-many-return-statements """Deserialize basic builtin data type from string. Will attempt to convert to str, int, float and bool. This function will also accept '1', '0', 'true' and 'false' as @@ -1738,6 +1838,7 @@ def deserialize_basic(self, attr, data_type): :param str attr: response string to be deserialized. :param str data_type: deserialization data type. + :return: Deserialized basic type. :rtype: str, int, float or bool :raises: TypeError if string format is not valid. """ @@ -1749,24 +1850,23 @@ def deserialize_basic(self, attr, data_type): if data_type == "str": # None or '', node is empty string. return "" - else: - # None or '', node with a strong type is None. - # Don't try to model "empty bool" or "empty int" - return None + # None or '', node with a strong type is None. + # Don't try to model "empty bool" or "empty int" + return None if data_type == "bool": if attr in [True, False, 1, 0]: return bool(attr) - elif isinstance(attr, str): + if isinstance(attr, str): if attr.lower() in ["true", "1"]: return True - elif attr.lower() in ["false", "0"]: + if attr.lower() in ["false", "0"]: return False raise TypeError("Invalid boolean value: {}".format(attr)) if data_type == "str": return self.deserialize_unicode(attr) - return eval(data_type)(attr) # nosec + return eval(data_type)(attr) # nosec # pylint: disable=eval-used @staticmethod def deserialize_unicode(data): @@ -1774,6 +1874,7 @@ def deserialize_unicode(data): as a string. :param str data: response string to be deserialized. + :return: Deserialized string. :rtype: str or unicode """ # We might be here because we have an enum modeled as string, @@ -1787,8 +1888,7 @@ def deserialize_unicode(data): return data except NameError: return str(data) - else: - return str(data) + return str(data) @staticmethod def deserialize_enum(data, enum_obj): @@ -1800,6 +1900,7 @@ def deserialize_enum(data, enum_obj): :param str data: Response string to be deserialized. If this value is None or invalid it will be returned as-is. :param Enum enum_obj: Enum object to deserialize to. + :return: Deserialized enum object. :rtype: Enum """ if isinstance(data, enum_obj) or data is None: @@ -1810,9 +1911,9 @@ def deserialize_enum(data, enum_obj): # Workaround. We might consider remove it in the future. try: return list(enum_obj.__members__.values())[data] - except IndexError: + except IndexError as exc: error = "{!r} is not a valid index for enum {!r}" - raise DeserializationError(error.format(data, enum_obj)) + raise DeserializationError(error.format(data, enum_obj)) from exc try: return enum_obj(str(data)) except ValueError: @@ -1828,6 +1929,7 @@ def deserialize_bytearray(attr): """Deserialize string into bytearray. :param str attr: response string to be deserialized. + :return: Deserialized bytearray :rtype: bytearray :raises: TypeError if string format invalid. """ @@ -1840,6 +1942,7 @@ def deserialize_base64(attr): """Deserialize base64 encoded string into string. :param str attr: response string to be deserialized. + :return: Deserialized base64 string :rtype: bytearray :raises: TypeError if string format invalid. """ @@ -1855,8 +1958,9 @@ def deserialize_decimal(attr): """Deserialize string into Decimal object. :param str attr: response string to be deserialized. - :rtype: Decimal + :return: Deserialized decimal :raises: DeserializationError if string format invalid. + :rtype: decimal """ if isinstance(attr, ET.Element): attr = attr.text @@ -1871,6 +1975,7 @@ def deserialize_long(attr): """Deserialize string into long (Py2) or int (Py3). :param str attr: response string to be deserialized. + :return: Deserialized int :rtype: long or int :raises: ValueError if string format invalid. """ @@ -1883,6 +1988,7 @@ def deserialize_duration(attr): """Deserialize ISO-8601 formatted string into TimeDelta object. :param str attr: response string to be deserialized. + :return: Deserialized duration :rtype: TimeDelta :raises: DeserializationError if string format invalid. """ @@ -1893,14 +1999,14 @@ def deserialize_duration(attr): except (ValueError, OverflowError, AttributeError) as err: msg = "Cannot deserialize duration object." raise DeserializationError(msg) from err - else: - return duration + return duration @staticmethod def deserialize_date(attr): """Deserialize ISO-8601 formatted string into Date object. :param str attr: response string to be deserialized. + :return: Deserialized date :rtype: Date :raises: DeserializationError if string format invalid. """ @@ -1916,6 +2022,7 @@ def deserialize_time(attr): """Deserialize ISO-8601 formatted string into time object. :param str attr: response string to be deserialized. + :return: Deserialized time :rtype: datetime.time :raises: DeserializationError if string format invalid. """ @@ -1930,6 +2037,7 @@ def deserialize_rfc(attr): """Deserialize RFC-1123 formatted string into Datetime object. :param str attr: response string to be deserialized. + :return: Deserialized RFC datetime :rtype: Datetime :raises: DeserializationError if string format invalid. """ @@ -1945,14 +2053,14 @@ def deserialize_rfc(attr): except ValueError as err: msg = "Cannot deserialize to rfc datetime object." raise DeserializationError(msg) from err - else: - return date_obj + return date_obj @staticmethod def deserialize_iso(attr): """Deserialize ISO-8601 formatted string into Datetime object. :param str attr: response string to be deserialized. + :return: Deserialized ISO datetime :rtype: Datetime :raises: DeserializationError if string format invalid. """ @@ -1982,8 +2090,7 @@ def deserialize_iso(attr): except (ValueError, OverflowError, AttributeError) as err: msg = "Cannot deserialize datetime object." raise DeserializationError(msg) from err - else: - return date_obj + return date_obj @staticmethod def deserialize_unix(attr): @@ -1991,6 +2098,7 @@ def deserialize_unix(attr): This is represented as seconds. :param int attr: Object to be serialized. + :return: Deserialized datetime :rtype: Datetime :raises: DeserializationError if format invalid """ @@ -2002,5 +2110,4 @@ def deserialize_unix(attr): except ValueError as err: msg = "Cannot deserialize to unix datetime object." raise DeserializationError(msg) from err - else: - return date_obj + return date_obj diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/__init__.py index 3b1b6244b2375..ab7c46e8991db 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/__init__.py @@ -5,15 +5,21 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._compute_management_client import ComputeManagementClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._compute_management_client import ComputeManagementClient # 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__ = [ "ComputeManagementClient", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/_compute_management_client.py index 1b26b9531c51a..154201e9cd498 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/_compute_management_client.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/_compute_management_client.py @@ -31,11 +31,10 @@ ) if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class ComputeManagementClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes +class ComputeManagementClient: # pylint: disable=too-many-instance-attributes """Compute Client. :ivar availability_sets: AvailabilitySetsOperations operations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/_configuration.py index 0a43731426185..7ae1aff046183 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/_configuration.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/_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 ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ComputeManagementClient. Note that all parameters used to create this instance are saved as instance diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/_version.py index d79b2760319c5..e5754a47ce68f 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "33.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/aio/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/aio/__init__.py index 0715f50185586..d3fd1ba93379a 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/aio/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/aio/__init__.py @@ -5,12 +5,18 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._compute_management_client import ComputeManagementClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._compute_management_client import ComputeManagementClient # 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__ = [ "ComputeManagementClient", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/aio/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/aio/_compute_management_client.py index f1f64a30f7c3f..534fb48cd0a6c 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/aio/_compute_management_client.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/aio/_compute_management_client.py @@ -31,11 +31,10 @@ ) if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class ComputeManagementClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes +class ComputeManagementClient: # pylint: disable=too-many-instance-attributes """Compute Client. :ivar availability_sets: AvailabilitySetsOperations operations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/aio/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/aio/_configuration.py index 77639a258e7f2..247383c0b3503 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/aio/_configuration.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/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 ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ComputeManagementClient. Note that all parameters used to create this instance are saved as instance diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/aio/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/aio/operations/__init__.py index 80e4f6a1879a5..266b56deb3132 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/aio/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/aio/operations/__init__.py @@ -5,19 +5,25 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._operations import AvailabilitySetsOperations -from ._operations import VirtualMachineExtensionImagesOperations -from ._operations import VirtualMachineExtensionsOperations -from ._operations import VirtualMachineImagesOperations -from ._operations import UsageOperations -from ._operations import VirtualMachineSizesOperations -from ._operations import VirtualMachinesOperations -from ._operations import VirtualMachineScaleSetsOperations -from ._operations import VirtualMachineScaleSetVMsOperations +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._operations import AvailabilitySetsOperations # type: ignore +from ._operations import VirtualMachineExtensionImagesOperations # type: ignore +from ._operations import VirtualMachineExtensionsOperations # type: ignore +from ._operations import VirtualMachineImagesOperations # type: ignore +from ._operations import UsageOperations # type: ignore +from ._operations import VirtualMachineSizesOperations # type: ignore +from ._operations import VirtualMachinesOperations # type: ignore +from ._operations import VirtualMachineScaleSetsOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMsOperations # 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__ = [ @@ -31,5 +37,5 @@ "VirtualMachineScaleSetsOperations", "VirtualMachineScaleSetVMsOperations", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/aio/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/aio/operations/_operations.py index eafd96425c720..943eb466c3de0 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/aio/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/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. @@ -18,7 +18,6 @@ List, Literal, Optional, - Type, TypeVar, Union, cast, @@ -108,7 +107,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]] @@ -202,7 +201,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2015_06_15.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -270,7 +269,7 @@ async def delete( :rtype: ~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -326,7 +325,7 @@ async def get(self, resource_group_name: str, availability_set_name: str, **kwar :rtype: ~azure.mgmt.compute.v2015_06_15.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -385,7 +384,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2015-06-15")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -468,7 +467,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2015-06-15")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -569,7 +568,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineExtensionImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -627,7 +626,7 @@ async def list_types( :rtype: list[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -699,7 +698,7 @@ async def list_versions( :rtype: list[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -774,7 +773,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineExtension, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -984,7 +983,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineExtensionUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1190,7 +1189,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_name: str, vm_extension_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1326,7 +1325,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1411,7 +1410,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1490,7 +1489,7 @@ async def list( :rtype: list[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1551,7 +1550,7 @@ async def list_offers( :rtype: list[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1603,7 +1602,7 @@ async def list_publishers(self, location: str, **kwargs: Any) -> List[_models.Vi :rtype: list[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1660,7 +1659,7 @@ async def list_skus( :rtype: list[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1741,7 +1740,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.Usage"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2015-06-15")) cls: ClsType[_models.ListUsagesResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1840,7 +1839,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.VirtualMa api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2015-06-15")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1929,7 +1928,7 @@ async def _capture_initial( parameters: Union[_models.VirtualMachineCaptureParameters, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2128,7 +2127,7 @@ async def _create_or_update_initial( parameters: Union[_models.VirtualMachine, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2314,7 +2313,7 @@ def get_long_running_output(pipeline_response): ) async def _delete_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2438,7 +2437,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2015_06_15.models.VirtualMachine :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2482,7 +2481,7 @@ async def get( return deserialized # type: ignore async def _deallocate_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2607,7 +2606,7 @@ async def generalize( :rtype: ~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2667,7 +2666,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2015-06-15")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2744,7 +2743,7 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.VirtualMachine"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2015-06-15")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2826,7 +2825,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2015-06-15")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2889,7 +2888,7 @@ async def get_next(next_link=None): return AsyncItemPaged(get_next, extract_data) async def _power_off_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3001,7 +3000,7 @@ def get_long_running_output(pipeline_response): ) async def _restart_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3112,7 +3111,7 @@ def get_long_running_output(pipeline_response): ) async def _start_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3223,7 +3222,7 @@ def get_long_running_output(pipeline_response): ) async def _redeploy_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3361,7 +3360,7 @@ async def _create_or_update_initial( parameters: Union[_models.VirtualMachineScaleSet, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3549,7 +3548,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3670,7 +3669,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3719,7 +3718,7 @@ async def _deallocate_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3927,7 +3926,7 @@ async def _delete_instances_initial( vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4133,7 +4132,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSetInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4193,7 +4192,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2015-06-15")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4272,7 +4271,7 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.VirtualMachineScaleS api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2015-06-15")) cls: ClsType[_models.VirtualMachineScaleSetListWithLinkResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4355,7 +4354,7 @@ def list_skus( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2015-06-15")) cls: ClsType[_models.VirtualMachineScaleSetListSkusResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4424,7 +4423,7 @@ async def _power_off_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4632,7 +4631,7 @@ async def _restart_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4834,7 +4833,7 @@ async def _start_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5036,7 +5035,7 @@ async def _update_instances_initial( vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5231,7 +5230,7 @@ def get_long_running_output(pipeline_response): async def _reimage_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5365,7 +5364,7 @@ def __init__(self, *args, **kwargs) -> None: async def _reimage_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5482,7 +5481,7 @@ def get_long_running_output(pipeline_response): async def _deallocate_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5601,7 +5600,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5728,7 +5727,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSetVM :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5787,7 +5786,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSetVMInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5869,7 +5868,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2015-06-15")) cls: ClsType[_models.VirtualMachineScaleSetVMListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5937,7 +5936,7 @@ async def get_next(next_link=None): async def _power_off_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6056,7 +6055,7 @@ def get_long_running_output(pipeline_response): async def _restart_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6173,7 +6172,7 @@ def get_long_running_output(pipeline_response): async def _start_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/__init__.py index 4c5a283d2a762..53c8591bd493d 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/__init__.py @@ -5,104 +5,115 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._models_py3 import AdditionalUnattendContent -from ._models_py3 import ApiEntityReference -from ._models_py3 import ApiError -from ._models_py3 import ApiErrorBase -from ._models_py3 import AvailabilitySet -from ._models_py3 import AvailabilitySetListResult -from ._models_py3 import BootDiagnostics -from ._models_py3 import BootDiagnosticsInstanceView -from ._models_py3 import ComputeLongRunningOperationProperties -from ._models_py3 import DataDisk -from ._models_py3 import DataDiskImage -from ._models_py3 import DiagnosticsProfile -from ._models_py3 import DiskEncryptionSettings -from ._models_py3 import DiskInstanceView -from ._models_py3 import HardwareProfile -from ._models_py3 import ImageReference -from ._models_py3 import InnerError -from ._models_py3 import InstanceViewStatus -from ._models_py3 import KeyVaultKeyReference -from ._models_py3 import KeyVaultSecretReference -from ._models_py3 import LinuxConfiguration -from ._models_py3 import ListUsagesResult -from ._models_py3 import NetworkInterfaceReference -from ._models_py3 import NetworkProfile -from ._models_py3 import OSDisk -from ._models_py3 import OSDiskImage -from ._models_py3 import OSProfile -from ._models_py3 import OperationStatusResponse -from ._models_py3 import Plan -from ._models_py3 import PurchasePlan -from ._models_py3 import Resource -from ._models_py3 import Sku -from ._models_py3 import SshConfiguration -from ._models_py3 import SshPublicKey -from ._models_py3 import StorageProfile -from ._models_py3 import SubResource -from ._models_py3 import UpdateResource -from ._models_py3 import UpgradePolicy -from ._models_py3 import Usage -from ._models_py3 import UsageName -from ._models_py3 import VaultCertificate -from ._models_py3 import VaultSecretGroup -from ._models_py3 import VirtualHardDisk -from ._models_py3 import VirtualMachine -from ._models_py3 import VirtualMachineAgentInstanceView -from ._models_py3 import VirtualMachineCaptureParameters -from ._models_py3 import VirtualMachineCaptureResult -from ._models_py3 import VirtualMachineExtension -from ._models_py3 import VirtualMachineExtensionHandlerInstanceView -from ._models_py3 import VirtualMachineExtensionImage -from ._models_py3 import VirtualMachineExtensionInstanceView -from ._models_py3 import VirtualMachineExtensionUpdate -from ._models_py3 import VirtualMachineImage -from ._models_py3 import VirtualMachineImageResource -from ._models_py3 import VirtualMachineInstanceView -from ._models_py3 import VirtualMachineListResult -from ._models_py3 import VirtualMachineScaleSet -from ._models_py3 import VirtualMachineScaleSetExtension -from ._models_py3 import VirtualMachineScaleSetExtensionProfile -from ._models_py3 import VirtualMachineScaleSetIPConfiguration -from ._models_py3 import VirtualMachineScaleSetInstanceView -from ._models_py3 import VirtualMachineScaleSetInstanceViewStatusesSummary -from ._models_py3 import VirtualMachineScaleSetListResult -from ._models_py3 import VirtualMachineScaleSetListSkusResult -from ._models_py3 import VirtualMachineScaleSetListWithLinkResult -from ._models_py3 import VirtualMachineScaleSetNetworkConfiguration -from ._models_py3 import VirtualMachineScaleSetNetworkProfile -from ._models_py3 import VirtualMachineScaleSetOSDisk -from ._models_py3 import VirtualMachineScaleSetOSProfile -from ._models_py3 import VirtualMachineScaleSetSku -from ._models_py3 import VirtualMachineScaleSetSkuCapacity -from ._models_py3 import VirtualMachineScaleSetStorageProfile -from ._models_py3 import VirtualMachineScaleSetVM -from ._models_py3 import VirtualMachineScaleSetVMExtensionsSummary -from ._models_py3 import VirtualMachineScaleSetVMInstanceIDs -from ._models_py3 import VirtualMachineScaleSetVMInstanceRequiredIDs -from ._models_py3 import VirtualMachineScaleSetVMInstanceView -from ._models_py3 import VirtualMachineScaleSetVMListResult -from ._models_py3 import VirtualMachineScaleSetVMProfile -from ._models_py3 import VirtualMachineSize -from ._models_py3 import VirtualMachineSizeListResult -from ._models_py3 import VirtualMachineStatusCodeCount -from ._models_py3 import WinRMConfiguration -from ._models_py3 import WinRMListener -from ._models_py3 import WindowsConfiguration +from typing import TYPE_CHECKING -from ._compute_management_client_enums import CachingTypes -from ._compute_management_client_enums import DiskCreateOptionTypes -from ._compute_management_client_enums import OperatingSystemTypes -from ._compute_management_client_enums import ProtocolTypes -from ._compute_management_client_enums import SettingNames -from ._compute_management_client_enums import StatusLevelTypes -from ._compute_management_client_enums import UpgradeMode -from ._compute_management_client_enums import VirtualMachineScaleSetSkuScaleType -from ._compute_management_client_enums import VirtualMachineSizeTypes +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + + +from ._models_py3 import ( # type: ignore + AdditionalUnattendContent, + ApiEntityReference, + ApiError, + ApiErrorBase, + AvailabilitySet, + AvailabilitySetListResult, + BootDiagnostics, + BootDiagnosticsInstanceView, + ComputeLongRunningOperationProperties, + DataDisk, + DataDiskImage, + DiagnosticsProfile, + DiskEncryptionSettings, + DiskInstanceView, + HardwareProfile, + ImageReference, + InnerError, + InstanceViewStatus, + KeyVaultKeyReference, + KeyVaultSecretReference, + LinuxConfiguration, + ListUsagesResult, + NetworkInterfaceReference, + NetworkProfile, + OSDisk, + OSDiskImage, + OSProfile, + OperationStatusResponse, + Plan, + PurchasePlan, + Resource, + Sku, + SshConfiguration, + SshPublicKey, + StorageProfile, + SubResource, + UpdateResource, + UpgradePolicy, + Usage, + UsageName, + VaultCertificate, + VaultSecretGroup, + VirtualHardDisk, + VirtualMachine, + VirtualMachineAgentInstanceView, + VirtualMachineCaptureParameters, + VirtualMachineCaptureResult, + VirtualMachineExtension, + VirtualMachineExtensionHandlerInstanceView, + VirtualMachineExtensionImage, + VirtualMachineExtensionInstanceView, + VirtualMachineExtensionUpdate, + VirtualMachineImage, + VirtualMachineImageResource, + VirtualMachineInstanceView, + VirtualMachineListResult, + VirtualMachineScaleSet, + VirtualMachineScaleSetExtension, + VirtualMachineScaleSetExtensionProfile, + VirtualMachineScaleSetIPConfiguration, + VirtualMachineScaleSetInstanceView, + VirtualMachineScaleSetInstanceViewStatusesSummary, + VirtualMachineScaleSetListResult, + VirtualMachineScaleSetListSkusResult, + VirtualMachineScaleSetListWithLinkResult, + VirtualMachineScaleSetNetworkConfiguration, + VirtualMachineScaleSetNetworkProfile, + VirtualMachineScaleSetOSDisk, + VirtualMachineScaleSetOSProfile, + VirtualMachineScaleSetSku, + VirtualMachineScaleSetSkuCapacity, + VirtualMachineScaleSetStorageProfile, + VirtualMachineScaleSetVM, + VirtualMachineScaleSetVMExtensionsSummary, + VirtualMachineScaleSetVMInstanceIDs, + VirtualMachineScaleSetVMInstanceRequiredIDs, + VirtualMachineScaleSetVMInstanceView, + VirtualMachineScaleSetVMListResult, + VirtualMachineScaleSetVMProfile, + VirtualMachineSize, + VirtualMachineSizeListResult, + VirtualMachineStatusCodeCount, + WinRMConfiguration, + WinRMListener, + WindowsConfiguration, +) + +from ._compute_management_client_enums import ( # type: ignore + CachingTypes, + DiskCreateOptionTypes, + OperatingSystemTypes, + ProtocolTypes, + SettingNames, + StatusLevelTypes, + UpgradeMode, + VirtualMachineScaleSetSkuScaleType, + VirtualMachineSizeTypes, +) 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__ = [ @@ -201,5 +212,5 @@ "VirtualMachineScaleSetSkuScaleType", "VirtualMachineSizeTypes", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/_models_py3.py index d91a920c530ae..6ff72305e3a72 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/_models_py3.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/_models_py3.py @@ -1,5 +1,5 @@ -# 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. @@ -16,10 +16,9 @@ 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 if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object @@ -1924,7 +1923,7 @@ def __init__(self, *, uri: Optional[str] = None, **kwargs: Any) -> None: self.uri = uri -class VirtualMachine(Resource): # pylint: disable=too-many-instance-attributes +class VirtualMachine(Resource): """Describes a Virtual Machine. Variables are only populated by the server, and will be ignored when sending a request. @@ -2203,7 +2202,7 @@ def __init__( self.output = output -class VirtualMachineExtension(Resource): # pylint: disable=too-many-instance-attributes +class VirtualMachineExtension(Resource): """Describes a Virtual Machine Extension. Variables are only populated by the server, and will be ignored when sending a request. @@ -3666,7 +3665,7 @@ def __init__( self.os_disk = os_disk -class VirtualMachineScaleSetVM(Resource): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetVM(Resource): """Describes a virtual machine scale set virtual machine. Variables are only populated by the server, and will be ignored when sending a request. diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/operations/__init__.py index 80e4f6a1879a5..266b56deb3132 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/operations/__init__.py @@ -5,19 +5,25 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._operations import AvailabilitySetsOperations -from ._operations import VirtualMachineExtensionImagesOperations -from ._operations import VirtualMachineExtensionsOperations -from ._operations import VirtualMachineImagesOperations -from ._operations import UsageOperations -from ._operations import VirtualMachineSizesOperations -from ._operations import VirtualMachinesOperations -from ._operations import VirtualMachineScaleSetsOperations -from ._operations import VirtualMachineScaleSetVMsOperations +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._operations import AvailabilitySetsOperations # type: ignore +from ._operations import VirtualMachineExtensionImagesOperations # type: ignore +from ._operations import VirtualMachineExtensionsOperations # type: ignore +from ._operations import VirtualMachineImagesOperations # type: ignore +from ._operations import UsageOperations # type: ignore +from ._operations import VirtualMachineSizesOperations # type: ignore +from ._operations import VirtualMachinesOperations # type: ignore +from ._operations import VirtualMachineScaleSetsOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMsOperations # 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__ = [ @@ -31,5 +37,5 @@ "VirtualMachineScaleSetsOperations", "VirtualMachineScaleSetVMsOperations", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/operations/_operations.py index 755aa63a52d3b..feefe56fe18ad 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/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. @@ -8,22 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import ( - Any, - Callable, - Dict, - IO, - Iterable, - Iterator, - List, - Literal, - Optional, - Type, - TypeVar, - Union, - cast, - overload, -) +from typing import Any, Callable, Dict, IO, Iterable, Iterator, List, Literal, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -51,7 +36,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, HttpResponse], T, Dict[str, Any]], Any]] @@ -1942,7 +1927,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2015_06_15.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2010,7 +1995,7 @@ def delete( :rtype: ~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2066,7 +2051,7 @@ def get(self, resource_group_name: str, availability_set_name: str, **kwargs: An :rtype: ~azure.mgmt.compute.v2015_06_15.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2124,7 +2109,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Ava api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2015-06-15")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2206,7 +2191,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2015-06-15")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2307,7 +2292,7 @@ def get( :rtype: ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineExtensionImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2365,7 +2350,7 @@ def list_types( :rtype: list[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2437,7 +2422,7 @@ def list_versions( :rtype: list[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2512,7 +2497,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineExtension, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2722,7 +2707,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineExtensionUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2928,7 +2913,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_name: str, vm_extension_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3064,7 +3049,7 @@ def get( :rtype: ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3149,7 +3134,7 @@ def get( :rtype: ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3228,7 +3213,7 @@ def list( :rtype: list[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3289,7 +3274,7 @@ def list_offers( :rtype: list[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3341,7 +3326,7 @@ def list_publishers(self, location: str, **kwargs: Any) -> List[_models.VirtualM :rtype: list[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3398,7 +3383,7 @@ def list_skus( :rtype: list[~azure.mgmt.compute.v2015_06_15.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3479,7 +3464,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.Usage"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2015-06-15")) cls: ClsType[_models.ListUsagesResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3577,7 +3562,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.VirtualMachine api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2015-06-15")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3666,7 +3651,7 @@ def _capture_initial( parameters: Union[_models.VirtualMachineCaptureParameters, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3864,7 +3849,7 @@ def _create_or_update_initial( parameters: Union[_models.VirtualMachine, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4047,7 +4032,7 @@ def get_long_running_output(pipeline_response): ) def _delete_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4171,7 +4156,7 @@ def get( :rtype: ~azure.mgmt.compute.v2015_06_15.models.VirtualMachine :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4215,7 +4200,7 @@ def get( return deserialized # type: ignore def _deallocate_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4337,7 +4322,7 @@ def generalize(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> _ :rtype: ~azure.mgmt.compute.v2015_06_15.models.OperationStatusResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4396,7 +4381,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Vir api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2015-06-15")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4472,7 +4457,7 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.VirtualMachine"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2015-06-15")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4553,7 +4538,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2015-06-15")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4616,7 +4601,7 @@ def get_next(next_link=None): return ItemPaged(get_next, extract_data) def _power_off_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4727,7 +4712,7 @@ def get_long_running_output(pipeline_response): ) def _restart_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4837,7 +4822,7 @@ def get_long_running_output(pipeline_response): ) def _start_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4947,7 +4932,7 @@ def get_long_running_output(pipeline_response): ) def _redeploy_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5084,7 +5069,7 @@ def _create_or_update_initial( parameters: Union[_models.VirtualMachineScaleSet, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5270,7 +5255,7 @@ def get_long_running_output(pipeline_response): ) def _delete_initial(self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5389,7 +5374,7 @@ def get(self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) - :rtype: ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5438,7 +5423,7 @@ def _deallocate_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5645,7 +5630,7 @@ def _delete_instances_initial( vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5850,7 +5835,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSetInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5910,7 +5895,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Vir api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2015-06-15")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5989,7 +5974,7 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.VirtualMachineScaleSet"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2015-06-15")) cls: ClsType[_models.VirtualMachineScaleSetListWithLinkResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6072,7 +6057,7 @@ def list_skus( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2015-06-15")) cls: ClsType[_models.VirtualMachineScaleSetListSkusResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6141,7 +6126,7 @@ def _power_off_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6348,7 +6333,7 @@ def _restart_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6549,7 +6534,7 @@ def _start_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6750,7 +6735,7 @@ def _update_instances_initial( vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6942,7 +6927,7 @@ def get_long_running_output(pipeline_response): ) def _reimage_initial(self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7075,7 +7060,7 @@ def __init__(self, *args, **kwargs): def _reimage_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7191,7 +7176,7 @@ def get_long_running_output(pipeline_response): def _deallocate_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7309,7 +7294,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7436,7 +7421,7 @@ def get( :rtype: ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSetVM :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7495,7 +7480,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineScaleSetVMInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7577,7 +7562,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2015-06-15")) cls: ClsType[_models.VirtualMachineScaleSetVMListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7645,7 +7630,7 @@ def get_next(next_link=None): def _power_off_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7763,7 +7748,7 @@ def get_long_running_output(pipeline_response): def _restart_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7879,7 +7864,7 @@ def get_long_running_output(pipeline_response): def _start_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/__init__.py index 3b1b6244b2375..ab7c46e8991db 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/__init__.py @@ -5,15 +5,21 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._compute_management_client import ComputeManagementClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._compute_management_client import ComputeManagementClient # 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__ = [ "ComputeManagementClient", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/_compute_management_client.py index e7de7aebd2a94..ac44ad6f8b99b 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/_compute_management_client.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/_compute_management_client.py @@ -31,11 +31,10 @@ ) if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class ComputeManagementClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes +class ComputeManagementClient: # pylint: disable=too-many-instance-attributes """Compute Client. :ivar availability_sets: AvailabilitySetsOperations operations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/_configuration.py index f0d71d62f98ca..bdd2989f6395d 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/_configuration.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/_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 ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ComputeManagementClient. Note that all parameters used to create this instance are saved as instance diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/_version.py index d79b2760319c5..e5754a47ce68f 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "33.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/aio/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/aio/__init__.py index 0715f50185586..d3fd1ba93379a 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/aio/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/aio/__init__.py @@ -5,12 +5,18 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._compute_management_client import ComputeManagementClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._compute_management_client import ComputeManagementClient # 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__ = [ "ComputeManagementClient", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/aio/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/aio/_compute_management_client.py index 2aec4842479da..5bc4ac9cd8b2e 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/aio/_compute_management_client.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/aio/_compute_management_client.py @@ -31,11 +31,10 @@ ) if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class ComputeManagementClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes +class ComputeManagementClient: # pylint: disable=too-many-instance-attributes """Compute Client. :ivar availability_sets: AvailabilitySetsOperations operations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/aio/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/aio/_configuration.py index 336e87bdaac17..565952c24ccee 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/aio/_configuration.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/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 ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ComputeManagementClient. Note that all parameters used to create this instance are saved as instance diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/aio/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/aio/operations/__init__.py index 83da05574bccc..c585bc95261e3 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/aio/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/aio/operations/__init__.py @@ -5,19 +5,25 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._operations import AvailabilitySetsOperations -from ._operations import VirtualMachineExtensionImagesOperations -from ._operations import VirtualMachineExtensionsOperations -from ._operations import VirtualMachinesOperations -from ._operations import VirtualMachineImagesOperations -from ._operations import UsageOperations -from ._operations import VirtualMachineSizesOperations -from ._operations import VirtualMachineScaleSetsOperations -from ._operations import VirtualMachineScaleSetVMsOperations +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._operations import AvailabilitySetsOperations # type: ignore +from ._operations import VirtualMachineExtensionImagesOperations # type: ignore +from ._operations import VirtualMachineExtensionsOperations # type: ignore +from ._operations import VirtualMachinesOperations # type: ignore +from ._operations import VirtualMachineImagesOperations # type: ignore +from ._operations import UsageOperations # type: ignore +from ._operations import VirtualMachineSizesOperations # type: ignore +from ._operations import VirtualMachineScaleSetsOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMsOperations # 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__ = [ @@ -31,5 +37,5 @@ "VirtualMachineScaleSetsOperations", "VirtualMachineScaleSetVMsOperations", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/aio/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/aio/operations/_operations.py index 3af17bdc6d6b8..1a2f99696cf29 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/aio/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/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. @@ -18,7 +18,6 @@ List, Literal, Optional, - Type, TypeVar, Union, cast, @@ -110,7 +109,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]] @@ -204,7 +203,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2016_03_30.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -272,7 +271,7 @@ async def delete( :rtype: ~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -328,7 +327,7 @@ async def get(self, resource_group_name: str, availability_set_name: str, **kwar :rtype: ~azure.mgmt.compute.v2016_03_30.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -390,7 +389,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-03-30")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -468,7 +467,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-03-30")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -551,7 +550,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-03-30")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -652,7 +651,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineExtensionImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -710,7 +709,7 @@ async def list_types( :rtype: list[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -782,7 +781,7 @@ async def list_versions( :rtype: list[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -857,7 +856,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineExtension, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1067,7 +1066,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineExtensionUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1273,7 +1272,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_name: str, vm_extension_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1409,7 +1408,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1490,7 +1489,7 @@ async def get_extensions( :rtype: ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1540,7 +1539,7 @@ async def _capture_initial( parameters: Union[_models.VirtualMachineCaptureParameters, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1739,7 +1738,7 @@ async def _create_or_update_initial( parameters: Union[_models.VirtualMachine, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1925,7 +1924,7 @@ def get_long_running_output(pipeline_response): ) async def _delete_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2049,7 +2048,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2016_03_30.models.VirtualMachine :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2093,7 +2092,7 @@ async def get( return deserialized # type: ignore async def _deallocate_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2218,7 +2217,7 @@ async def generalize( :rtype: ~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2278,7 +2277,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-03-30")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2355,7 +2354,7 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.VirtualMachine"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-03-30")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2437,7 +2436,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-03-30")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2500,7 +2499,7 @@ async def get_next(next_link=None): return AsyncItemPaged(get_next, extract_data) async def _power_off_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2612,7 +2611,7 @@ def get_long_running_output(pipeline_response): ) async def _restart_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2723,7 +2722,7 @@ def get_long_running_output(pipeline_response): ) async def _start_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2834,7 +2833,7 @@ def get_long_running_output(pipeline_response): ) async def _redeploy_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2985,7 +2984,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3064,7 +3063,7 @@ async def list( :rtype: list[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3125,7 +3124,7 @@ async def list_offers( :rtype: list[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3177,7 +3176,7 @@ async def list_publishers(self, location: str, **kwargs: Any) -> List[_models.Vi :rtype: list[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3234,7 +3233,7 @@ async def list_skus( :rtype: list[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3315,7 +3314,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.Usage"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-03-30")) cls: ClsType[_models.ListUsagesResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3414,7 +3413,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.VirtualMa api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-03-30")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3503,7 +3502,7 @@ async def _create_or_update_initial( parameters: Union[_models.VirtualMachineScaleSet, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3691,7 +3690,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3812,7 +3811,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3861,7 +3860,7 @@ async def _deallocate_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4069,7 +4068,7 @@ async def _delete_instances_initial( vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4275,7 +4274,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSetInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4335,7 +4334,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-03-30")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4414,7 +4413,7 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.VirtualMachineScaleS api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-03-30")) cls: ClsType[_models.VirtualMachineScaleSetListWithLinkResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4497,7 +4496,7 @@ def list_skus( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-03-30")) cls: ClsType[_models.VirtualMachineScaleSetListSkusResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4566,7 +4565,7 @@ async def _power_off_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4774,7 +4773,7 @@ async def _restart_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4976,7 +4975,7 @@ async def _start_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5178,7 +5177,7 @@ async def _update_instances_initial( vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5373,7 +5372,7 @@ def get_long_running_output(pipeline_response): async def _reimage_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5507,7 +5506,7 @@ def __init__(self, *args, **kwargs) -> None: async def _reimage_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5624,7 +5623,7 @@ def get_long_running_output(pipeline_response): async def _deallocate_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5743,7 +5742,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5870,7 +5869,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSetVM :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5929,7 +5928,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSetVMInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6011,7 +6010,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-03-30")) cls: ClsType[_models.VirtualMachineScaleSetVMListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6079,7 +6078,7 @@ async def get_next(next_link=None): async def _power_off_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6198,7 +6197,7 @@ def get_long_running_output(pipeline_response): async def _restart_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6315,7 +6314,7 @@ def get_long_running_output(pipeline_response): async def _start_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/__init__.py index ff8e0abe767eb..c2171ba8800c4 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/__init__.py @@ -5,107 +5,118 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._models_py3 import AdditionalUnattendContent -from ._models_py3 import ApiEntityReference -from ._models_py3 import ApiError -from ._models_py3 import ApiErrorBase -from ._models_py3 import AvailabilitySet -from ._models_py3 import AvailabilitySetListResult -from ._models_py3 import BootDiagnostics -from ._models_py3 import BootDiagnosticsInstanceView -from ._models_py3 import ComputeLongRunningOperationProperties -from ._models_py3 import DataDisk -from ._models_py3 import DataDiskImage -from ._models_py3 import DiagnosticsProfile -from ._models_py3 import DiskEncryptionSettings -from ._models_py3 import DiskInstanceView -from ._models_py3 import HardwareProfile -from ._models_py3 import ImageReference -from ._models_py3 import InnerError -from ._models_py3 import InstanceViewStatus -from ._models_py3 import KeyVaultKeyReference -from ._models_py3 import KeyVaultSecretReference -from ._models_py3 import LinuxConfiguration -from ._models_py3 import ListUsagesResult -from ._models_py3 import NetworkInterfaceReference -from ._models_py3 import NetworkProfile -from ._models_py3 import OSDisk -from ._models_py3 import OSDiskImage -from ._models_py3 import OSProfile -from ._models_py3 import OperationStatusResponse -from ._models_py3 import Plan -from ._models_py3 import PurchasePlan -from ._models_py3 import Resource -from ._models_py3 import Sku -from ._models_py3 import SshConfiguration -from ._models_py3 import SshPublicKey -from ._models_py3 import StorageProfile -from ._models_py3 import SubResource -from ._models_py3 import UpdateResource -from ._models_py3 import UpgradePolicy -from ._models_py3 import Usage -from ._models_py3 import UsageName -from ._models_py3 import VaultCertificate -from ._models_py3 import VaultSecretGroup -from ._models_py3 import VirtualHardDisk -from ._models_py3 import VirtualMachine -from ._models_py3 import VirtualMachineAgentInstanceView -from ._models_py3 import VirtualMachineCaptureParameters -from ._models_py3 import VirtualMachineCaptureResult -from ._models_py3 import VirtualMachineExtension -from ._models_py3 import VirtualMachineExtensionHandlerInstanceView -from ._models_py3 import VirtualMachineExtensionImage -from ._models_py3 import VirtualMachineExtensionInstanceView -from ._models_py3 import VirtualMachineExtensionUpdate -from ._models_py3 import VirtualMachineExtensionsListResult -from ._models_py3 import VirtualMachineIdentity -from ._models_py3 import VirtualMachineImage -from ._models_py3 import VirtualMachineImageResource -from ._models_py3 import VirtualMachineInstanceView -from ._models_py3 import VirtualMachineListResult -from ._models_py3 import VirtualMachineScaleSet -from ._models_py3 import VirtualMachineScaleSetExtension -from ._models_py3 import VirtualMachineScaleSetExtensionProfile -from ._models_py3 import VirtualMachineScaleSetIPConfiguration -from ._models_py3 import VirtualMachineScaleSetIdentity -from ._models_py3 import VirtualMachineScaleSetInstanceView -from ._models_py3 import VirtualMachineScaleSetInstanceViewStatusesSummary -from ._models_py3 import VirtualMachineScaleSetListResult -from ._models_py3 import VirtualMachineScaleSetListSkusResult -from ._models_py3 import VirtualMachineScaleSetListWithLinkResult -from ._models_py3 import VirtualMachineScaleSetNetworkConfiguration -from ._models_py3 import VirtualMachineScaleSetNetworkProfile -from ._models_py3 import VirtualMachineScaleSetOSDisk -from ._models_py3 import VirtualMachineScaleSetOSProfile -from ._models_py3 import VirtualMachineScaleSetSku -from ._models_py3 import VirtualMachineScaleSetSkuCapacity -from ._models_py3 import VirtualMachineScaleSetStorageProfile -from ._models_py3 import VirtualMachineScaleSetVM -from ._models_py3 import VirtualMachineScaleSetVMExtensionsSummary -from ._models_py3 import VirtualMachineScaleSetVMInstanceIDs -from ._models_py3 import VirtualMachineScaleSetVMInstanceRequiredIDs -from ._models_py3 import VirtualMachineScaleSetVMInstanceView -from ._models_py3 import VirtualMachineScaleSetVMListResult -from ._models_py3 import VirtualMachineScaleSetVMProfile -from ._models_py3 import VirtualMachineSize -from ._models_py3 import VirtualMachineSizeListResult -from ._models_py3 import VirtualMachineStatusCodeCount -from ._models_py3 import WinRMConfiguration -from ._models_py3 import WinRMListener -from ._models_py3 import WindowsConfiguration +from typing import TYPE_CHECKING -from ._compute_management_client_enums import CachingTypes -from ._compute_management_client_enums import DiskCreateOptionTypes -from ._compute_management_client_enums import OperatingSystemTypes -from ._compute_management_client_enums import ProtocolTypes -from ._compute_management_client_enums import SettingNames -from ._compute_management_client_enums import StatusLevelTypes -from ._compute_management_client_enums import UpgradeMode -from ._compute_management_client_enums import VirtualMachineScaleSetSkuScaleType -from ._compute_management_client_enums import VirtualMachineSizeTypes +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + + +from ._models_py3 import ( # type: ignore + AdditionalUnattendContent, + ApiEntityReference, + ApiError, + ApiErrorBase, + AvailabilitySet, + AvailabilitySetListResult, + BootDiagnostics, + BootDiagnosticsInstanceView, + ComputeLongRunningOperationProperties, + DataDisk, + DataDiskImage, + DiagnosticsProfile, + DiskEncryptionSettings, + DiskInstanceView, + HardwareProfile, + ImageReference, + InnerError, + InstanceViewStatus, + KeyVaultKeyReference, + KeyVaultSecretReference, + LinuxConfiguration, + ListUsagesResult, + NetworkInterfaceReference, + NetworkProfile, + OSDisk, + OSDiskImage, + OSProfile, + OperationStatusResponse, + Plan, + PurchasePlan, + Resource, + Sku, + SshConfiguration, + SshPublicKey, + StorageProfile, + SubResource, + UpdateResource, + UpgradePolicy, + Usage, + UsageName, + VaultCertificate, + VaultSecretGroup, + VirtualHardDisk, + VirtualMachine, + VirtualMachineAgentInstanceView, + VirtualMachineCaptureParameters, + VirtualMachineCaptureResult, + VirtualMachineExtension, + VirtualMachineExtensionHandlerInstanceView, + VirtualMachineExtensionImage, + VirtualMachineExtensionInstanceView, + VirtualMachineExtensionUpdate, + VirtualMachineExtensionsListResult, + VirtualMachineIdentity, + VirtualMachineImage, + VirtualMachineImageResource, + VirtualMachineInstanceView, + VirtualMachineListResult, + VirtualMachineScaleSet, + VirtualMachineScaleSetExtension, + VirtualMachineScaleSetExtensionProfile, + VirtualMachineScaleSetIPConfiguration, + VirtualMachineScaleSetIdentity, + VirtualMachineScaleSetInstanceView, + VirtualMachineScaleSetInstanceViewStatusesSummary, + VirtualMachineScaleSetListResult, + VirtualMachineScaleSetListSkusResult, + VirtualMachineScaleSetListWithLinkResult, + VirtualMachineScaleSetNetworkConfiguration, + VirtualMachineScaleSetNetworkProfile, + VirtualMachineScaleSetOSDisk, + VirtualMachineScaleSetOSProfile, + VirtualMachineScaleSetSku, + VirtualMachineScaleSetSkuCapacity, + VirtualMachineScaleSetStorageProfile, + VirtualMachineScaleSetVM, + VirtualMachineScaleSetVMExtensionsSummary, + VirtualMachineScaleSetVMInstanceIDs, + VirtualMachineScaleSetVMInstanceRequiredIDs, + VirtualMachineScaleSetVMInstanceView, + VirtualMachineScaleSetVMListResult, + VirtualMachineScaleSetVMProfile, + VirtualMachineSize, + VirtualMachineSizeListResult, + VirtualMachineStatusCodeCount, + WinRMConfiguration, + WinRMListener, + WindowsConfiguration, +) + +from ._compute_management_client_enums import ( # type: ignore + CachingTypes, + DiskCreateOptionTypes, + OperatingSystemTypes, + ProtocolTypes, + SettingNames, + StatusLevelTypes, + UpgradeMode, + VirtualMachineScaleSetSkuScaleType, + VirtualMachineSizeTypes, +) 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__ = [ @@ -207,5 +218,5 @@ "VirtualMachineScaleSetSkuScaleType", "VirtualMachineSizeTypes", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/_models_py3.py index 2e7ffd8043924..d623a0f251509 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/_models_py3.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/_models_py3.py @@ -1,5 +1,5 @@ -# 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. @@ -16,10 +16,9 @@ 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 if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object @@ -1926,7 +1925,7 @@ def __init__(self, *, uri: Optional[str] = None, **kwargs: Any) -> None: self.uri = uri -class VirtualMachine(Resource): # pylint: disable=too-many-instance-attributes +class VirtualMachine(Resource): """Describes a Virtual Machine. Variables are only populated by the server, and will be ignored when sending a request. @@ -2218,7 +2217,7 @@ def __init__( self.output = output -class VirtualMachineExtension(Resource): # pylint: disable=too-many-instance-attributes +class VirtualMachineExtension(Resource): """Describes a Virtual Machine Extension. Variables are only populated by the server, and will be ignored when sending a request. @@ -2914,7 +2913,7 @@ def __init__( self.next_link = next_link -class VirtualMachineScaleSet(Resource): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSet(Resource): """Describes a Virtual Machine Scale Set. Variables are only populated by the server, and will be ignored when sending a request. @@ -3809,7 +3808,7 @@ def __init__( self.os_disk = os_disk -class VirtualMachineScaleSetVM(Resource): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetVM(Resource): """Describes a virtual machine scale set virtual machine. Variables are only populated by the server, and will be ignored when sending a request. diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/operations/__init__.py index 83da05574bccc..c585bc95261e3 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/operations/__init__.py @@ -5,19 +5,25 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._operations import AvailabilitySetsOperations -from ._operations import VirtualMachineExtensionImagesOperations -from ._operations import VirtualMachineExtensionsOperations -from ._operations import VirtualMachinesOperations -from ._operations import VirtualMachineImagesOperations -from ._operations import UsageOperations -from ._operations import VirtualMachineSizesOperations -from ._operations import VirtualMachineScaleSetsOperations -from ._operations import VirtualMachineScaleSetVMsOperations +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._operations import AvailabilitySetsOperations # type: ignore +from ._operations import VirtualMachineExtensionImagesOperations # type: ignore +from ._operations import VirtualMachineExtensionsOperations # type: ignore +from ._operations import VirtualMachinesOperations # type: ignore +from ._operations import VirtualMachineImagesOperations # type: ignore +from ._operations import UsageOperations # type: ignore +from ._operations import VirtualMachineSizesOperations # type: ignore +from ._operations import VirtualMachineScaleSetsOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMsOperations # 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__ = [ @@ -31,5 +37,5 @@ "VirtualMachineScaleSetsOperations", "VirtualMachineScaleSetVMsOperations", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/operations/_operations.py index 7194a5701b7e7..3158f348adfc7 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/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. @@ -8,22 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import ( - Any, - Callable, - Dict, - IO, - Iterable, - Iterator, - List, - Literal, - Optional, - Type, - TypeVar, - Union, - cast, - overload, -) +from typing import Any, Callable, Dict, IO, Iterable, Iterator, List, Literal, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -51,7 +36,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, HttpResponse], T, Dict[str, Any]], Any]] @@ -2003,7 +1988,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2016_03_30.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2071,7 +2056,7 @@ def delete( :rtype: ~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2127,7 +2112,7 @@ def get(self, resource_group_name: str, availability_set_name: str, **kwargs: An :rtype: ~azure.mgmt.compute.v2016_03_30.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2188,7 +2173,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-03-30")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2265,7 +2250,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Ava api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-03-30")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2347,7 +2332,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-03-30")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2448,7 +2433,7 @@ def get( :rtype: ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineExtensionImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2506,7 +2491,7 @@ def list_types( :rtype: list[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2578,7 +2563,7 @@ def list_versions( :rtype: list[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2653,7 +2638,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineExtension, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2863,7 +2848,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineExtensionUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3069,7 +3054,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_name: str, vm_extension_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3205,7 +3190,7 @@ def get( :rtype: ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3286,7 +3271,7 @@ def get_extensions( :rtype: ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3336,7 +3321,7 @@ def _capture_initial( parameters: Union[_models.VirtualMachineCaptureParameters, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3534,7 +3519,7 @@ def _create_or_update_initial( parameters: Union[_models.VirtualMachine, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3717,7 +3702,7 @@ def get_long_running_output(pipeline_response): ) def _delete_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3841,7 +3826,7 @@ def get( :rtype: ~azure.mgmt.compute.v2016_03_30.models.VirtualMachine :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3885,7 +3870,7 @@ def get( return deserialized # type: ignore def _deallocate_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4007,7 +3992,7 @@ def generalize(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> _ :rtype: ~azure.mgmt.compute.v2016_03_30.models.OperationStatusResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4066,7 +4051,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Vir api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-03-30")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4142,7 +4127,7 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.VirtualMachine"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-03-30")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4223,7 +4208,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-03-30")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4286,7 +4271,7 @@ def get_next(next_link=None): return ItemPaged(get_next, extract_data) def _power_off_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4397,7 +4382,7 @@ def get_long_running_output(pipeline_response): ) def _restart_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4507,7 +4492,7 @@ def get_long_running_output(pipeline_response): ) def _start_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4617,7 +4602,7 @@ def get_long_running_output(pipeline_response): ) def _redeploy_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4767,7 +4752,7 @@ def get( :rtype: ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4846,7 +4831,7 @@ def list( :rtype: list[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4907,7 +4892,7 @@ def list_offers( :rtype: list[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4959,7 +4944,7 @@ def list_publishers(self, location: str, **kwargs: Any) -> List[_models.VirtualM :rtype: list[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5016,7 +5001,7 @@ def list_skus( :rtype: list[~azure.mgmt.compute.v2016_03_30.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5097,7 +5082,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.Usage"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-03-30")) cls: ClsType[_models.ListUsagesResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5195,7 +5180,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.VirtualMachine api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-03-30")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5284,7 +5269,7 @@ def _create_or_update_initial( parameters: Union[_models.VirtualMachineScaleSet, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5470,7 +5455,7 @@ def get_long_running_output(pipeline_response): ) def _delete_initial(self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5589,7 +5574,7 @@ def get(self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) - :rtype: ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5638,7 +5623,7 @@ def _deallocate_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5845,7 +5830,7 @@ def _delete_instances_initial( vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6050,7 +6035,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSetInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6110,7 +6095,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Vir api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-03-30")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6189,7 +6174,7 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.VirtualMachineScaleSet"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-03-30")) cls: ClsType[_models.VirtualMachineScaleSetListWithLinkResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6272,7 +6257,7 @@ def list_skus( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-03-30")) cls: ClsType[_models.VirtualMachineScaleSetListSkusResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6341,7 +6326,7 @@ def _power_off_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6548,7 +6533,7 @@ def _restart_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6749,7 +6734,7 @@ def _start_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6950,7 +6935,7 @@ def _update_instances_initial( vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7142,7 +7127,7 @@ def get_long_running_output(pipeline_response): ) def _reimage_initial(self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7275,7 +7260,7 @@ def __init__(self, *args, **kwargs): def _reimage_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7391,7 +7376,7 @@ def get_long_running_output(pipeline_response): def _deallocate_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7509,7 +7494,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7636,7 +7621,7 @@ def get( :rtype: ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSetVM :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7695,7 +7680,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2016_03_30.models.VirtualMachineScaleSetVMInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7777,7 +7762,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2016-03-30")) cls: ClsType[_models.VirtualMachineScaleSetVMListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7845,7 +7830,7 @@ def get_next(next_link=None): def _power_off_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7963,7 +7948,7 @@ def get_long_running_output(pipeline_response): def _restart_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8079,7 +8064,7 @@ def get_long_running_output(pipeline_response): def _start_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/__init__.py index 3b1b6244b2375..ab7c46e8991db 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/__init__.py @@ -5,15 +5,21 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._compute_management_client import ComputeManagementClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._compute_management_client import ComputeManagementClient # 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__ = [ "ComputeManagementClient", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/_compute_management_client.py index 696699cc226e0..eb67e78b0bab0 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/_compute_management_client.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/_compute_management_client.py @@ -34,11 +34,10 @@ ) if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class ComputeManagementClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes +class ComputeManagementClient: # pylint: disable=too-many-instance-attributes """Compute Client. :ivar availability_sets: AvailabilitySetsOperations operations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/_configuration.py index 44542c23cb775..bf38c82db0d69 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/_configuration.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/_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 ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ComputeManagementClient. Note that all parameters used to create this instance are saved as instance diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/_version.py index d79b2760319c5..e5754a47ce68f 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "33.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/aio/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/aio/__init__.py index 0715f50185586..d3fd1ba93379a 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/aio/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/aio/__init__.py @@ -5,12 +5,18 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._compute_management_client import ComputeManagementClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._compute_management_client import ComputeManagementClient # 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__ = [ "ComputeManagementClient", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/aio/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/aio/_compute_management_client.py index 494f04bffba65..810244f608b42 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/aio/_compute_management_client.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/aio/_compute_management_client.py @@ -34,11 +34,10 @@ ) if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class ComputeManagementClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes +class ComputeManagementClient: # pylint: disable=too-many-instance-attributes """Compute Client. :ivar availability_sets: AvailabilitySetsOperations operations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/aio/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/aio/_configuration.py index e0d000aef7ba6..6b7083733a344 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/aio/_configuration.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/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 ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ComputeManagementClient. Note that all parameters used to create this instance are saved as instance diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/aio/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/aio/operations/__init__.py index dcbf90d3ca028..06a5563aec30d 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/aio/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/aio/operations/__init__.py @@ -5,22 +5,28 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._operations import AvailabilitySetsOperations -from ._operations import VirtualMachineExtensionImagesOperations -from ._operations import VirtualMachineExtensionsOperations -from ._operations import VirtualMachinesOperations -from ._operations import VirtualMachineImagesOperations -from ._operations import UsageOperations -from ._operations import VirtualMachineSizesOperations -from ._operations import ImagesOperations -from ._operations import VirtualMachineScaleSetsOperations -from ._operations import VirtualMachineScaleSetVMsOperations -from ._operations import DisksOperations -from ._operations import SnapshotsOperations +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._operations import AvailabilitySetsOperations # type: ignore +from ._operations import VirtualMachineExtensionImagesOperations # type: ignore +from ._operations import VirtualMachineExtensionsOperations # type: ignore +from ._operations import VirtualMachinesOperations # type: ignore +from ._operations import VirtualMachineImagesOperations # type: ignore +from ._operations import UsageOperations # type: ignore +from ._operations import VirtualMachineSizesOperations # type: ignore +from ._operations import ImagesOperations # type: ignore +from ._operations import VirtualMachineScaleSetsOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMsOperations # type: ignore +from ._operations import DisksOperations # type: ignore +from ._operations import SnapshotsOperations # 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__ = [ @@ -37,5 +43,5 @@ "DisksOperations", "SnapshotsOperations", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/aio/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/aio/operations/_operations.py index fbd181e38ff4a..00c8df37890c4 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/aio/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/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. @@ -18,7 +18,6 @@ List, Literal, Optional, - Type, TypeVar, Union, cast, @@ -134,7 +133,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]] @@ -228,7 +227,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2016_04_30_preview.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -298,7 +297,7 @@ async def delete( :rtype: ~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -356,7 +355,7 @@ async def get(self, resource_group_name: str, availability_set_name: str, **kwar :rtype: ~azure.mgmt.compute.v2016_04_30_preview.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -417,7 +416,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Availabi ) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -496,7 +495,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model ) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -581,7 +580,7 @@ def list_available_sizes( ) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -682,7 +681,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineExtensionImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -742,7 +741,7 @@ async def list_types( :rtype: list[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -816,7 +815,7 @@ async def list_versions( :rtype: list[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -893,7 +892,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineExtension, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1108,7 +1107,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineExtensionUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1318,7 +1317,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_name: str, vm_extension_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1458,7 +1457,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1541,7 +1540,7 @@ async def get_extensions( :rtype: ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1593,7 +1592,7 @@ async def _capture_initial( parameters: Union[_models.VirtualMachineCaptureParameters, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1797,7 +1796,7 @@ async def _create_or_update_initial( parameters: Union[_models.VirtualMachine, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1987,7 +1986,7 @@ def get_long_running_output(pipeline_response): ) async def _delete_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2115,7 +2114,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachine :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2163,7 +2162,7 @@ async def get( async def _convert_to_managed_disks_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2279,7 +2278,7 @@ def get_long_running_output(pipeline_response): ) async def _deallocate_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2408,7 +2407,7 @@ async def generalize( :rtype: ~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2472,7 +2471,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model ) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2551,7 +2550,7 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.VirtualMachine"]: ) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2635,7 +2634,7 @@ def list_available_sizes( ) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2698,7 +2697,7 @@ async def get_next(next_link=None): return AsyncItemPaged(get_next, extract_data) async def _power_off_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2814,7 +2813,7 @@ def get_long_running_output(pipeline_response): ) async def _restart_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2929,7 +2928,7 @@ def get_long_running_output(pipeline_response): ) async def _start_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3044,7 +3043,7 @@ def get_long_running_output(pipeline_response): ) async def _redeploy_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3199,7 +3198,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3280,7 +3279,7 @@ async def list( :rtype: list[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3343,7 +3342,7 @@ async def list_offers( :rtype: list[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3397,7 +3396,7 @@ async def list_publishers(self, location: str, **kwargs: Any) -> List[_models.Vi :rtype: list[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3456,7 +3455,7 @@ async def list_skus( :rtype: list[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3542,7 +3541,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.Usage"]: ) cls: ClsType[_models.ListUsagesResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3643,7 +3642,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.VirtualMa ) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3728,7 +3727,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, image_name: str, parameters: Union[_models.Image, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3911,7 +3910,7 @@ def get_long_running_output(pipeline_response): ) async def _delete_initial(self, resource_group_name: str, image_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4038,7 +4037,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2016_04_30_preview.models.Image :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4102,7 +4101,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy ) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4181,7 +4180,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Image"]: ) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4269,7 +4268,7 @@ async def _create_or_update_initial( parameters: Union[_models.VirtualMachineScaleSet, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4462,7 +4461,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4587,7 +4586,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4638,7 +4637,7 @@ async def _deallocate_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4850,7 +4849,7 @@ async def _delete_instances_initial( vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5061,7 +5060,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5125,7 +5124,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model ) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5206,7 +5205,7 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.VirtualMachineScaleS ) cls: ClsType[_models.VirtualMachineScaleSetListWithLinkResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5270,6 +5269,7 @@ async def get_next(next_link=None): def list_skus( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> AsyncIterable["_models.VirtualMachineScaleSetSku"]: + # pylint: disable=line-too-long """Gets a list of SKUs available for your VM scale set, including the minimum and maximum VM instances allowed for each SKU. @@ -5291,7 +5291,7 @@ def list_skus( ) cls: ClsType[_models.VirtualMachineScaleSetListSkusResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5360,7 +5360,7 @@ async def _power_off_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5572,7 +5572,7 @@ async def _restart_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5778,7 +5778,7 @@ async def _start_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5984,7 +5984,7 @@ async def _update_instances_initial( vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6184,7 +6184,7 @@ def get_long_running_output(pipeline_response): async def _reimage_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6301,7 +6301,7 @@ def get_long_running_output(pipeline_response): async def _reimage_all_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6440,7 +6440,7 @@ def __init__(self, *args, **kwargs) -> None: async def _reimage_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6561,7 +6561,7 @@ def get_long_running_output(pipeline_response): async def _reimage_all_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6683,7 +6683,7 @@ def get_long_running_output(pipeline_response): async def _deallocate_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6806,7 +6806,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6937,7 +6937,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetVM :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6998,7 +6998,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetVMInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7054,6 +7054,7 @@ def list( expand: Optional[str] = None, **kwargs: Any ) -> AsyncIterable["_models.VirtualMachineScaleSetVM"]: + # pylint: disable=line-too-long """Gets a list of all virtual machines in a VM scale sets. :param resource_group_name: The name of the resource group. Required. @@ -7080,7 +7081,7 @@ def list( ) cls: ClsType[_models.VirtualMachineScaleSetVMListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7148,7 +7149,7 @@ async def get_next(next_link=None): async def _power_off_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7271,7 +7272,7 @@ def get_long_running_output(pipeline_response): async def _restart_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7392,7 +7393,7 @@ def get_long_running_output(pipeline_response): async def _start_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7534,7 +7535,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.Disk, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7722,7 +7723,7 @@ def get_long_running_output(pipeline_response): async def _update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.DiskUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7921,7 +7922,7 @@ async def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.compute.v2016_04_30_preview.models.Disk :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7966,7 +7967,7 @@ async def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> return deserialized # type: ignore async def _delete_initial(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8098,7 +8099,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy ) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8176,7 +8177,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Disk"]: ) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8243,7 +8244,7 @@ async def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8444,7 +8445,7 @@ def get_long_running_output(pipeline_response): async def _revoke_access_initial( self, resource_group_name: str, disk_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8584,7 +8585,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, snapshot_name: str, snapshot: Union[_models.Snapshot, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8779,7 +8780,7 @@ async def _update_initial( snapshot: Union[_models.SnapshotUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8986,7 +8987,7 @@ async def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) :rtype: ~azure.mgmt.compute.v2016_04_30_preview.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9033,7 +9034,7 @@ async def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) async def _delete_initial( self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9164,7 +9165,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy ) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9242,7 +9243,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Snapshot"]: ) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9309,7 +9310,7 @@ async def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9507,7 +9508,7 @@ def get_long_running_output(pipeline_response): async def _revoke_access_initial( self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/__init__.py index ed24cfe48839d..4df5c92a38fe0 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/__init__.py @@ -5,135 +5,146 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._models_py3 import AccessUri -from ._models_py3 import AdditionalUnattendContent -from ._models_py3 import ApiEntityReference -from ._models_py3 import ApiError -from ._models_py3 import ApiErrorBase -from ._models_py3 import AvailabilitySet -from ._models_py3 import AvailabilitySetListResult -from ._models_py3 import BootDiagnostics -from ._models_py3 import BootDiagnosticsInstanceView -from ._models_py3 import ComputeLongRunningOperationProperties -from ._models_py3 import CreationData -from ._models_py3 import DataDisk -from ._models_py3 import DataDiskImage -from ._models_py3 import DiagnosticsProfile -from ._models_py3 import Disk -from ._models_py3 import DiskEncryptionSettings -from ._models_py3 import DiskInstanceView -from ._models_py3 import DiskList -from ._models_py3 import DiskUpdate -from ._models_py3 import EncryptionSettings -from ._models_py3 import GrantAccessData -from ._models_py3 import HardwareProfile -from ._models_py3 import Image -from ._models_py3 import ImageDataDisk -from ._models_py3 import ImageDiskReference -from ._models_py3 import ImageListResult -from ._models_py3 import ImageOSDisk -from ._models_py3 import ImageReference -from ._models_py3 import ImageStorageProfile -from ._models_py3 import InnerError -from ._models_py3 import InstanceViewStatus -from ._models_py3 import KeyVaultAndKeyReference -from ._models_py3 import KeyVaultAndSecretReference -from ._models_py3 import KeyVaultKeyReference -from ._models_py3 import KeyVaultSecretReference -from ._models_py3 import LinuxConfiguration -from ._models_py3 import ListUsagesResult -from ._models_py3 import ManagedDiskParameters -from ._models_py3 import NetworkInterfaceReference -from ._models_py3 import NetworkProfile -from ._models_py3 import OSDisk -from ._models_py3 import OSDiskImage -from ._models_py3 import OSProfile -from ._models_py3 import OperationStatusResponse -from ._models_py3 import Plan -from ._models_py3 import PurchasePlan -from ._models_py3 import Resource -from ._models_py3 import ResourceUpdate -from ._models_py3 import Sku -from ._models_py3 import Snapshot -from ._models_py3 import SnapshotList -from ._models_py3 import SnapshotUpdate -from ._models_py3 import SourceVault -from ._models_py3 import SshConfiguration -from ._models_py3 import SshPublicKey -from ._models_py3 import StorageProfile -from ._models_py3 import SubResource -from ._models_py3 import SubResourceReadOnly -from ._models_py3 import UpdateResource -from ._models_py3 import UpgradePolicy -from ._models_py3 import Usage -from ._models_py3 import UsageName -from ._models_py3 import VaultCertificate -from ._models_py3 import VaultSecretGroup -from ._models_py3 import VirtualHardDisk -from ._models_py3 import VirtualMachine -from ._models_py3 import VirtualMachineAgentInstanceView -from ._models_py3 import VirtualMachineCaptureParameters -from ._models_py3 import VirtualMachineCaptureResult -from ._models_py3 import VirtualMachineExtension -from ._models_py3 import VirtualMachineExtensionHandlerInstanceView -from ._models_py3 import VirtualMachineExtensionImage -from ._models_py3 import VirtualMachineExtensionInstanceView -from ._models_py3 import VirtualMachineExtensionUpdate -from ._models_py3 import VirtualMachineExtensionsListResult -from ._models_py3 import VirtualMachineIdentity -from ._models_py3 import VirtualMachineImage -from ._models_py3 import VirtualMachineImageResource -from ._models_py3 import VirtualMachineInstanceView -from ._models_py3 import VirtualMachineListResult -from ._models_py3 import VirtualMachineScaleSet -from ._models_py3 import VirtualMachineScaleSetDataDisk -from ._models_py3 import VirtualMachineScaleSetExtension -from ._models_py3 import VirtualMachineScaleSetExtensionProfile -from ._models_py3 import VirtualMachineScaleSetIPConfiguration -from ._models_py3 import VirtualMachineScaleSetIdentity -from ._models_py3 import VirtualMachineScaleSetInstanceView -from ._models_py3 import VirtualMachineScaleSetInstanceViewStatusesSummary -from ._models_py3 import VirtualMachineScaleSetListResult -from ._models_py3 import VirtualMachineScaleSetListSkusResult -from ._models_py3 import VirtualMachineScaleSetListWithLinkResult -from ._models_py3 import VirtualMachineScaleSetManagedDiskParameters -from ._models_py3 import VirtualMachineScaleSetNetworkConfiguration -from ._models_py3 import VirtualMachineScaleSetNetworkProfile -from ._models_py3 import VirtualMachineScaleSetOSDisk -from ._models_py3 import VirtualMachineScaleSetOSProfile -from ._models_py3 import VirtualMachineScaleSetSku -from ._models_py3 import VirtualMachineScaleSetSkuCapacity -from ._models_py3 import VirtualMachineScaleSetStorageProfile -from ._models_py3 import VirtualMachineScaleSetVM -from ._models_py3 import VirtualMachineScaleSetVMExtensionsSummary -from ._models_py3 import VirtualMachineScaleSetVMInstanceIDs -from ._models_py3 import VirtualMachineScaleSetVMInstanceRequiredIDs -from ._models_py3 import VirtualMachineScaleSetVMInstanceView -from ._models_py3 import VirtualMachineScaleSetVMListResult -from ._models_py3 import VirtualMachineScaleSetVMProfile -from ._models_py3 import VirtualMachineSize -from ._models_py3 import VirtualMachineSizeListResult -from ._models_py3 import VirtualMachineStatusCodeCount -from ._models_py3 import WinRMConfiguration -from ._models_py3 import WinRMListener -from ._models_py3 import WindowsConfiguration +from typing import TYPE_CHECKING -from ._compute_management_client_enums import AccessLevel -from ._compute_management_client_enums import CachingTypes -from ._compute_management_client_enums import DiskCreateOption -from ._compute_management_client_enums import DiskCreateOptionTypes -from ._compute_management_client_enums import OperatingSystemStateTypes -from ._compute_management_client_enums import OperatingSystemTypes -from ._compute_management_client_enums import ProtocolTypes -from ._compute_management_client_enums import SettingNames -from ._compute_management_client_enums import StatusLevelTypes -from ._compute_management_client_enums import StorageAccountTypes -from ._compute_management_client_enums import UpgradeMode -from ._compute_management_client_enums import VirtualMachineScaleSetSkuScaleType -from ._compute_management_client_enums import VirtualMachineSizeTypes +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + + +from ._models_py3 import ( # type: ignore + AccessUri, + AdditionalUnattendContent, + ApiEntityReference, + ApiError, + ApiErrorBase, + AvailabilitySet, + AvailabilitySetListResult, + BootDiagnostics, + BootDiagnosticsInstanceView, + ComputeLongRunningOperationProperties, + CreationData, + DataDisk, + DataDiskImage, + DiagnosticsProfile, + Disk, + DiskEncryptionSettings, + DiskInstanceView, + DiskList, + DiskUpdate, + EncryptionSettings, + GrantAccessData, + HardwareProfile, + Image, + ImageDataDisk, + ImageDiskReference, + ImageListResult, + ImageOSDisk, + ImageReference, + ImageStorageProfile, + InnerError, + InstanceViewStatus, + KeyVaultAndKeyReference, + KeyVaultAndSecretReference, + KeyVaultKeyReference, + KeyVaultSecretReference, + LinuxConfiguration, + ListUsagesResult, + ManagedDiskParameters, + NetworkInterfaceReference, + NetworkProfile, + OSDisk, + OSDiskImage, + OSProfile, + OperationStatusResponse, + Plan, + PurchasePlan, + Resource, + ResourceUpdate, + Sku, + Snapshot, + SnapshotList, + SnapshotUpdate, + SourceVault, + SshConfiguration, + SshPublicKey, + StorageProfile, + SubResource, + SubResourceReadOnly, + UpdateResource, + UpgradePolicy, + Usage, + UsageName, + VaultCertificate, + VaultSecretGroup, + VirtualHardDisk, + VirtualMachine, + VirtualMachineAgentInstanceView, + VirtualMachineCaptureParameters, + VirtualMachineCaptureResult, + VirtualMachineExtension, + VirtualMachineExtensionHandlerInstanceView, + VirtualMachineExtensionImage, + VirtualMachineExtensionInstanceView, + VirtualMachineExtensionUpdate, + VirtualMachineExtensionsListResult, + VirtualMachineIdentity, + VirtualMachineImage, + VirtualMachineImageResource, + VirtualMachineInstanceView, + VirtualMachineListResult, + VirtualMachineScaleSet, + VirtualMachineScaleSetDataDisk, + VirtualMachineScaleSetExtension, + VirtualMachineScaleSetExtensionProfile, + VirtualMachineScaleSetIPConfiguration, + VirtualMachineScaleSetIdentity, + VirtualMachineScaleSetInstanceView, + VirtualMachineScaleSetInstanceViewStatusesSummary, + VirtualMachineScaleSetListResult, + VirtualMachineScaleSetListSkusResult, + VirtualMachineScaleSetListWithLinkResult, + VirtualMachineScaleSetManagedDiskParameters, + VirtualMachineScaleSetNetworkConfiguration, + VirtualMachineScaleSetNetworkProfile, + VirtualMachineScaleSetOSDisk, + VirtualMachineScaleSetOSProfile, + VirtualMachineScaleSetSku, + VirtualMachineScaleSetSkuCapacity, + VirtualMachineScaleSetStorageProfile, + VirtualMachineScaleSetVM, + VirtualMachineScaleSetVMExtensionsSummary, + VirtualMachineScaleSetVMInstanceIDs, + VirtualMachineScaleSetVMInstanceRequiredIDs, + VirtualMachineScaleSetVMInstanceView, + VirtualMachineScaleSetVMListResult, + VirtualMachineScaleSetVMProfile, + VirtualMachineSize, + VirtualMachineSizeListResult, + VirtualMachineStatusCodeCount, + WinRMConfiguration, + WinRMListener, + WindowsConfiguration, +) + +from ._compute_management_client_enums import ( # type: ignore + AccessLevel, + CachingTypes, + DiskCreateOption, + DiskCreateOptionTypes, + OperatingSystemStateTypes, + OperatingSystemTypes, + ProtocolTypes, + SettingNames, + StatusLevelTypes, + StorageAccountTypes, + UpgradeMode, + VirtualMachineScaleSetSkuScaleType, + VirtualMachineSizeTypes, +) 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__ = [ @@ -263,5 +274,5 @@ "VirtualMachineScaleSetSkuScaleType", "VirtualMachineSizeTypes", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/_models_py3.py index d5df626a0c649..12853a378a78f 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/_models_py3.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/_models_py3.py @@ -1,5 +1,5 @@ -# 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. @@ -16,10 +16,9 @@ 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 if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object @@ -265,7 +264,7 @@ def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kw self.tags = tags -class AvailabilitySet(Resource): # pylint: disable=too-many-instance-attributes +class AvailabilitySet(Resource): """Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see `Manage the @@ -718,7 +717,7 @@ def __init__(self, *, boot_diagnostics: Optional["_models.BootDiagnostics"] = No self.boot_diagnostics = boot_diagnostics -class Disk(Resource): # pylint: disable=too-many-instance-attributes +class Disk(Resource): """Disk resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -2505,7 +2504,7 @@ def __init__( self.capacity = capacity -class Snapshot(Resource): # pylint: disable=too-many-instance-attributes +class Snapshot(Resource): """Snapshot resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -3116,7 +3115,7 @@ def __init__(self, *, uri: Optional[str] = None, **kwargs: Any) -> None: self.uri = uri -class VirtualMachine(Resource): # pylint: disable=too-many-instance-attributes +class VirtualMachine(Resource): """Describes a Virtual Machine. Variables are only populated by the server, and will be ignored when sending a request. @@ -3411,7 +3410,7 @@ def __init__( self.output = output -class VirtualMachineExtension(Resource): # pylint: disable=too-many-instance-attributes +class VirtualMachineExtension(Resource): """Describes a Virtual Machine Extension. Variables are only populated by the server, and will be ignored when sending a request. @@ -4111,7 +4110,7 @@ def __init__( self.next_link = next_link -class VirtualMachineScaleSet(Resource): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSet(Resource): """Describes a Virtual Machine Scale Set. Variables are only populated by the server, and will be ignored when sending a request. @@ -5172,7 +5171,7 @@ def __init__( self.data_disks = data_disks -class VirtualMachineScaleSetVM(Resource): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetVM(Resource): """Describes a virtual machine scale set virtual machine. Variables are only populated by the server, and will be ignored when sending a request. diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/__init__.py index dcbf90d3ca028..06a5563aec30d 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/__init__.py @@ -5,22 +5,28 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._operations import AvailabilitySetsOperations -from ._operations import VirtualMachineExtensionImagesOperations -from ._operations import VirtualMachineExtensionsOperations -from ._operations import VirtualMachinesOperations -from ._operations import VirtualMachineImagesOperations -from ._operations import UsageOperations -from ._operations import VirtualMachineSizesOperations -from ._operations import ImagesOperations -from ._operations import VirtualMachineScaleSetsOperations -from ._operations import VirtualMachineScaleSetVMsOperations -from ._operations import DisksOperations -from ._operations import SnapshotsOperations +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._operations import AvailabilitySetsOperations # type: ignore +from ._operations import VirtualMachineExtensionImagesOperations # type: ignore +from ._operations import VirtualMachineExtensionsOperations # type: ignore +from ._operations import VirtualMachinesOperations # type: ignore +from ._operations import VirtualMachineImagesOperations # type: ignore +from ._operations import UsageOperations # type: ignore +from ._operations import VirtualMachineSizesOperations # type: ignore +from ._operations import ImagesOperations # type: ignore +from ._operations import VirtualMachineScaleSetsOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMsOperations # type: ignore +from ._operations import DisksOperations # type: ignore +from ._operations import SnapshotsOperations # 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__ = [ @@ -37,5 +43,5 @@ "DisksOperations", "SnapshotsOperations", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/_operations.py index 8d26b7271d35e..188d6d95f66df 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/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. @@ -8,22 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import ( - Any, - Callable, - Dict, - IO, - Iterable, - Iterator, - List, - Literal, - Optional, - Type, - TypeVar, - Union, - cast, - overload, -) +from typing import Any, Callable, Dict, IO, Iterable, Iterator, List, Literal, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -51,7 +36,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, HttpResponse], T, Dict[str, Any]], Any]] @@ -2745,7 +2730,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2016_04_30_preview.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2815,7 +2800,7 @@ def delete( :rtype: ~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2873,7 +2858,7 @@ def get(self, resource_group_name: str, availability_set_name: str, **kwargs: An :rtype: ~azure.mgmt.compute.v2016_04_30_preview.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2934,7 +2919,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.AvailabilityS ) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3013,7 +2998,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Ava ) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3098,7 +3083,7 @@ def list_available_sizes( ) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3199,7 +3184,7 @@ def get( :rtype: ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineExtensionImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3259,7 +3244,7 @@ def list_types( :rtype: list[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3333,7 +3318,7 @@ def list_versions( :rtype: list[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3410,7 +3395,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineExtension, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3625,7 +3610,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineExtensionUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3835,7 +3820,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_name: str, vm_extension_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3975,7 +3960,7 @@ def get( :rtype: ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4058,7 +4043,7 @@ def get_extensions( :rtype: ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4110,7 +4095,7 @@ def _capture_initial( parameters: Union[_models.VirtualMachineCaptureParameters, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4313,7 +4298,7 @@ def _create_or_update_initial( parameters: Union[_models.VirtualMachine, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4503,7 +4488,7 @@ def get_long_running_output(pipeline_response): ) def _delete_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4631,7 +4616,7 @@ def get( :rtype: ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachine :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4679,7 +4664,7 @@ def get( def _convert_to_managed_disks_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4794,7 +4779,7 @@ def get_long_running_output(pipeline_response): ) def _deallocate_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4920,7 +4905,7 @@ def generalize(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> _ :rtype: ~azure.mgmt.compute.v2016_04_30_preview.models.OperationStatusResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4984,7 +4969,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Vir ) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5063,7 +5048,7 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.VirtualMachine"]: ) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5147,7 +5132,7 @@ def list_available_sizes( ) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5210,7 +5195,7 @@ def get_next(next_link=None): return ItemPaged(get_next, extract_data) def _power_off_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5325,7 +5310,7 @@ def get_long_running_output(pipeline_response): ) def _restart_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5439,7 +5424,7 @@ def get_long_running_output(pipeline_response): ) def _start_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5553,7 +5538,7 @@ def get_long_running_output(pipeline_response): ) def _redeploy_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5707,7 +5692,7 @@ def get( :rtype: ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5788,7 +5773,7 @@ def list( :rtype: list[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5851,7 +5836,7 @@ def list_offers( :rtype: list[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5905,7 +5890,7 @@ def list_publishers(self, location: str, **kwargs: Any) -> List[_models.VirtualM :rtype: list[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5964,7 +5949,7 @@ def list_skus( :rtype: list[~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6049,7 +6034,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.Usage"]: ) cls: ClsType[_models.ListUsagesResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6150,7 +6135,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.VirtualMachine ) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6235,7 +6220,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, image_name: str, parameters: Union[_models.Image, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6415,7 +6400,7 @@ def get_long_running_output(pipeline_response): ) def _delete_initial(self, resource_group_name: str, image_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6542,7 +6527,7 @@ def get( :rtype: ~azure.mgmt.compute.v2016_04_30_preview.models.Image :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6605,7 +6590,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite ) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6683,7 +6668,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Image"]: ) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6771,7 +6756,7 @@ def _create_or_update_initial( parameters: Union[_models.VirtualMachineScaleSet, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6962,7 +6947,7 @@ def get_long_running_output(pipeline_response): ) def _delete_initial(self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7085,7 +7070,7 @@ def get(self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) - :rtype: ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7136,7 +7121,7 @@ def _deallocate_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7347,7 +7332,7 @@ def _delete_instances_initial( vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7557,7 +7542,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7621,7 +7606,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Vir ) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7702,7 +7687,7 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.VirtualMachineScaleSet"]: ) cls: ClsType[_models.VirtualMachineScaleSetListWithLinkResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7787,7 +7772,7 @@ def list_skus( ) cls: ClsType[_models.VirtualMachineScaleSetListSkusResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7856,7 +7841,7 @@ def _power_off_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8067,7 +8052,7 @@ def _restart_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8272,7 +8257,7 @@ def _start_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8477,7 +8462,7 @@ def _update_instances_initial( vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8674,7 +8659,7 @@ def get_long_running_output(pipeline_response): ) def _reimage_initial(self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8788,7 +8773,7 @@ def get_long_running_output(pipeline_response): ) def _reimage_all_initial(self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8926,7 +8911,7 @@ def __init__(self, *args, **kwargs): def _reimage_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9046,7 +9031,7 @@ def get_long_running_output(pipeline_response): def _reimage_all_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9167,7 +9152,7 @@ def get_long_running_output(pipeline_response): def _deallocate_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9289,7 +9274,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9420,7 +9405,7 @@ def get( :rtype: ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetVM :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9481,7 +9466,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2016_04_30_preview.models.VirtualMachineScaleSetVMInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9563,7 +9548,7 @@ def list( ) cls: ClsType[_models.VirtualMachineScaleSetVMListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9631,7 +9616,7 @@ def get_next(next_link=None): def _power_off_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9753,7 +9738,7 @@ def get_long_running_output(pipeline_response): def _restart_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9873,7 +9858,7 @@ def get_long_running_output(pipeline_response): def _start_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10014,7 +9999,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.Disk, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10202,7 +10187,7 @@ def get_long_running_output(pipeline_response): def _update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.DiskUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10401,7 +10386,7 @@ def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> _model :rtype: ~azure.mgmt.compute.v2016_04_30_preview.models.Disk :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10446,7 +10431,7 @@ def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> _model return deserialized # type: ignore def _delete_initial(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10577,7 +10562,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite ) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10654,7 +10639,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Disk"]: ) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10721,7 +10706,7 @@ def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10914,7 +10899,7 @@ def get_long_running_output(pipeline_response): ) def _revoke_access_initial(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11053,7 +11038,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, snapshot_name: str, snapshot: Union[_models.Snapshot, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11242,7 +11227,7 @@ def _update_initial( snapshot: Union[_models.SnapshotUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11443,7 +11428,7 @@ def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> _m :rtype: ~azure.mgmt.compute.v2016_04_30_preview.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11488,7 +11473,7 @@ def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> _m return deserialized # type: ignore def _delete_initial(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11618,7 +11603,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite ) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11695,7 +11680,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Snapshot"]: ) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11762,7 +11747,7 @@ def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11952,7 +11937,7 @@ def get_long_running_output(pipeline_response): ) def _revoke_access_initial(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/__init__.py index 3b1b6244b2375..ab7c46e8991db 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/__init__.py @@ -5,15 +5,21 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._compute_management_client import ComputeManagementClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._compute_management_client import ComputeManagementClient # 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__ = [ "ComputeManagementClient", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/_compute_management_client.py index ef6c8c7db87e6..645c28ba3c188 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/_compute_management_client.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/_compute_management_client.py @@ -38,11 +38,10 @@ ) if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class ComputeManagementClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes +class ComputeManagementClient: # pylint: disable=too-many-instance-attributes """Compute Client. :ivar availability_sets: AvailabilitySetsOperations operations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/_configuration.py index f671d3751f1f9..3c64a9cb36028 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/_configuration.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/_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 ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ComputeManagementClient. Note that all parameters used to create this instance are saved as instance diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/_version.py index d79b2760319c5..e5754a47ce68f 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "33.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/aio/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/aio/__init__.py index 0715f50185586..d3fd1ba93379a 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/aio/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/aio/__init__.py @@ -5,12 +5,18 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._compute_management_client import ComputeManagementClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._compute_management_client import ComputeManagementClient # 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__ = [ "ComputeManagementClient", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/aio/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/aio/_compute_management_client.py index d9e7b5387c3f3..7b73d0fb2f164 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/aio/_compute_management_client.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/aio/_compute_management_client.py @@ -38,11 +38,10 @@ ) if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class ComputeManagementClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes +class ComputeManagementClient: # pylint: disable=too-many-instance-attributes """Compute Client. :ivar availability_sets: AvailabilitySetsOperations operations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/aio/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/aio/_configuration.py index c4fdc4007e7ab..43d1f48aa1149 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/aio/_configuration.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/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 ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ComputeManagementClient. Note that all parameters used to create this instance are saved as instance diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/aio/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/aio/operations/__init__.py index 894b867ca9cdd..8e2dbe1731a13 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/aio/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/aio/operations/__init__.py @@ -5,26 +5,32 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._operations import AvailabilitySetsOperations -from ._operations import VirtualMachineExtensionImagesOperations -from ._operations import VirtualMachineExtensionsOperations -from ._operations import VirtualMachinesOperations -from ._operations import VirtualMachineImagesOperations -from ._operations import UsageOperations -from ._operations import VirtualMachineSizesOperations -from ._operations import ImagesOperations -from ._operations import ResourceSkusOperations -from ._operations import VirtualMachineScaleSetsOperations -from ._operations import VirtualMachineScaleSetExtensionsOperations -from ._operations import VirtualMachineScaleSetRollingUpgradesOperations -from ._operations import VirtualMachineScaleSetVMsOperations -from ._operations import DisksOperations -from ._operations import SnapshotsOperations -from ._operations import VirtualMachineRunCommandsOperations +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._operations import AvailabilitySetsOperations # type: ignore +from ._operations import VirtualMachineExtensionImagesOperations # type: ignore +from ._operations import VirtualMachineExtensionsOperations # type: ignore +from ._operations import VirtualMachinesOperations # type: ignore +from ._operations import VirtualMachineImagesOperations # type: ignore +from ._operations import UsageOperations # type: ignore +from ._operations import VirtualMachineSizesOperations # type: ignore +from ._operations import ImagesOperations # type: ignore +from ._operations import ResourceSkusOperations # type: ignore +from ._operations import VirtualMachineScaleSetsOperations # type: ignore +from ._operations import VirtualMachineScaleSetExtensionsOperations # type: ignore +from ._operations import VirtualMachineScaleSetRollingUpgradesOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMsOperations # type: ignore +from ._operations import DisksOperations # type: ignore +from ._operations import SnapshotsOperations # type: ignore +from ._operations import VirtualMachineRunCommandsOperations # 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__ = [ @@ -45,5 +51,5 @@ "SnapshotsOperations", "VirtualMachineRunCommandsOperations", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/aio/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/aio/operations/_operations.py index 079fa2ba418c9..256ed581749c8 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/aio/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/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. @@ -18,7 +18,6 @@ List, Literal, Optional, - Type, TypeVar, Union, cast, @@ -149,7 +148,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]] @@ -247,7 +246,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2017_03_30.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -315,7 +314,7 @@ async def delete( :rtype: ~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -371,7 +370,7 @@ async def get(self, resource_group_name: str, availability_set_name: str, **kwar :rtype: ~azure.mgmt.compute.v2017_03_30.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -433,7 +432,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-03-30")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -511,7 +510,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-03-30")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -594,7 +593,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-03-30")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -695,7 +694,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineExtensionImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -753,7 +752,7 @@ async def list_types( :rtype: list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -825,7 +824,7 @@ async def list_versions( :rtype: list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -900,7 +899,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineExtension, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1110,7 +1109,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineExtensionUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1316,7 +1315,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_name: str, vm_extension_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1452,7 +1451,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1533,7 +1532,7 @@ async def get_extensions( :rtype: ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1594,7 +1593,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> AsyncIterable["_mode api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-03-30")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1662,7 +1661,7 @@ async def _capture_initial( parameters: Union[_models.VirtualMachineCaptureParameters, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1861,7 +1860,7 @@ async def _create_or_update_initial( parameters: Union[_models.VirtualMachine, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2047,7 +2046,7 @@ def get_long_running_output(pipeline_response): ) async def _delete_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2171,7 +2170,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2017_03_30.models.VirtualMachine :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2228,7 +2227,7 @@ async def instance_view( :rtype: ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2273,7 +2272,7 @@ async def instance_view( async def _convert_to_managed_disks_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2385,7 +2384,7 @@ def get_long_running_output(pipeline_response): ) async def _deallocate_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2510,7 +2509,7 @@ async def generalize( :rtype: ~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2570,7 +2569,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-03-30")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2647,7 +2646,7 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.VirtualMachine"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-03-30")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2729,7 +2728,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-03-30")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2792,7 +2791,7 @@ async def get_next(next_link=None): return AsyncItemPaged(get_next, extract_data) async def _power_off_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2904,7 +2903,7 @@ def get_long_running_output(pipeline_response): ) async def _restart_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3015,7 +3014,7 @@ def get_long_running_output(pipeline_response): ) async def _start_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3126,7 +3125,7 @@ def get_long_running_output(pipeline_response): ) async def _redeploy_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3239,7 +3238,7 @@ def get_long_running_output(pipeline_response): async def _perform_maintenance_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3356,7 +3355,7 @@ async def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3585,7 +3584,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3664,7 +3663,7 @@ async def list( :rtype: list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3725,7 +3724,7 @@ async def list_offers( :rtype: list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3777,7 +3776,7 @@ async def list_publishers(self, location: str, **kwargs: Any) -> List[_models.Vi :rtype: list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3834,7 +3833,7 @@ async def list_skus( :rtype: list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3915,7 +3914,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.Usage"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-03-30")) cls: ClsType[_models.ListUsagesResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4014,7 +4013,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.VirtualMa api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-03-30")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4099,7 +4098,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, image_name: str, parameters: Union[_models.Image, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4275,7 +4274,7 @@ def get_long_running_output(pipeline_response): ) async def _delete_initial(self, resource_group_name: str, image_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4398,7 +4397,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2017_03_30.models.Image :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4457,7 +4456,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-03-30")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4533,7 +4532,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Image"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-03-30")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4629,7 +4628,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.ResourceSku"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-03-30")) cls: ClsType[_models.ResourceSkusResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4717,7 +4716,7 @@ async def _create_or_update_initial( parameters: Union[_models.VirtualMachineScaleSet, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4909,7 +4908,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineScaleSetUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5098,7 +5097,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5219,7 +5218,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5268,7 +5267,7 @@ async def _deallocate_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5476,7 +5475,7 @@ async def _delete_instances_initial( vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5682,7 +5681,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5742,7 +5741,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-03-30")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5821,7 +5820,7 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.VirtualMachineScaleS api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-03-30")) cls: ClsType[_models.VirtualMachineScaleSetListWithLinkResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5904,7 +5903,7 @@ def list_skus( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-03-30")) cls: ClsType[_models.VirtualMachineScaleSetListSkusResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5973,7 +5972,7 @@ async def _power_off_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6181,7 +6180,7 @@ async def _restart_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6383,7 +6382,7 @@ async def _start_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6585,7 +6584,7 @@ async def _update_instances_initial( vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6784,7 +6783,7 @@ async def _reimage_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6986,7 +6985,7 @@ async def _reimage_all_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7213,7 +7212,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtension, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7419,7 +7418,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, vmss_extension_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7555,7 +7554,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7621,7 +7620,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-03-30")) cls: ClsType[_models.VirtualMachineScaleSetExtensionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7707,7 +7706,7 @@ def __init__(self, *args, **kwargs) -> None: async def _cancel_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7820,7 +7819,7 @@ def get_long_running_output(pipeline_response): async def _start_os_upgrade_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7946,7 +7945,7 @@ async def get_latest( :rtype: ~azure.mgmt.compute.v2017_03_30.models.RollingUpgradeStatusInfo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8012,7 +8011,7 @@ def __init__(self, *args, **kwargs) -> None: async def _reimage_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8129,7 +8128,7 @@ def get_long_running_output(pipeline_response): async def _reimage_all_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8247,7 +8246,7 @@ def get_long_running_output(pipeline_response): async def _deallocate_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8366,7 +8365,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8493,7 +8492,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetVM :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8552,7 +8551,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetVMInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8634,7 +8633,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-03-30")) cls: ClsType[_models.VirtualMachineScaleSetVMListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8702,7 +8701,7 @@ async def get_next(next_link=None): async def _power_off_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8821,7 +8820,7 @@ def get_long_running_output(pipeline_response): async def _restart_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8938,7 +8937,7 @@ def get_long_running_output(pipeline_response): async def _start_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9076,7 +9075,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.Disk, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9260,7 +9259,7 @@ def get_long_running_output(pipeline_response): async def _update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.DiskUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9455,7 +9454,7 @@ async def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.compute.v2017_03_30.models.Disk :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9498,7 +9497,7 @@ async def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> return deserialized # type: ignore async def _delete_initial(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9623,7 +9622,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-03-30")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9698,7 +9697,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Disk"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-03-30")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9765,7 +9764,7 @@ async def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9958,7 +9957,7 @@ def get_long_running_output(pipeline_response): async def _revoke_access_initial( self, resource_group_name: str, disk_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10094,7 +10093,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, snapshot_name: str, snapshot: Union[_models.Snapshot, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10285,7 +10284,7 @@ async def _update_initial( snapshot: Union[_models.SnapshotUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10489,7 +10488,7 @@ async def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) :rtype: ~azure.mgmt.compute.v2017_03_30.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10534,7 +10533,7 @@ async def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) async def _delete_initial( self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10660,7 +10659,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-03-30")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10736,7 +10735,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Snapshot"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-03-30")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10803,7 +10802,7 @@ async def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10996,7 +10995,7 @@ def get_long_running_output(pipeline_response): async def _revoke_access_initial( self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11147,7 +11146,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.RunComman api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-03-30")) cls: ClsType[_models.RunCommandListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11220,7 +11219,7 @@ async def get(self, location: str, command_id: str, **kwargs: Any) -> _models.Ru :rtype: ~azure.mgmt.compute.v2017_03_30.models.RunCommandDocument :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/__init__.py index 9fbc1af0a5e56..8cca6b7c8d497 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/__init__.py @@ -5,174 +5,185 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._models_py3 import AccessUri -from ._models_py3 import AdditionalUnattendContent -from ._models_py3 import ApiEntityReference -from ._models_py3 import ApiError -from ._models_py3 import ApiErrorBase -from ._models_py3 import AvailabilitySet -from ._models_py3 import AvailabilitySetListResult -from ._models_py3 import BootDiagnostics -from ._models_py3 import BootDiagnosticsInstanceView -from ._models_py3 import ComputeLongRunningOperationProperties -from ._models_py3 import CreationData -from ._models_py3 import DataDisk -from ._models_py3 import DataDiskImage -from ._models_py3 import DiagnosticsProfile -from ._models_py3 import Disk -from ._models_py3 import DiskEncryptionSettings -from ._models_py3 import DiskInstanceView -from ._models_py3 import DiskList -from ._models_py3 import DiskSku -from ._models_py3 import DiskUpdate -from ._models_py3 import EncryptionSettings -from ._models_py3 import GrantAccessData -from ._models_py3 import HardwareProfile -from ._models_py3 import Image -from ._models_py3 import ImageDataDisk -from ._models_py3 import ImageDiskReference -from ._models_py3 import ImageListResult -from ._models_py3 import ImageOSDisk -from ._models_py3 import ImageReference -from ._models_py3 import ImageStorageProfile -from ._models_py3 import InnerError -from ._models_py3 import InstanceViewStatus -from ._models_py3 import KeyVaultAndKeyReference -from ._models_py3 import KeyVaultAndSecretReference -from ._models_py3 import KeyVaultKeyReference -from ._models_py3 import KeyVaultSecretReference -from ._models_py3 import LinuxConfiguration -from ._models_py3 import ListUsagesResult -from ._models_py3 import MaintenanceRedeployStatus -from ._models_py3 import ManagedDiskParameters -from ._models_py3 import NetworkInterfaceReference -from ._models_py3 import NetworkProfile -from ._models_py3 import OSDisk -from ._models_py3 import OSDiskImage -from ._models_py3 import OSProfile -from ._models_py3 import OperationStatusResponse -from ._models_py3 import Plan -from ._models_py3 import PurchasePlan -from ._models_py3 import Resource -from ._models_py3 import ResourceSku -from ._models_py3 import ResourceSkuCapabilities -from ._models_py3 import ResourceSkuCapacity -from ._models_py3 import ResourceSkuCosts -from ._models_py3 import ResourceSkuRestrictions -from ._models_py3 import ResourceSkusResult -from ._models_py3 import ResourceUpdate -from ._models_py3 import RollingUpgradePolicy -from ._models_py3 import RollingUpgradeProgressInfo -from ._models_py3 import RollingUpgradeRunningStatus -from ._models_py3 import RollingUpgradeStatusInfo -from ._models_py3 import RunCommandDocument -from ._models_py3 import RunCommandDocumentBase -from ._models_py3 import RunCommandInput -from ._models_py3 import RunCommandInputParameter -from ._models_py3 import RunCommandListResult -from ._models_py3 import RunCommandParameterDefinition -from ._models_py3 import RunCommandResult -from ._models_py3 import Sku -from ._models_py3 import Snapshot -from ._models_py3 import SnapshotList -from ._models_py3 import SnapshotUpdate -from ._models_py3 import SourceVault -from ._models_py3 import SshConfiguration -from ._models_py3 import SshPublicKey -from ._models_py3 import StorageProfile -from ._models_py3 import SubResource -from ._models_py3 import SubResourceReadOnly -from ._models_py3 import UpdateResource -from ._models_py3 import UpgradePolicy -from ._models_py3 import Usage -from ._models_py3 import UsageName -from ._models_py3 import VaultCertificate -from ._models_py3 import VaultSecretGroup -from ._models_py3 import VirtualHardDisk -from ._models_py3 import VirtualMachine -from ._models_py3 import VirtualMachineAgentInstanceView -from ._models_py3 import VirtualMachineCaptureParameters -from ._models_py3 import VirtualMachineCaptureResult -from ._models_py3 import VirtualMachineExtension -from ._models_py3 import VirtualMachineExtensionHandlerInstanceView -from ._models_py3 import VirtualMachineExtensionImage -from ._models_py3 import VirtualMachineExtensionInstanceView -from ._models_py3 import VirtualMachineExtensionUpdate -from ._models_py3 import VirtualMachineExtensionsListResult -from ._models_py3 import VirtualMachineHealthStatus -from ._models_py3 import VirtualMachineIdentity -from ._models_py3 import VirtualMachineImage -from ._models_py3 import VirtualMachineImageResource -from ._models_py3 import VirtualMachineInstanceView -from ._models_py3 import VirtualMachineListResult -from ._models_py3 import VirtualMachineScaleSet -from ._models_py3 import VirtualMachineScaleSetDataDisk -from ._models_py3 import VirtualMachineScaleSetExtension -from ._models_py3 import VirtualMachineScaleSetExtensionListResult -from ._models_py3 import VirtualMachineScaleSetExtensionProfile -from ._models_py3 import VirtualMachineScaleSetIPConfiguration -from ._models_py3 import VirtualMachineScaleSetIdentity -from ._models_py3 import VirtualMachineScaleSetInstanceView -from ._models_py3 import VirtualMachineScaleSetInstanceViewStatusesSummary -from ._models_py3 import VirtualMachineScaleSetListResult -from ._models_py3 import VirtualMachineScaleSetListSkusResult -from ._models_py3 import VirtualMachineScaleSetListWithLinkResult -from ._models_py3 import VirtualMachineScaleSetManagedDiskParameters -from ._models_py3 import VirtualMachineScaleSetNetworkConfiguration -from ._models_py3 import VirtualMachineScaleSetNetworkConfigurationDnsSettings -from ._models_py3 import VirtualMachineScaleSetNetworkProfile -from ._models_py3 import VirtualMachineScaleSetOSDisk -from ._models_py3 import VirtualMachineScaleSetOSProfile -from ._models_py3 import VirtualMachineScaleSetPublicIPAddressConfiguration -from ._models_py3 import VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings -from ._models_py3 import VirtualMachineScaleSetSku -from ._models_py3 import VirtualMachineScaleSetSkuCapacity -from ._models_py3 import VirtualMachineScaleSetStorageProfile -from ._models_py3 import VirtualMachineScaleSetUpdate -from ._models_py3 import VirtualMachineScaleSetUpdateIPConfiguration -from ._models_py3 import VirtualMachineScaleSetUpdateNetworkConfiguration -from ._models_py3 import VirtualMachineScaleSetUpdateNetworkProfile -from ._models_py3 import VirtualMachineScaleSetUpdateOSDisk -from ._models_py3 import VirtualMachineScaleSetUpdateOSProfile -from ._models_py3 import VirtualMachineScaleSetUpdatePublicIPAddressConfiguration -from ._models_py3 import VirtualMachineScaleSetUpdateStorageProfile -from ._models_py3 import VirtualMachineScaleSetUpdateVMProfile -from ._models_py3 import VirtualMachineScaleSetVM -from ._models_py3 import VirtualMachineScaleSetVMExtensionsSummary -from ._models_py3 import VirtualMachineScaleSetVMInstanceIDs -from ._models_py3 import VirtualMachineScaleSetVMInstanceRequiredIDs -from ._models_py3 import VirtualMachineScaleSetVMInstanceView -from ._models_py3 import VirtualMachineScaleSetVMListResult -from ._models_py3 import VirtualMachineScaleSetVMProfile -from ._models_py3 import VirtualMachineSize -from ._models_py3 import VirtualMachineSizeListResult -from ._models_py3 import VirtualMachineStatusCodeCount -from ._models_py3 import WinRMConfiguration -from ._models_py3 import WinRMListener -from ._models_py3 import WindowsConfiguration +from typing import TYPE_CHECKING -from ._compute_management_client_enums import AccessLevel -from ._compute_management_client_enums import CachingTypes -from ._compute_management_client_enums import DiskCreateOption -from ._compute_management_client_enums import DiskCreateOptionTypes -from ._compute_management_client_enums import IPVersion -from ._compute_management_client_enums import MaintenanceOperationResultCodeTypes -from ._compute_management_client_enums import OperatingSystemStateTypes -from ._compute_management_client_enums import OperatingSystemTypes -from ._compute_management_client_enums import ProtocolTypes -from ._compute_management_client_enums import ResourceSkuCapacityScaleType -from ._compute_management_client_enums import ResourceSkuRestrictionsReasonCode -from ._compute_management_client_enums import RollingUpgradeActionType -from ._compute_management_client_enums import RollingUpgradeStatusCode -from ._compute_management_client_enums import SettingNames -from ._compute_management_client_enums import StatusLevelTypes -from ._compute_management_client_enums import StorageAccountTypes -from ._compute_management_client_enums import UpgradeMode -from ._compute_management_client_enums import VirtualMachineScaleSetSkuScaleType -from ._compute_management_client_enums import VirtualMachineSizeTypes +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + + +from ._models_py3 import ( # type: ignore + AccessUri, + AdditionalUnattendContent, + ApiEntityReference, + ApiError, + ApiErrorBase, + AvailabilitySet, + AvailabilitySetListResult, + BootDiagnostics, + BootDiagnosticsInstanceView, + ComputeLongRunningOperationProperties, + CreationData, + DataDisk, + DataDiskImage, + DiagnosticsProfile, + Disk, + DiskEncryptionSettings, + DiskInstanceView, + DiskList, + DiskSku, + DiskUpdate, + EncryptionSettings, + GrantAccessData, + HardwareProfile, + Image, + ImageDataDisk, + ImageDiskReference, + ImageListResult, + ImageOSDisk, + ImageReference, + ImageStorageProfile, + InnerError, + InstanceViewStatus, + KeyVaultAndKeyReference, + KeyVaultAndSecretReference, + KeyVaultKeyReference, + KeyVaultSecretReference, + LinuxConfiguration, + ListUsagesResult, + MaintenanceRedeployStatus, + ManagedDiskParameters, + NetworkInterfaceReference, + NetworkProfile, + OSDisk, + OSDiskImage, + OSProfile, + OperationStatusResponse, + Plan, + PurchasePlan, + Resource, + ResourceSku, + ResourceSkuCapabilities, + ResourceSkuCapacity, + ResourceSkuCosts, + ResourceSkuRestrictions, + ResourceSkusResult, + ResourceUpdate, + RollingUpgradePolicy, + RollingUpgradeProgressInfo, + RollingUpgradeRunningStatus, + RollingUpgradeStatusInfo, + RunCommandDocument, + RunCommandDocumentBase, + RunCommandInput, + RunCommandInputParameter, + RunCommandListResult, + RunCommandParameterDefinition, + RunCommandResult, + Sku, + Snapshot, + SnapshotList, + SnapshotUpdate, + SourceVault, + SshConfiguration, + SshPublicKey, + StorageProfile, + SubResource, + SubResourceReadOnly, + UpdateResource, + UpgradePolicy, + Usage, + UsageName, + VaultCertificate, + VaultSecretGroup, + VirtualHardDisk, + VirtualMachine, + VirtualMachineAgentInstanceView, + VirtualMachineCaptureParameters, + VirtualMachineCaptureResult, + VirtualMachineExtension, + VirtualMachineExtensionHandlerInstanceView, + VirtualMachineExtensionImage, + VirtualMachineExtensionInstanceView, + VirtualMachineExtensionUpdate, + VirtualMachineExtensionsListResult, + VirtualMachineHealthStatus, + VirtualMachineIdentity, + VirtualMachineImage, + VirtualMachineImageResource, + VirtualMachineInstanceView, + VirtualMachineListResult, + VirtualMachineScaleSet, + VirtualMachineScaleSetDataDisk, + VirtualMachineScaleSetExtension, + VirtualMachineScaleSetExtensionListResult, + VirtualMachineScaleSetExtensionProfile, + VirtualMachineScaleSetIPConfiguration, + VirtualMachineScaleSetIdentity, + VirtualMachineScaleSetInstanceView, + VirtualMachineScaleSetInstanceViewStatusesSummary, + VirtualMachineScaleSetListResult, + VirtualMachineScaleSetListSkusResult, + VirtualMachineScaleSetListWithLinkResult, + VirtualMachineScaleSetManagedDiskParameters, + VirtualMachineScaleSetNetworkConfiguration, + VirtualMachineScaleSetNetworkConfigurationDnsSettings, + VirtualMachineScaleSetNetworkProfile, + VirtualMachineScaleSetOSDisk, + VirtualMachineScaleSetOSProfile, + VirtualMachineScaleSetPublicIPAddressConfiguration, + VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings, + VirtualMachineScaleSetSku, + VirtualMachineScaleSetSkuCapacity, + VirtualMachineScaleSetStorageProfile, + VirtualMachineScaleSetUpdate, + VirtualMachineScaleSetUpdateIPConfiguration, + VirtualMachineScaleSetUpdateNetworkConfiguration, + VirtualMachineScaleSetUpdateNetworkProfile, + VirtualMachineScaleSetUpdateOSDisk, + VirtualMachineScaleSetUpdateOSProfile, + VirtualMachineScaleSetUpdatePublicIPAddressConfiguration, + VirtualMachineScaleSetUpdateStorageProfile, + VirtualMachineScaleSetUpdateVMProfile, + VirtualMachineScaleSetVM, + VirtualMachineScaleSetVMExtensionsSummary, + VirtualMachineScaleSetVMInstanceIDs, + VirtualMachineScaleSetVMInstanceRequiredIDs, + VirtualMachineScaleSetVMInstanceView, + VirtualMachineScaleSetVMListResult, + VirtualMachineScaleSetVMProfile, + VirtualMachineSize, + VirtualMachineSizeListResult, + VirtualMachineStatusCodeCount, + WinRMConfiguration, + WinRMListener, + WindowsConfiguration, +) + +from ._compute_management_client_enums import ( # type: ignore + AccessLevel, + CachingTypes, + DiskCreateOption, + DiskCreateOptionTypes, + IPVersion, + MaintenanceOperationResultCodeTypes, + OperatingSystemStateTypes, + OperatingSystemTypes, + ProtocolTypes, + ResourceSkuCapacityScaleType, + ResourceSkuRestrictionsReasonCode, + RollingUpgradeActionType, + RollingUpgradeStatusCode, + SettingNames, + StatusLevelTypes, + StorageAccountTypes, + UpgradeMode, + VirtualMachineScaleSetSkuScaleType, + VirtualMachineSizeTypes, +) 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__ = [ @@ -341,5 +352,5 @@ "VirtualMachineScaleSetSkuScaleType", "VirtualMachineSizeTypes", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/_models_py3.py index 75623d4175256..13df4cbcdf020 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/_models_py3.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/_models_py3.py @@ -1,5 +1,5 @@ -# 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. @@ -16,10 +16,9 @@ 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 if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object @@ -706,7 +705,7 @@ def __init__(self, *, boot_diagnostics: Optional["_models.BootDiagnostics"] = No self.boot_diagnostics = boot_diagnostics -class Disk(Resource): # pylint: disable=too-many-instance-attributes +class Disk(Resource): """Disk resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -2588,7 +2587,7 @@ def __init__(self, *, publisher: str, name: str, product: str, **kwargs: Any) -> self.product = product -class ResourceSku(_serialization.Model): # pylint: disable=too-many-instance-attributes +class ResourceSku(_serialization.Model): """Describes an available Compute SKU. Variables are only populated by the server, and will be ignored when sending a request. @@ -3446,7 +3445,7 @@ def __init__( self.capacity = capacity -class Snapshot(Resource): # pylint: disable=too-many-instance-attributes +class Snapshot(Resource): """Snapshot resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -4058,7 +4057,7 @@ def __init__(self, *, uri: Optional[str] = None, **kwargs: Any) -> None: self.uri = uri -class VirtualMachine(Resource): # pylint: disable=too-many-instance-attributes +class VirtualMachine(Resource): """Describes a Virtual Machine. Variables are only populated by the server, and will be ignored when sending a request. @@ -4357,7 +4356,7 @@ def __init__( self.output = output -class VirtualMachineExtension(Resource): # pylint: disable=too-many-instance-attributes +class VirtualMachineExtension(Resource): """Describes a Virtual Machine Extension. Variables are only populated by the server, and will be ignored when sending a request. @@ -5085,7 +5084,7 @@ def __init__( self.next_link = next_link -class VirtualMachineScaleSet(Resource): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSet(Resource): """Describes a Virtual Machine Scale Set. Variables are only populated by the server, and will be ignored when sending a request. @@ -6973,7 +6972,7 @@ def __init__( self.license_type = license_type -class VirtualMachineScaleSetVM(Resource): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetVM(Resource): """Describes a virtual machine scale set virtual machine. Variables are only populated by the server, and will be ignored when sending a request. diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/__init__.py index 894b867ca9cdd..8e2dbe1731a13 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/__init__.py @@ -5,26 +5,32 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._operations import AvailabilitySetsOperations -from ._operations import VirtualMachineExtensionImagesOperations -from ._operations import VirtualMachineExtensionsOperations -from ._operations import VirtualMachinesOperations -from ._operations import VirtualMachineImagesOperations -from ._operations import UsageOperations -from ._operations import VirtualMachineSizesOperations -from ._operations import ImagesOperations -from ._operations import ResourceSkusOperations -from ._operations import VirtualMachineScaleSetsOperations -from ._operations import VirtualMachineScaleSetExtensionsOperations -from ._operations import VirtualMachineScaleSetRollingUpgradesOperations -from ._operations import VirtualMachineScaleSetVMsOperations -from ._operations import DisksOperations -from ._operations import SnapshotsOperations -from ._operations import VirtualMachineRunCommandsOperations +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._operations import AvailabilitySetsOperations # type: ignore +from ._operations import VirtualMachineExtensionImagesOperations # type: ignore +from ._operations import VirtualMachineExtensionsOperations # type: ignore +from ._operations import VirtualMachinesOperations # type: ignore +from ._operations import VirtualMachineImagesOperations # type: ignore +from ._operations import UsageOperations # type: ignore +from ._operations import VirtualMachineSizesOperations # type: ignore +from ._operations import ImagesOperations # type: ignore +from ._operations import ResourceSkusOperations # type: ignore +from ._operations import VirtualMachineScaleSetsOperations # type: ignore +from ._operations import VirtualMachineScaleSetExtensionsOperations # type: ignore +from ._operations import VirtualMachineScaleSetRollingUpgradesOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMsOperations # type: ignore +from ._operations import DisksOperations # type: ignore +from ._operations import SnapshotsOperations # type: ignore +from ._operations import VirtualMachineRunCommandsOperations # 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__ = [ @@ -45,5 +51,5 @@ "SnapshotsOperations", "VirtualMachineRunCommandsOperations", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/_operations.py index 23af9607c919f..e3e5bf509f496 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/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. @@ -8,22 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import ( - Any, - Callable, - Dict, - IO, - Iterable, - Iterator, - List, - Literal, - Optional, - Type, - TypeVar, - Union, - cast, - overload, -) +from typing import Any, Callable, Dict, IO, Iterable, Iterator, List, Literal, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -51,7 +36,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, HttpResponse], T, Dict[str, Any]], Any]] @@ -3232,7 +3217,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2017_03_30.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3300,7 +3285,7 @@ def delete( :rtype: ~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3356,7 +3341,7 @@ def get(self, resource_group_name: str, availability_set_name: str, **kwargs: An :rtype: ~azure.mgmt.compute.v2017_03_30.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3417,7 +3402,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-03-30")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3494,7 +3479,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Ava api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-03-30")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3576,7 +3561,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-03-30")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3677,7 +3662,7 @@ def get( :rtype: ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineExtensionImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3735,7 +3720,7 @@ def list_types( :rtype: list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3807,7 +3792,7 @@ def list_versions( :rtype: list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3882,7 +3867,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineExtension, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4092,7 +4077,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineExtensionUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4298,7 +4283,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_name: str, vm_extension_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4434,7 +4419,7 @@ def get( :rtype: ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4515,7 +4500,7 @@ def get_extensions( :rtype: ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4575,7 +4560,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> Iterable["_models.Vi api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-03-30")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4643,7 +4628,7 @@ def _capture_initial( parameters: Union[_models.VirtualMachineCaptureParameters, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4841,7 +4826,7 @@ def _create_or_update_initial( parameters: Union[_models.VirtualMachine, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5024,7 +5009,7 @@ def get_long_running_output(pipeline_response): ) def _delete_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5148,7 +5133,7 @@ def get( :rtype: ~azure.mgmt.compute.v2017_03_30.models.VirtualMachine :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5205,7 +5190,7 @@ def instance_view( :rtype: ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5250,7 +5235,7 @@ def instance_view( def _convert_to_managed_disks_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5361,7 +5346,7 @@ def get_long_running_output(pipeline_response): ) def _deallocate_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5483,7 +5468,7 @@ def generalize(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> _ :rtype: ~azure.mgmt.compute.v2017_03_30.models.OperationStatusResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5542,7 +5527,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Vir api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-03-30")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5618,7 +5603,7 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.VirtualMachine"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-03-30")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5699,7 +5684,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-03-30")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5762,7 +5747,7 @@ def get_next(next_link=None): return ItemPaged(get_next, extract_data) def _power_off_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5873,7 +5858,7 @@ def get_long_running_output(pipeline_response): ) def _restart_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5983,7 +5968,7 @@ def get_long_running_output(pipeline_response): ) def _start_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6093,7 +6078,7 @@ def get_long_running_output(pipeline_response): ) def _redeploy_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6203,7 +6188,7 @@ def get_long_running_output(pipeline_response): ) def _perform_maintenance_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6319,7 +6304,7 @@ def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6544,7 +6529,7 @@ def get( :rtype: ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6623,7 +6608,7 @@ def list( :rtype: list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6684,7 +6669,7 @@ def list_offers( :rtype: list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6736,7 +6721,7 @@ def list_publishers(self, location: str, **kwargs: Any) -> List[_models.VirtualM :rtype: list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6793,7 +6778,7 @@ def list_skus( :rtype: list[~azure.mgmt.compute.v2017_03_30.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6874,7 +6859,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.Usage"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-03-30")) cls: ClsType[_models.ListUsagesResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6972,7 +6957,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.VirtualMachine api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-03-30")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7057,7 +7042,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, image_name: str, parameters: Union[_models.Image, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7233,7 +7218,7 @@ def get_long_running_output(pipeline_response): ) def _delete_initial(self, resource_group_name: str, image_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7356,7 +7341,7 @@ def get( :rtype: ~azure.mgmt.compute.v2017_03_30.models.Image :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7415,7 +7400,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-03-30")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7491,7 +7476,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Image"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-03-30")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7586,7 +7571,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.ResourceSku"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-03-30")) cls: ClsType[_models.ResourceSkusResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7674,7 +7659,7 @@ def _create_or_update_initial( parameters: Union[_models.VirtualMachineScaleSet, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7866,7 +7851,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineScaleSetUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8053,7 +8038,7 @@ def get_long_running_output(pipeline_response): ) def _delete_initial(self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8172,7 +8157,7 @@ def get(self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) - :rtype: ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8221,7 +8206,7 @@ def _deallocate_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8428,7 +8413,7 @@ def _delete_instances_initial( vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8633,7 +8618,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8693,7 +8678,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Vir api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-03-30")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8772,7 +8757,7 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.VirtualMachineScaleSet"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-03-30")) cls: ClsType[_models.VirtualMachineScaleSetListWithLinkResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8855,7 +8840,7 @@ def list_skus( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-03-30")) cls: ClsType[_models.VirtualMachineScaleSetListSkusResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8924,7 +8909,7 @@ def _power_off_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9131,7 +9116,7 @@ def _restart_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9332,7 +9317,7 @@ def _start_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9533,7 +9518,7 @@ def _update_instances_initial( vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9731,7 +9716,7 @@ def _reimage_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9932,7 +9917,7 @@ def _reimage_all_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10158,7 +10143,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtension, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10364,7 +10349,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, vmss_extension_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10500,7 +10485,7 @@ def get( :rtype: ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10566,7 +10551,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-03-30")) cls: ClsType[_models.VirtualMachineScaleSetExtensionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10650,7 +10635,7 @@ def __init__(self, *args, **kwargs): self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") def _cancel_initial(self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10762,7 +10747,7 @@ def get_long_running_output(pipeline_response): def _start_os_upgrade_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10887,7 +10872,7 @@ def get_latest( :rtype: ~azure.mgmt.compute.v2017_03_30.models.RollingUpgradeStatusInfo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10953,7 +10938,7 @@ def __init__(self, *args, **kwargs): def _reimage_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11069,7 +11054,7 @@ def get_long_running_output(pipeline_response): def _reimage_all_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11186,7 +11171,7 @@ def get_long_running_output(pipeline_response): def _deallocate_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11304,7 +11289,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11431,7 +11416,7 @@ def get( :rtype: ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetVM :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11490,7 +11475,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2017_03_30.models.VirtualMachineScaleSetVMInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11572,7 +11557,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-03-30")) cls: ClsType[_models.VirtualMachineScaleSetVMListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11640,7 +11625,7 @@ def get_next(next_link=None): def _power_off_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11758,7 +11743,7 @@ def get_long_running_output(pipeline_response): def _restart_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11874,7 +11859,7 @@ def get_long_running_output(pipeline_response): def _start_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12011,7 +11996,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.Disk, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12195,7 +12180,7 @@ def get_long_running_output(pipeline_response): def _update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.DiskUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12390,7 +12375,7 @@ def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> _model :rtype: ~azure.mgmt.compute.v2017_03_30.models.Disk :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12433,7 +12418,7 @@ def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> _model return deserialized # type: ignore def _delete_initial(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12558,7 +12543,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-03-30")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12633,7 +12618,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Disk"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-03-30")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12700,7 +12685,7 @@ def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12888,7 +12873,7 @@ def get_long_running_output(pipeline_response): ) def _revoke_access_initial(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13023,7 +13008,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, snapshot_name: str, snapshot: Union[_models.Snapshot, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13211,7 +13196,7 @@ def _update_initial( snapshot: Union[_models.SnapshotUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13412,7 +13397,7 @@ def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> _m :rtype: ~azure.mgmt.compute.v2017_03_30.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13455,7 +13440,7 @@ def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> _m return deserialized # type: ignore def _delete_initial(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13580,7 +13565,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-03-30")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13655,7 +13640,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Snapshot"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-03-30")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13722,7 +13707,7 @@ def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13910,7 +13895,7 @@ def get_long_running_output(pipeline_response): ) def _revoke_access_initial(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14060,7 +14045,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.RunCommandDocu api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-03-30")) cls: ClsType[_models.RunCommandListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14133,7 +14118,7 @@ def get(self, location: str, command_id: str, **kwargs: Any) -> _models.RunComma :rtype: ~azure.mgmt.compute.v2017_03_30.models.RunCommandDocument :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/__init__.py index 3b1b6244b2375..ab7c46e8991db 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/__init__.py @@ -5,15 +5,21 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._compute_management_client import ComputeManagementClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._compute_management_client import ComputeManagementClient # 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__ = [ "ComputeManagementClient", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/_compute_management_client.py index 656f5a770bb43..bb560db6ed031 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/_compute_management_client.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/_compute_management_client.py @@ -21,11 +21,10 @@ from .operations import ResourceSkusOperations if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class ComputeManagementClient: # pylint: disable=client-accepts-api-version-keyword +class ComputeManagementClient: """Compute Client. :ivar resource_skus: ResourceSkusOperations operations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/_configuration.py index 260ae128b1602..3e9f61bd7768a 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/_configuration.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/_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 ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ComputeManagementClient. Note that all parameters used to create this instance are saved as instance diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/_version.py index d79b2760319c5..e5754a47ce68f 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "33.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/aio/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/aio/__init__.py index 0715f50185586..d3fd1ba93379a 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/aio/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/aio/__init__.py @@ -5,12 +5,18 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._compute_management_client import ComputeManagementClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._compute_management_client import ComputeManagementClient # 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__ = [ "ComputeManagementClient", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/aio/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/aio/_compute_management_client.py index eec9eda207260..14074d8aa16a5 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/aio/_compute_management_client.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/aio/_compute_management_client.py @@ -21,11 +21,10 @@ from .operations import ResourceSkusOperations if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class ComputeManagementClient: # pylint: disable=client-accepts-api-version-keyword +class ComputeManagementClient: """Compute Client. :ivar resource_skus: ResourceSkusOperations operations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/aio/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/aio/_configuration.py index 35dca4c894960..9b0e6a194d118 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/aio/_configuration.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/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 ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ComputeManagementClient. Note that all parameters used to create this instance are saved as instance diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/aio/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/aio/operations/__init__.py index eb88a2c4a8601..a17cbc8abb0eb 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/aio/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/aio/operations/__init__.py @@ -5,15 +5,21 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._operations import ResourceSkusOperations +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._operations import ResourceSkusOperations # 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__ = [ "ResourceSkusOperations", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/aio/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/aio/operations/_operations.py index 1a63cb6379de7..4e92991dbd38b 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/aio/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/aio/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, AsyncIterable, Callable, Dict, Optional, Type, TypeVar +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -31,7 +30,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]] @@ -71,7 +70,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.ResourceSku"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-09-01")) cls: ClsType[_models.ResourceSkusResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/models/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/models/__init__.py index f8a657a6ba160..152fce99ac51f 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/models/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/models/__init__.py @@ -5,21 +5,32 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._models_py3 import ResourceSku -from ._models_py3 import ResourceSkuCapabilities -from ._models_py3 import ResourceSkuCapacity -from ._models_py3 import ResourceSkuCosts -from ._models_py3 import ResourceSkuLocationInfo -from ._models_py3 import ResourceSkuRestrictionInfo -from ._models_py3 import ResourceSkuRestrictions -from ._models_py3 import ResourceSkusResult +from typing import TYPE_CHECKING -from ._compute_management_client_enums import ResourceSkuCapacityScaleType -from ._compute_management_client_enums import ResourceSkuRestrictionsReasonCode -from ._compute_management_client_enums import ResourceSkuRestrictionsType +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + + +from ._models_py3 import ( # type: ignore + ResourceSku, + ResourceSkuCapabilities, + ResourceSkuCapacity, + ResourceSkuCosts, + ResourceSkuLocationInfo, + ResourceSkuRestrictionInfo, + ResourceSkuRestrictions, + ResourceSkusResult, +) + +from ._compute_management_client_enums import ( # type: ignore + ResourceSkuCapacityScaleType, + ResourceSkuRestrictionsReasonCode, + ResourceSkuRestrictionsType, +) 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__ = [ @@ -35,5 +46,5 @@ "ResourceSkuRestrictionsReasonCode", "ResourceSkuRestrictionsType", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/models/_models_py3.py index 9b9e8ef82f665..5c038892fd0e1 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/models/_models_py3.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/models/_models_py3.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. @@ -12,11 +11,10 @@ from ... import _serialization if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models -class ResourceSku(_serialization.Model): # pylint: disable=too-many-instance-attributes +class ResourceSku(_serialization.Model): """Describes an available Compute SKU. Variables are only populated by the server, and will be ignored when sending a request. diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/operations/__init__.py index eb88a2c4a8601..a17cbc8abb0eb 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/operations/__init__.py @@ -5,15 +5,21 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._operations import ResourceSkusOperations +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._operations import ResourceSkusOperations # 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__ = [ "ResourceSkusOperations", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/operations/_operations.py index f844cab26a54a..955e4ffa5415f 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Iterable, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar import urllib.parse from azure.core.exceptions import ( @@ -31,7 +30,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, HttpResponse], T, Dict[str, Any]], Any]] @@ -97,7 +96,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.ResourceSku"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-09-01")) cls: ClsType[_models.ResourceSkusResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/__init__.py index 3b1b6244b2375..ab7c46e8991db 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/__init__.py @@ -5,15 +5,21 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._compute_management_client import ComputeManagementClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._compute_management_client import ComputeManagementClient # 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__ = [ "ComputeManagementClient", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/_compute_management_client.py index bbc820431d99a..084179dfb559a 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/_compute_management_client.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/_compute_management_client.py @@ -37,11 +37,10 @@ ) if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class ComputeManagementClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes +class ComputeManagementClient: # pylint: disable=too-many-instance-attributes """Compute Client. :ivar operations: Operations operations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/_configuration.py index 2a4659eb01f35..0c3b149bbbcaf 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/_configuration.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/_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 ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ComputeManagementClient. Note that all parameters used to create this instance are saved as instance diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/_version.py index d79b2760319c5..e5754a47ce68f 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "33.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/aio/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/aio/__init__.py index 0715f50185586..d3fd1ba93379a 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/aio/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/aio/__init__.py @@ -5,12 +5,18 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._compute_management_client import ComputeManagementClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._compute_management_client import ComputeManagementClient # 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__ = [ "ComputeManagementClient", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/aio/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/aio/_compute_management_client.py index 343f950440f4b..7d6e68ea22f22 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/aio/_compute_management_client.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/aio/_compute_management_client.py @@ -37,11 +37,10 @@ ) if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class ComputeManagementClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes +class ComputeManagementClient: # pylint: disable=too-many-instance-attributes """Compute Client. :ivar operations: Operations operations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/aio/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/aio/_configuration.py index 8fd504c7b3792..54732e9875922 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/aio/_configuration.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/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 ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ComputeManagementClient. Note that all parameters used to create this instance are saved as instance diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/aio/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/aio/operations/__init__.py index f8ce55fca02ec..120054eeda4f3 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/aio/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/aio/operations/__init__.py @@ -5,25 +5,31 @@ # Code generated by Microsoft (R) AutoRest 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 AvailabilitySetsOperations -from ._operations import VirtualMachineExtensionImagesOperations -from ._operations import VirtualMachineExtensionsOperations -from ._operations import VirtualMachinesOperations -from ._operations import VirtualMachineImagesOperations -from ._operations import UsageOperations -from ._operations import VirtualMachineSizesOperations -from ._operations import ImagesOperations -from ._operations import VirtualMachineScaleSetsOperations -from ._operations import VirtualMachineScaleSetExtensionsOperations -from ._operations import VirtualMachineScaleSetRollingUpgradesOperations -from ._operations import VirtualMachineScaleSetVMsOperations -from ._operations import LogAnalyticsOperations -from ._operations import VirtualMachineRunCommandsOperations +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 AvailabilitySetsOperations # type: ignore +from ._operations import VirtualMachineExtensionImagesOperations # type: ignore +from ._operations import VirtualMachineExtensionsOperations # type: ignore +from ._operations import VirtualMachinesOperations # type: ignore +from ._operations import VirtualMachineImagesOperations # type: ignore +from ._operations import UsageOperations # type: ignore +from ._operations import VirtualMachineSizesOperations # type: ignore +from ._operations import ImagesOperations # type: ignore +from ._operations import VirtualMachineScaleSetsOperations # type: ignore +from ._operations import VirtualMachineScaleSetExtensionsOperations # type: ignore +from ._operations import VirtualMachineScaleSetRollingUpgradesOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMsOperations # type: ignore +from ._operations import LogAnalyticsOperations # type: ignore +from ._operations import VirtualMachineRunCommandsOperations # 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__ = [ @@ -43,5 +49,5 @@ "LogAnalyticsOperations", "VirtualMachineRunCommandsOperations", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/aio/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/aio/operations/_operations.py index 2a6c78e0141b0..c8ab3fcff401f 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/aio/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/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. @@ -18,7 +18,6 @@ List, Literal, Optional, - Type, TypeVar, Union, cast, @@ -145,7 +144,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]] @@ -186,7 +185,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.ComputeOperationValue"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-12-01")) cls: ClsType[_models.ComputeOperationListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -339,7 +338,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2017_12_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -466,7 +465,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2017_12_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -534,7 +533,7 @@ async def delete( :rtype: ~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -590,7 +589,7 @@ async def get(self, resource_group_name: str, availability_set_name: str, **kwar :rtype: ~azure.mgmt.compute.v2017_12_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -652,7 +651,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-12-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -730,7 +729,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-12-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -813,7 +812,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-12-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -914,7 +913,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineExtensionImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -972,7 +971,7 @@ async def list_types( :rtype: list[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1044,7 +1043,7 @@ async def list_versions( :rtype: list[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1119,7 +1118,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineExtension, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1329,7 +1328,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineExtensionUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1535,7 +1534,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_name: str, vm_extension_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1671,7 +1670,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1752,7 +1751,7 @@ async def get_extensions( :rtype: ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1813,7 +1812,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> AsyncIterable["_mode api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-12-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1881,7 +1880,7 @@ async def _capture_initial( parameters: Union[_models.VirtualMachineCaptureParameters, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2080,7 +2079,7 @@ async def _create_or_update_initial( parameters: Union[_models.VirtualMachine, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2272,7 +2271,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2458,7 +2457,7 @@ def get_long_running_output(pipeline_response): ) async def _delete_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2582,7 +2581,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2017_12_01.models.VirtualMachine :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2639,7 +2638,7 @@ async def instance_view( :rtype: ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2684,7 +2683,7 @@ async def instance_view( async def _convert_to_managed_disks_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2796,7 +2795,7 @@ def get_long_running_output(pipeline_response): ) async def _deallocate_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2921,7 +2920,7 @@ async def generalize( :rtype: ~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2981,7 +2980,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-12-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3058,7 +3057,7 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.VirtualMachine"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-12-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3140,7 +3139,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-12-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3203,7 +3202,7 @@ async def get_next(next_link=None): return AsyncItemPaged(get_next, extract_data) async def _power_off_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3315,7 +3314,7 @@ def get_long_running_output(pipeline_response): ) async def _restart_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3426,7 +3425,7 @@ def get_long_running_output(pipeline_response): ) async def _start_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3537,7 +3536,7 @@ def get_long_running_output(pipeline_response): ) async def _redeploy_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3650,7 +3649,7 @@ def get_long_running_output(pipeline_response): async def _perform_maintenance_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3767,7 +3766,7 @@ async def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3996,7 +3995,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4075,7 +4074,7 @@ async def list( :rtype: list[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4136,7 +4135,7 @@ async def list_offers( :rtype: list[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4188,7 +4187,7 @@ async def list_publishers(self, location: str, **kwargs: Any) -> List[_models.Vi :rtype: list[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4245,7 +4244,7 @@ async def list_skus( :rtype: list[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4326,7 +4325,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.Usage"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-12-01")) cls: ClsType[_models.ListUsagesResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4425,7 +4424,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.VirtualMa api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-12-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4510,7 +4509,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, image_name: str, parameters: Union[_models.Image, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4692,7 +4691,7 @@ async def _update_initial( parameters: Union[_models.ImageUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4872,7 +4871,7 @@ def get_long_running_output(pipeline_response): ) async def _delete_initial(self, resource_group_name: str, image_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4995,7 +4994,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2017_12_01.models.Image :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5054,7 +5053,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-12-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5130,7 +5129,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Image"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-12-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5218,7 +5217,7 @@ async def _create_or_update_initial( parameters: Union[_models.VirtualMachineScaleSet, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5410,7 +5409,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineScaleSetUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5599,7 +5598,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5720,7 +5719,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5769,7 +5768,7 @@ async def _deallocate_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5977,7 +5976,7 @@ async def _delete_instances_initial( vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6183,7 +6182,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6243,7 +6242,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-12-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6322,7 +6321,7 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.VirtualMachineScaleS api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-12-01")) cls: ClsType[_models.VirtualMachineScaleSetListWithLinkResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6405,7 +6404,7 @@ def list_skus( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-12-01")) cls: ClsType[_models.VirtualMachineScaleSetListSkusResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6471,6 +6470,7 @@ async def get_next(next_link=None): def get_os_upgrade_history( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> AsyncIterable["_models.UpgradeOperationHistoricalStatusInfo"]: + # pylint: disable=line-too-long """Gets list of OS upgrades on a VM scale set instance. :param resource_group_name: The name of the resource group. Required. @@ -6489,7 +6489,7 @@ def get_os_upgrade_history( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-12-01")) cls: ClsType[_models.VirtualMachineScaleSetListOSUpgradeHistory] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6558,7 +6558,7 @@ async def _power_off_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6766,7 +6766,7 @@ async def _restart_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6968,7 +6968,7 @@ async def _start_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7170,7 +7170,7 @@ async def _redeploy_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7375,7 +7375,7 @@ async def _perform_maintenance_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7586,7 +7586,7 @@ async def _update_instances_initial( vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7785,7 +7785,7 @@ async def _reimage_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7987,7 +7987,7 @@ async def _reimage_all_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8203,7 +8203,7 @@ async def force_recovery_service_fabric_platform_update_domain_walk( # pylint: :rtype: ~azure.mgmt.compute.v2017_12_01.models.RecoveryWalkResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8275,7 +8275,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtension, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8481,7 +8481,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, vmss_extension_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8617,7 +8617,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8683,7 +8683,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-12-01")) cls: ClsType[_models.VirtualMachineScaleSetExtensionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8769,7 +8769,7 @@ def __init__(self, *args, **kwargs) -> None: async def _cancel_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8882,7 +8882,7 @@ def get_long_running_output(pipeline_response): async def _start_os_upgrade_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9008,7 +9008,7 @@ async def get_latest( :rtype: ~azure.mgmt.compute.v2017_12_01.models.RollingUpgradeStatusInfo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9074,7 +9074,7 @@ def __init__(self, *args, **kwargs) -> None: async def _reimage_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9191,7 +9191,7 @@ def get_long_running_output(pipeline_response): async def _reimage_all_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9309,7 +9309,7 @@ def get_long_running_output(pipeline_response): async def _deallocate_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9433,7 +9433,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineScaleSetVM, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9637,7 +9637,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9764,7 +9764,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetVM :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9823,7 +9823,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetVMInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9905,7 +9905,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-12-01")) cls: ClsType[_models.VirtualMachineScaleSetVMListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9973,7 +9973,7 @@ async def get_next(next_link=None): async def _power_off_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10092,7 +10092,7 @@ def get_long_running_output(pipeline_response): async def _restart_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10209,7 +10209,7 @@ def get_long_running_output(pipeline_response): async def _start_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10326,7 +10326,7 @@ def get_long_running_output(pipeline_response): async def _redeploy_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10444,7 +10444,7 @@ def get_long_running_output(pipeline_response): async def _perform_maintenance_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10582,7 +10582,7 @@ def __init__(self, *args, **kwargs) -> None: async def _export_request_rate_by_interval_initial( self, location: str, parameters: Union[_models.RequestRateByIntervalInput, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10760,7 +10760,7 @@ def get_long_running_output(pipeline_response): async def _export_throttled_requests_initial( self, location: str, parameters: Union[_models.ThrottledRequestsInput, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10971,7 +10971,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.RunComman api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-12-01")) cls: ClsType[_models.RunCommandListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11044,7 +11044,7 @@ async def get(self, location: str, command_id: str, **kwargs: Any) -> _models.Ru :rtype: ~azure.mgmt.compute.v2017_12_01.models.RunCommandDocument :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/__init__.py index 1a8adb739ed90..da880cc1d7526 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/__init__.py @@ -5,171 +5,182 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._models_py3 import AdditionalUnattendContent -from ._models_py3 import ApiEntityReference -from ._models_py3 import ApiError -from ._models_py3 import ApiErrorBase -from ._models_py3 import AutoOSUpgradePolicy -from ._models_py3 import AvailabilitySet -from ._models_py3 import AvailabilitySetListResult -from ._models_py3 import AvailabilitySetUpdate -from ._models_py3 import BootDiagnostics -from ._models_py3 import BootDiagnosticsInstanceView -from ._models_py3 import ComputeLongRunningOperationProperties -from ._models_py3 import ComputeOperationListResult -from ._models_py3 import ComputeOperationValue -from ._models_py3 import DataDisk -from ._models_py3 import DataDiskImage -from ._models_py3 import DiagnosticsProfile -from ._models_py3 import DiskEncryptionSettings -from ._models_py3 import DiskInstanceView -from ._models_py3 import HardwareProfile -from ._models_py3 import Image -from ._models_py3 import ImageDataDisk -from ._models_py3 import ImageListResult -from ._models_py3 import ImageOSDisk -from ._models_py3 import ImageReference -from ._models_py3 import ImageStorageProfile -from ._models_py3 import ImageUpdate -from ._models_py3 import InnerError -from ._models_py3 import InstanceViewStatus -from ._models_py3 import KeyVaultKeyReference -from ._models_py3 import KeyVaultSecretReference -from ._models_py3 import LinuxConfiguration -from ._models_py3 import ListUsagesResult -from ._models_py3 import LogAnalyticsInputBase -from ._models_py3 import LogAnalyticsOperationResult -from ._models_py3 import LogAnalyticsOutput -from ._models_py3 import MaintenanceRedeployStatus -from ._models_py3 import ManagedDiskParameters -from ._models_py3 import NetworkInterfaceReference -from ._models_py3 import NetworkProfile -from ._models_py3 import OSDisk -from ._models_py3 import OSDiskImage -from ._models_py3 import OSProfile -from ._models_py3 import OperationStatusResponse -from ._models_py3 import Plan -from ._models_py3 import PurchasePlan -from ._models_py3 import RecoveryWalkResponse -from ._models_py3 import RequestRateByIntervalInput -from ._models_py3 import Resource -from ._models_py3 import RollbackStatusInfo -from ._models_py3 import RollingUpgradePolicy -from ._models_py3 import RollingUpgradeProgressInfo -from ._models_py3 import RollingUpgradeRunningStatus -from ._models_py3 import RollingUpgradeStatusInfo -from ._models_py3 import RunCommandDocument -from ._models_py3 import RunCommandDocumentBase -from ._models_py3 import RunCommandInput -from ._models_py3 import RunCommandInputParameter -from ._models_py3 import RunCommandListResult -from ._models_py3 import RunCommandParameterDefinition -from ._models_py3 import RunCommandResult -from ._models_py3 import Sku -from ._models_py3 import SshConfiguration -from ._models_py3 import SshPublicKey -from ._models_py3 import StorageProfile -from ._models_py3 import SubResource -from ._models_py3 import SubResourceReadOnly -from ._models_py3 import ThrottledRequestsInput -from ._models_py3 import UpdateResource -from ._models_py3 import UpgradeOperationHistoricalStatusInfo -from ._models_py3 import UpgradeOperationHistoricalStatusInfoProperties -from ._models_py3 import UpgradeOperationHistoryStatus -from ._models_py3 import UpgradePolicy -from ._models_py3 import Usage -from ._models_py3 import UsageName -from ._models_py3 import VaultCertificate -from ._models_py3 import VaultSecretGroup -from ._models_py3 import VirtualHardDisk -from ._models_py3 import VirtualMachine -from ._models_py3 import VirtualMachineAgentInstanceView -from ._models_py3 import VirtualMachineCaptureParameters -from ._models_py3 import VirtualMachineCaptureResult -from ._models_py3 import VirtualMachineExtension -from ._models_py3 import VirtualMachineExtensionHandlerInstanceView -from ._models_py3 import VirtualMachineExtensionImage -from ._models_py3 import VirtualMachineExtensionInstanceView -from ._models_py3 import VirtualMachineExtensionUpdate -from ._models_py3 import VirtualMachineExtensionsListResult -from ._models_py3 import VirtualMachineHealthStatus -from ._models_py3 import VirtualMachineIdentity -from ._models_py3 import VirtualMachineImage -from ._models_py3 import VirtualMachineImageResource -from ._models_py3 import VirtualMachineInstanceView -from ._models_py3 import VirtualMachineListResult -from ._models_py3 import VirtualMachineScaleSet -from ._models_py3 import VirtualMachineScaleSetDataDisk -from ._models_py3 import VirtualMachineScaleSetExtension -from ._models_py3 import VirtualMachineScaleSetExtensionListResult -from ._models_py3 import VirtualMachineScaleSetExtensionProfile -from ._models_py3 import VirtualMachineScaleSetIPConfiguration -from ._models_py3 import VirtualMachineScaleSetIdentity -from ._models_py3 import VirtualMachineScaleSetInstanceView -from ._models_py3 import VirtualMachineScaleSetInstanceViewStatusesSummary -from ._models_py3 import VirtualMachineScaleSetListOSUpgradeHistory -from ._models_py3 import VirtualMachineScaleSetListResult -from ._models_py3 import VirtualMachineScaleSetListSkusResult -from ._models_py3 import VirtualMachineScaleSetListWithLinkResult -from ._models_py3 import VirtualMachineScaleSetManagedDiskParameters -from ._models_py3 import VirtualMachineScaleSetNetworkConfiguration -from ._models_py3 import VirtualMachineScaleSetNetworkConfigurationDnsSettings -from ._models_py3 import VirtualMachineScaleSetNetworkProfile -from ._models_py3 import VirtualMachineScaleSetOSDisk -from ._models_py3 import VirtualMachineScaleSetOSProfile -from ._models_py3 import VirtualMachineScaleSetPublicIPAddressConfiguration -from ._models_py3 import VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings -from ._models_py3 import VirtualMachineScaleSetSku -from ._models_py3 import VirtualMachineScaleSetSkuCapacity -from ._models_py3 import VirtualMachineScaleSetStorageProfile -from ._models_py3 import VirtualMachineScaleSetUpdate -from ._models_py3 import VirtualMachineScaleSetUpdateIPConfiguration -from ._models_py3 import VirtualMachineScaleSetUpdateNetworkConfiguration -from ._models_py3 import VirtualMachineScaleSetUpdateNetworkProfile -from ._models_py3 import VirtualMachineScaleSetUpdateOSDisk -from ._models_py3 import VirtualMachineScaleSetUpdateOSProfile -from ._models_py3 import VirtualMachineScaleSetUpdatePublicIPAddressConfiguration -from ._models_py3 import VirtualMachineScaleSetUpdateStorageProfile -from ._models_py3 import VirtualMachineScaleSetUpdateVMProfile -from ._models_py3 import VirtualMachineScaleSetVM -from ._models_py3 import VirtualMachineScaleSetVMExtensionsSummary -from ._models_py3 import VirtualMachineScaleSetVMInstanceIDs -from ._models_py3 import VirtualMachineScaleSetVMInstanceRequiredIDs -from ._models_py3 import VirtualMachineScaleSetVMInstanceView -from ._models_py3 import VirtualMachineScaleSetVMListResult -from ._models_py3 import VirtualMachineScaleSetVMProfile -from ._models_py3 import VirtualMachineSize -from ._models_py3 import VirtualMachineSizeListResult -from ._models_py3 import VirtualMachineStatusCodeCount -from ._models_py3 import VirtualMachineUpdate -from ._models_py3 import WinRMConfiguration -from ._models_py3 import WinRMListener -from ._models_py3 import WindowsConfiguration +from typing import TYPE_CHECKING -from ._compute_management_client_enums import CachingTypes -from ._compute_management_client_enums import DiskCreateOptionTypes -from ._compute_management_client_enums import IPVersion -from ._compute_management_client_enums import IntervalInMins -from ._compute_management_client_enums import MaintenanceOperationResultCodeTypes -from ._compute_management_client_enums import OperatingSystemStateTypes -from ._compute_management_client_enums import OperatingSystemTypes -from ._compute_management_client_enums import ProtocolTypes -from ._compute_management_client_enums import ResourceIdentityType -from ._compute_management_client_enums import RollingUpgradeActionType -from ._compute_management_client_enums import RollingUpgradeStatusCode -from ._compute_management_client_enums import SettingNames -from ._compute_management_client_enums import StatusLevelTypes -from ._compute_management_client_enums import StorageAccountTypes -from ._compute_management_client_enums import UpgradeMode -from ._compute_management_client_enums import UpgradeOperationInvoker -from ._compute_management_client_enums import UpgradeState -from ._compute_management_client_enums import VirtualMachineEvictionPolicyTypes -from ._compute_management_client_enums import VirtualMachinePriorityTypes -from ._compute_management_client_enums import VirtualMachineScaleSetSkuScaleType -from ._compute_management_client_enums import VirtualMachineSizeTypes +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + + +from ._models_py3 import ( # type: ignore + AdditionalUnattendContent, + ApiEntityReference, + ApiError, + ApiErrorBase, + AutoOSUpgradePolicy, + AvailabilitySet, + AvailabilitySetListResult, + AvailabilitySetUpdate, + BootDiagnostics, + BootDiagnosticsInstanceView, + ComputeLongRunningOperationProperties, + ComputeOperationListResult, + ComputeOperationValue, + DataDisk, + DataDiskImage, + DiagnosticsProfile, + DiskEncryptionSettings, + DiskInstanceView, + HardwareProfile, + Image, + ImageDataDisk, + ImageListResult, + ImageOSDisk, + ImageReference, + ImageStorageProfile, + ImageUpdate, + InnerError, + InstanceViewStatus, + KeyVaultKeyReference, + KeyVaultSecretReference, + LinuxConfiguration, + ListUsagesResult, + LogAnalyticsInputBase, + LogAnalyticsOperationResult, + LogAnalyticsOutput, + MaintenanceRedeployStatus, + ManagedDiskParameters, + NetworkInterfaceReference, + NetworkProfile, + OSDisk, + OSDiskImage, + OSProfile, + OperationStatusResponse, + Plan, + PurchasePlan, + RecoveryWalkResponse, + RequestRateByIntervalInput, + Resource, + RollbackStatusInfo, + RollingUpgradePolicy, + RollingUpgradeProgressInfo, + RollingUpgradeRunningStatus, + RollingUpgradeStatusInfo, + RunCommandDocument, + RunCommandDocumentBase, + RunCommandInput, + RunCommandInputParameter, + RunCommandListResult, + RunCommandParameterDefinition, + RunCommandResult, + Sku, + SshConfiguration, + SshPublicKey, + StorageProfile, + SubResource, + SubResourceReadOnly, + ThrottledRequestsInput, + UpdateResource, + UpgradeOperationHistoricalStatusInfo, + UpgradeOperationHistoricalStatusInfoProperties, + UpgradeOperationHistoryStatus, + UpgradePolicy, + Usage, + UsageName, + VaultCertificate, + VaultSecretGroup, + VirtualHardDisk, + VirtualMachine, + VirtualMachineAgentInstanceView, + VirtualMachineCaptureParameters, + VirtualMachineCaptureResult, + VirtualMachineExtension, + VirtualMachineExtensionHandlerInstanceView, + VirtualMachineExtensionImage, + VirtualMachineExtensionInstanceView, + VirtualMachineExtensionUpdate, + VirtualMachineExtensionsListResult, + VirtualMachineHealthStatus, + VirtualMachineIdentity, + VirtualMachineImage, + VirtualMachineImageResource, + VirtualMachineInstanceView, + VirtualMachineListResult, + VirtualMachineScaleSet, + VirtualMachineScaleSetDataDisk, + VirtualMachineScaleSetExtension, + VirtualMachineScaleSetExtensionListResult, + VirtualMachineScaleSetExtensionProfile, + VirtualMachineScaleSetIPConfiguration, + VirtualMachineScaleSetIdentity, + VirtualMachineScaleSetInstanceView, + VirtualMachineScaleSetInstanceViewStatusesSummary, + VirtualMachineScaleSetListOSUpgradeHistory, + VirtualMachineScaleSetListResult, + VirtualMachineScaleSetListSkusResult, + VirtualMachineScaleSetListWithLinkResult, + VirtualMachineScaleSetManagedDiskParameters, + VirtualMachineScaleSetNetworkConfiguration, + VirtualMachineScaleSetNetworkConfigurationDnsSettings, + VirtualMachineScaleSetNetworkProfile, + VirtualMachineScaleSetOSDisk, + VirtualMachineScaleSetOSProfile, + VirtualMachineScaleSetPublicIPAddressConfiguration, + VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings, + VirtualMachineScaleSetSku, + VirtualMachineScaleSetSkuCapacity, + VirtualMachineScaleSetStorageProfile, + VirtualMachineScaleSetUpdate, + VirtualMachineScaleSetUpdateIPConfiguration, + VirtualMachineScaleSetUpdateNetworkConfiguration, + VirtualMachineScaleSetUpdateNetworkProfile, + VirtualMachineScaleSetUpdateOSDisk, + VirtualMachineScaleSetUpdateOSProfile, + VirtualMachineScaleSetUpdatePublicIPAddressConfiguration, + VirtualMachineScaleSetUpdateStorageProfile, + VirtualMachineScaleSetUpdateVMProfile, + VirtualMachineScaleSetVM, + VirtualMachineScaleSetVMExtensionsSummary, + VirtualMachineScaleSetVMInstanceIDs, + VirtualMachineScaleSetVMInstanceRequiredIDs, + VirtualMachineScaleSetVMInstanceView, + VirtualMachineScaleSetVMListResult, + VirtualMachineScaleSetVMProfile, + VirtualMachineSize, + VirtualMachineSizeListResult, + VirtualMachineStatusCodeCount, + VirtualMachineUpdate, + WinRMConfiguration, + WinRMListener, + WindowsConfiguration, +) + +from ._compute_management_client_enums import ( # type: ignore + CachingTypes, + DiskCreateOptionTypes, + IPVersion, + IntervalInMins, + MaintenanceOperationResultCodeTypes, + OperatingSystemStateTypes, + OperatingSystemTypes, + ProtocolTypes, + ResourceIdentityType, + RollingUpgradeActionType, + RollingUpgradeStatusCode, + SettingNames, + StatusLevelTypes, + StorageAccountTypes, + UpgradeMode, + UpgradeOperationInvoker, + UpgradeState, + VirtualMachineEvictionPolicyTypes, + VirtualMachinePriorityTypes, + VirtualMachineScaleSetSkuScaleType, + VirtualMachineSizeTypes, +) 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__ = [ @@ -335,5 +346,5 @@ "VirtualMachineScaleSetSkuScaleType", "VirtualMachineSizeTypes", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/_models_py3.py index c8c202c550d8b..f2e6bceecff48 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/_models_py3.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/_models_py3.py @@ -1,5 +1,5 @@ -# 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. @@ -16,10 +16,9 @@ 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 if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object @@ -3729,7 +3728,7 @@ def __init__(self, *, uri: Optional[str] = None, **kwargs: Any) -> None: self.uri = uri -class VirtualMachine(Resource): # pylint: disable=too-many-instance-attributes +class VirtualMachine(Resource): """Describes a Virtual Machine. Variables are only populated by the server, and will be ignored when sending a request. @@ -4028,7 +4027,7 @@ def __init__( self.output = output -class VirtualMachineExtension(Resource): # pylint: disable=too-many-instance-attributes +class VirtualMachineExtension(Resource): """Describes a Virtual Machine Extension. Variables are only populated by the server, and will be ignored when sending a request. @@ -4649,7 +4648,7 @@ def __init__( self.data_disk_images = data_disk_images -class VirtualMachineInstanceView(_serialization.Model): # pylint: disable=too-many-instance-attributes +class VirtualMachineInstanceView(_serialization.Model): """The instance view of a virtual machine. :ivar platform_update_domain: Specifies the update domain of the virtual machine. @@ -4797,7 +4796,7 @@ def __init__( self.next_link = next_link -class VirtualMachineScaleSet(Resource): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSet(Resource): """Describes a Virtual Machine Scale Set. Variables are only populated by the server, and will be ignored when sending a request. @@ -6806,7 +6805,7 @@ def __init__( self.license_type = license_type -class VirtualMachineScaleSetVM(Resource): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetVM(Resource): """Describes a virtual machine scale set virtual machine. Variables are only populated by the server, and will be ignored when sending a request. @@ -7070,7 +7069,7 @@ def __init__(self, *, instance_ids: List[str], **kwargs: Any) -> None: self.instance_ids = instance_ids -class VirtualMachineScaleSetVMInstanceView(_serialization.Model): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetVMInstanceView(_serialization.Model): """The instance view of a virtual machine scale set VM. Variables are only populated by the server, and will be ignored when sending a request. @@ -7440,7 +7439,7 @@ def __init__(self, **kwargs: Any) -> None: self.count = None -class VirtualMachineUpdate(UpdateResource): # pylint: disable=too-many-instance-attributes +class VirtualMachineUpdate(UpdateResource): """Describes a Virtual Machine Update. Variables are only populated by the server, and will be ignored when sending a request. diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/__init__.py index f8ce55fca02ec..120054eeda4f3 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/__init__.py @@ -5,25 +5,31 @@ # Code generated by Microsoft (R) AutoRest 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 AvailabilitySetsOperations -from ._operations import VirtualMachineExtensionImagesOperations -from ._operations import VirtualMachineExtensionsOperations -from ._operations import VirtualMachinesOperations -from ._operations import VirtualMachineImagesOperations -from ._operations import UsageOperations -from ._operations import VirtualMachineSizesOperations -from ._operations import ImagesOperations -from ._operations import VirtualMachineScaleSetsOperations -from ._operations import VirtualMachineScaleSetExtensionsOperations -from ._operations import VirtualMachineScaleSetRollingUpgradesOperations -from ._operations import VirtualMachineScaleSetVMsOperations -from ._operations import LogAnalyticsOperations -from ._operations import VirtualMachineRunCommandsOperations +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 AvailabilitySetsOperations # type: ignore +from ._operations import VirtualMachineExtensionImagesOperations # type: ignore +from ._operations import VirtualMachineExtensionsOperations # type: ignore +from ._operations import VirtualMachinesOperations # type: ignore +from ._operations import VirtualMachineImagesOperations # type: ignore +from ._operations import UsageOperations # type: ignore +from ._operations import VirtualMachineSizesOperations # type: ignore +from ._operations import ImagesOperations # type: ignore +from ._operations import VirtualMachineScaleSetsOperations # type: ignore +from ._operations import VirtualMachineScaleSetExtensionsOperations # type: ignore +from ._operations import VirtualMachineScaleSetRollingUpgradesOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMsOperations # type: ignore +from ._operations import LogAnalyticsOperations # type: ignore +from ._operations import VirtualMachineRunCommandsOperations # 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__ = [ @@ -43,5 +49,5 @@ "LogAnalyticsOperations", "VirtualMachineRunCommandsOperations", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/_operations.py index 31683121efce7..5f410053689c9 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/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. @@ -8,22 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import ( - Any, - Callable, - Dict, - IO, - Iterable, - Iterator, - List, - Literal, - Optional, - Type, - TypeVar, - Union, - cast, - overload, -) +from typing import Any, Callable, Dict, IO, Iterable, Iterator, List, Literal, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -51,7 +36,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, HttpResponse], T, Dict[str, Any]], Any]] @@ -3075,7 +3060,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.ComputeOperationValue"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-12-01")) cls: ClsType[_models.ComputeOperationListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3228,7 +3213,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2017_12_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3355,7 +3340,7 @@ def update( :rtype: ~azure.mgmt.compute.v2017_12_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3423,7 +3408,7 @@ def delete( :rtype: ~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse or None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3479,7 +3464,7 @@ def get(self, resource_group_name: str, availability_set_name: str, **kwargs: An :rtype: ~azure.mgmt.compute.v2017_12_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3540,7 +3525,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-12-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3617,7 +3602,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Ava api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-12-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3699,7 +3684,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-12-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3800,7 +3785,7 @@ def get( :rtype: ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineExtensionImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3858,7 +3843,7 @@ def list_types( :rtype: list[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3930,7 +3915,7 @@ def list_versions( :rtype: list[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4005,7 +3990,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineExtension, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4215,7 +4200,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineExtensionUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4421,7 +4406,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_name: str, vm_extension_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4557,7 +4542,7 @@ def get( :rtype: ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4638,7 +4623,7 @@ def get_extensions( :rtype: ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4698,7 +4683,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> Iterable["_models.Vi api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-12-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4766,7 +4751,7 @@ def _capture_initial( parameters: Union[_models.VirtualMachineCaptureParameters, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4964,7 +4949,7 @@ def _create_or_update_initial( parameters: Union[_models.VirtualMachine, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5153,7 +5138,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5336,7 +5321,7 @@ def get_long_running_output(pipeline_response): ) def _delete_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5460,7 +5445,7 @@ def get( :rtype: ~azure.mgmt.compute.v2017_12_01.models.VirtualMachine :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5517,7 +5502,7 @@ def instance_view( :rtype: ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5562,7 +5547,7 @@ def instance_view( def _convert_to_managed_disks_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5673,7 +5658,7 @@ def get_long_running_output(pipeline_response): ) def _deallocate_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5795,7 +5780,7 @@ def generalize(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> _ :rtype: ~azure.mgmt.compute.v2017_12_01.models.OperationStatusResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5854,7 +5839,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Vir api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-12-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5930,7 +5915,7 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.VirtualMachine"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-12-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6011,7 +5996,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-12-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6074,7 +6059,7 @@ def get_next(next_link=None): return ItemPaged(get_next, extract_data) def _power_off_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6185,7 +6170,7 @@ def get_long_running_output(pipeline_response): ) def _restart_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6295,7 +6280,7 @@ def get_long_running_output(pipeline_response): ) def _start_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6405,7 +6390,7 @@ def get_long_running_output(pipeline_response): ) def _redeploy_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6515,7 +6500,7 @@ def get_long_running_output(pipeline_response): ) def _perform_maintenance_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6631,7 +6616,7 @@ def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6856,7 +6841,7 @@ def get( :rtype: ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6935,7 +6920,7 @@ def list( :rtype: list[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6996,7 +6981,7 @@ def list_offers( :rtype: list[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7048,7 +7033,7 @@ def list_publishers(self, location: str, **kwargs: Any) -> List[_models.VirtualM :rtype: list[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7105,7 +7090,7 @@ def list_skus( :rtype: list[~azure.mgmt.compute.v2017_12_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7186,7 +7171,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.Usage"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-12-01")) cls: ClsType[_models.ListUsagesResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7284,7 +7269,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.VirtualMachine api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-12-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7369,7 +7354,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, image_name: str, parameters: Union[_models.Image, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7551,7 +7536,7 @@ def _update_initial( parameters: Union[_models.ImageUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7731,7 +7716,7 @@ def get_long_running_output(pipeline_response): ) def _delete_initial(self, resource_group_name: str, image_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7854,7 +7839,7 @@ def get( :rtype: ~azure.mgmt.compute.v2017_12_01.models.Image :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7913,7 +7898,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-12-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7989,7 +7974,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Image"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-12-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8077,7 +8062,7 @@ def _create_or_update_initial( parameters: Union[_models.VirtualMachineScaleSet, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8269,7 +8254,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineScaleSetUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8456,7 +8441,7 @@ def get_long_running_output(pipeline_response): ) def _delete_initial(self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8575,7 +8560,7 @@ def get(self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) - :rtype: ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8624,7 +8609,7 @@ def _deallocate_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8831,7 +8816,7 @@ def _delete_instances_initial( vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9036,7 +9021,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9096,7 +9081,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Vir api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-12-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9175,7 +9160,7 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.VirtualMachineScaleSet"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-12-01")) cls: ClsType[_models.VirtualMachineScaleSetListWithLinkResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9258,7 +9243,7 @@ def list_skus( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-12-01")) cls: ClsType[_models.VirtualMachineScaleSetListSkusResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9342,7 +9327,7 @@ def get_os_upgrade_history( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-12-01")) cls: ClsType[_models.VirtualMachineScaleSetListOSUpgradeHistory] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9411,7 +9396,7 @@ def _power_off_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9618,7 +9603,7 @@ def _restart_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9819,7 +9804,7 @@ def _start_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10020,7 +10005,7 @@ def _redeploy_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10224,7 +10209,7 @@ def _perform_maintenance_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10434,7 +10419,7 @@ def _update_instances_initial( vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10632,7 +10617,7 @@ def _reimage_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10833,7 +10818,7 @@ def _reimage_all_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11048,7 +11033,7 @@ def force_recovery_service_fabric_platform_update_domain_walk( # pylint: disabl :rtype: ~azure.mgmt.compute.v2017_12_01.models.RecoveryWalkResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11120,7 +11105,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtension, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11326,7 +11311,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, vmss_extension_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11462,7 +11447,7 @@ def get( :rtype: ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11528,7 +11513,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-12-01")) cls: ClsType[_models.VirtualMachineScaleSetExtensionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11612,7 +11597,7 @@ def __init__(self, *args, **kwargs): self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") def _cancel_initial(self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11724,7 +11709,7 @@ def get_long_running_output(pipeline_response): def _start_os_upgrade_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11849,7 +11834,7 @@ def get_latest( :rtype: ~azure.mgmt.compute.v2017_12_01.models.RollingUpgradeStatusInfo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11915,7 +11900,7 @@ def __init__(self, *args, **kwargs): def _reimage_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12031,7 +12016,7 @@ def get_long_running_output(pipeline_response): def _reimage_all_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12148,7 +12133,7 @@ def get_long_running_output(pipeline_response): def _deallocate_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12271,7 +12256,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineScaleSetVM, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12475,7 +12460,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12602,7 +12587,7 @@ def get( :rtype: ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetVM :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12661,7 +12646,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2017_12_01.models.VirtualMachineScaleSetVMInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12743,7 +12728,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-12-01")) cls: ClsType[_models.VirtualMachineScaleSetVMListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12811,7 +12796,7 @@ def get_next(next_link=None): def _power_off_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12929,7 +12914,7 @@ def get_long_running_output(pipeline_response): def _restart_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13045,7 +13030,7 @@ def get_long_running_output(pipeline_response): def _start_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13161,7 +13146,7 @@ def get_long_running_output(pipeline_response): def _redeploy_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13278,7 +13263,7 @@ def get_long_running_output(pipeline_response): def _perform_maintenance_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13415,7 +13400,7 @@ def __init__(self, *args, **kwargs): def _export_request_rate_by_interval_initial( self, location: str, parameters: Union[_models.RequestRateByIntervalInput, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13592,7 +13577,7 @@ def get_long_running_output(pipeline_response): def _export_throttled_requests_initial( self, location: str, parameters: Union[_models.ThrottledRequestsInput, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13802,7 +13787,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.RunCommandDocu api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-12-01")) cls: ClsType[_models.RunCommandListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13875,7 +13860,7 @@ def get(self, location: str, command_id: str, **kwargs: Any) -> _models.RunComma :rtype: ~azure.mgmt.compute.v2017_12_01.models.RunCommandDocument :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/__init__.py index 3b1b6244b2375..ab7c46e8991db 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/__init__.py @@ -5,15 +5,21 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._compute_management_client import ComputeManagementClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._compute_management_client import ComputeManagementClient # 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__ = [ "ComputeManagementClient", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/_compute_management_client.py index f4f3ba8d495a2..3b4f6a3b0dcf0 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/_compute_management_client.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/_compute_management_client.py @@ -40,11 +40,10 @@ ) if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class ComputeManagementClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes +class ComputeManagementClient: # pylint: disable=too-many-instance-attributes """Compute Client. :ivar operations: Operations operations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/_configuration.py index bc115f94803ad..387731189cff8 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/_configuration.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/_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 ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ComputeManagementClient. Note that all parameters used to create this instance are saved as instance diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/_version.py index d79b2760319c5..e5754a47ce68f 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "33.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/aio/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/aio/__init__.py index 0715f50185586..d3fd1ba93379a 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/aio/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/aio/__init__.py @@ -5,12 +5,18 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._compute_management_client import ComputeManagementClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._compute_management_client import ComputeManagementClient # 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__ = [ "ComputeManagementClient", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/aio/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/aio/_compute_management_client.py index 5c285c48c6b9a..5fe4b96c6bcdf 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/aio/_compute_management_client.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/aio/_compute_management_client.py @@ -40,11 +40,10 @@ ) if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class ComputeManagementClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes +class ComputeManagementClient: # pylint: disable=too-many-instance-attributes """Compute Client. :ivar operations: Operations operations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/aio/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/aio/_configuration.py index f8dd90dd2230d..e3f4283b402d6 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/aio/_configuration.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/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 ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ComputeManagementClient. Note that all parameters used to create this instance are saved as instance diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/aio/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/aio/operations/__init__.py index 721a9886b26d2..b86df74754093 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/aio/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/aio/operations/__init__.py @@ -5,28 +5,34 @@ # Code generated by Microsoft (R) AutoRest 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 AvailabilitySetsOperations -from ._operations import ProximityPlacementGroupsOperations -from ._operations import VirtualMachineExtensionImagesOperations -from ._operations import VirtualMachineExtensionsOperations -from ._operations import VirtualMachineImagesOperations -from ._operations import UsageOperations -from ._operations import VirtualMachinesOperations -from ._operations import VirtualMachineSizesOperations -from ._operations import ImagesOperations -from ._operations import VirtualMachineScaleSetsOperations -from ._operations import VirtualMachineScaleSetExtensionsOperations -from ._operations import VirtualMachineScaleSetRollingUpgradesOperations -from ._operations import VirtualMachineScaleSetVMsOperations -from ._operations import LogAnalyticsOperations -from ._operations import VirtualMachineRunCommandsOperations -from ._operations import DisksOperations -from ._operations import SnapshotsOperations +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 AvailabilitySetsOperations # type: ignore +from ._operations import ProximityPlacementGroupsOperations # type: ignore +from ._operations import VirtualMachineExtensionImagesOperations # type: ignore +from ._operations import VirtualMachineExtensionsOperations # type: ignore +from ._operations import VirtualMachineImagesOperations # type: ignore +from ._operations import UsageOperations # type: ignore +from ._operations import VirtualMachinesOperations # type: ignore +from ._operations import VirtualMachineSizesOperations # type: ignore +from ._operations import ImagesOperations # type: ignore +from ._operations import VirtualMachineScaleSetsOperations # type: ignore +from ._operations import VirtualMachineScaleSetExtensionsOperations # type: ignore +from ._operations import VirtualMachineScaleSetRollingUpgradesOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMsOperations # type: ignore +from ._operations import LogAnalyticsOperations # type: ignore +from ._operations import VirtualMachineRunCommandsOperations # type: ignore +from ._operations import DisksOperations # type: ignore +from ._operations import SnapshotsOperations # 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__ = [ @@ -49,5 +55,5 @@ "DisksOperations", "SnapshotsOperations", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/aio/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/aio/operations/_operations.py index 4a2263850542e..dd4915afde792 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/aio/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/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. @@ -18,7 +18,6 @@ List, Literal, Optional, - Type, TypeVar, Union, cast, @@ -168,7 +167,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]] @@ -209,7 +208,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.ComputeOperationValue"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-04-01")) cls: ClsType[_models.ComputeOperationListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -362,7 +361,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2018_04_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -489,7 +488,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2018_04_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -544,9 +543,7 @@ async def update( return deserialized # type: ignore @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, availability_set_name: str, **kwargs: Any - ) -> None: + async def delete(self, resource_group_name: str, availability_set_name: str, **kwargs: Any) -> None: """Delete an availability set. :param resource_group_name: The name of the resource group. Required. @@ -557,7 +554,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -607,7 +604,7 @@ async def get(self, resource_group_name: str, availability_set_name: str, **kwar :rtype: ~azure.mgmt.compute.v2018_04_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -669,7 +666,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-04-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -747,7 +744,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-04-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -830,7 +827,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-04-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -988,7 +985,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2018_04_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1118,7 +1115,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2018_04_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1173,9 +1170,7 @@ async def update( return deserialized # type: ignore @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, proximity_placement_group_name: str, **kwargs: Any - ) -> None: + async def delete(self, resource_group_name: str, proximity_placement_group_name: str, **kwargs: Any) -> None: """Delete a proximity placement group. :param resource_group_name: The name of the resource group. Required. @@ -1186,7 +1181,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1238,7 +1233,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2018_04_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1296,7 +1291,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Proximit api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-04-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1376,7 +1371,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-04-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1476,7 +1471,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineExtensionImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1534,7 +1529,7 @@ async def list_types( :rtype: list[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1606,7 +1601,7 @@ async def list_versions( :rtype: list[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1681,7 +1676,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineExtension, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1891,7 +1886,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineExtensionUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2097,7 +2092,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_name: str, vm_extension_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2227,7 +2222,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2287,7 +2282,7 @@ async def list( :rtype: ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2371,7 +2366,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2450,7 +2445,7 @@ async def list( :rtype: list[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2511,7 +2506,7 @@ async def list_offers( :rtype: list[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2563,7 +2558,7 @@ async def list_publishers(self, location: str, **kwargs: Any) -> List[_models.Vi :rtype: list[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2620,7 +2615,7 @@ async def list_skus( :rtype: list[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2701,7 +2696,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.Usage"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-04-01")) cls: ClsType[_models.ListUsagesResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2801,7 +2796,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> AsyncIterable["_mode api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-04-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2869,7 +2864,7 @@ async def _capture_initial( parameters: Union[_models.VirtualMachineCaptureParameters, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3067,7 +3062,7 @@ async def _create_or_update_initial( parameters: Union[_models.VirtualMachine, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3259,7 +3254,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3445,7 +3440,7 @@ def get_long_running_output(pipeline_response): ) async def _delete_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3561,7 +3556,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2018_04_01.models.VirtualMachine :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3618,7 +3613,7 @@ async def instance_view( :rtype: ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3663,7 +3658,7 @@ async def instance_view( async def _convert_to_managed_disks_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3766,7 +3761,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _deallocate_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3867,9 +3862,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace_async - async def generalize( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, vm_name: str, **kwargs: Any - ) -> None: + async def generalize(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> None: """Sets the state of the virtual machine to generalized. :param resource_group_name: The name of the resource group. Required. @@ -3880,7 +3873,7 @@ async def generalize( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3936,7 +3929,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-04-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4013,7 +4006,7 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.VirtualMachine"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-04-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4095,7 +4088,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-04-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4158,7 +4151,7 @@ async def get_next(next_link=None): return AsyncItemPaged(get_next, extract_data) async def _power_off_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4259,7 +4252,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _restart_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4359,7 +4352,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _start_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4459,7 +4452,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _redeploy_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4561,7 +4554,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _perform_maintenance_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4669,7 +4662,7 @@ async def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4894,7 +4887,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.VirtualMa api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-04-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4979,7 +4972,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, image_name: str, parameters: Union[_models.Image, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5161,7 +5154,7 @@ async def _update_initial( parameters: Union[_models.ImageUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5341,7 +5334,7 @@ def get_long_running_output(pipeline_response): ) async def _delete_initial(self, resource_group_name: str, image_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5456,7 +5449,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2018_04_01.models.Image :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5515,7 +5508,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-04-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5591,7 +5584,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Image"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-04-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5679,7 +5672,7 @@ async def _create_or_update_initial( parameters: Union[_models.VirtualMachineScaleSet, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5871,7 +5864,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineScaleSetUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6060,7 +6053,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6175,7 +6168,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6224,7 +6217,7 @@ async def _deallocate_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6419,7 +6412,7 @@ async def _delete_instances_initial( vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6612,7 +6605,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6672,7 +6665,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-04-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6751,7 +6744,7 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.VirtualMachineScaleS api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-04-01")) cls: ClsType[_models.VirtualMachineScaleSetListWithLinkResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6834,7 +6827,7 @@ def list_skus( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-04-01")) cls: ClsType[_models.VirtualMachineScaleSetListSkusResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6900,6 +6893,7 @@ async def get_next(next_link=None): def get_os_upgrade_history( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> AsyncIterable["_models.UpgradeOperationHistoricalStatusInfo"]: + # pylint: disable=line-too-long """Gets list of OS upgrades on a VM scale set instance. :param resource_group_name: The name of the resource group. Required. @@ -6918,7 +6912,7 @@ def get_os_upgrade_history( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-04-01")) cls: ClsType[_models.VirtualMachineScaleSetListOSUpgradeHistory] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6987,7 +6981,7 @@ async def _power_off_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7182,7 +7176,7 @@ async def _restart_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7371,7 +7365,7 @@ async def _start_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7560,7 +7554,7 @@ async def _redeploy_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7752,7 +7746,7 @@ async def _perform_maintenance_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7950,7 +7944,7 @@ async def _update_instances_initial( vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8136,7 +8130,7 @@ async def _reimage_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8325,7 +8319,7 @@ async def _reimage_all_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8528,7 +8522,7 @@ async def force_recovery_service_fabric_platform_update_domain_walk( # pylint: :rtype: ~azure.mgmt.compute.v2018_04_01.models.RecoveryWalkResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8600,7 +8594,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtension, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8806,7 +8800,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, vmss_extension_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8936,7 +8930,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9002,7 +8996,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-04-01")) cls: ClsType[_models.VirtualMachineScaleSetExtensionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9088,7 +9082,7 @@ def __init__(self, *args, **kwargs) -> None: async def _cancel_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9192,7 +9186,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_os_upgrade_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9309,7 +9303,7 @@ async def get_latest( :rtype: ~azure.mgmt.compute.v2018_04_01.models.RollingUpgradeStatusInfo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9375,7 +9369,7 @@ def __init__(self, *args, **kwargs) -> None: async def _reimage_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9483,7 +9477,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _reimage_all_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9592,7 +9586,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _deallocate_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9707,7 +9701,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineScaleSetVM, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9911,7 +9905,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10032,7 +10026,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetVM :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10091,7 +10085,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetVMInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10173,7 +10167,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-04-01")) cls: ClsType[_models.VirtualMachineScaleSetVMListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10241,7 +10235,7 @@ async def get_next(next_link=None): async def _power_off_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10351,7 +10345,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _restart_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10459,7 +10453,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10567,7 +10561,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _redeploy_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10676,7 +10670,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _perform_maintenance_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10789,7 +10783,7 @@ async def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11011,7 +11005,7 @@ def __init__(self, *args, **kwargs) -> None: async def _export_request_rate_by_interval_initial( self, location: str, parameters: Union[_models.RequestRateByIntervalInput, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11189,7 +11183,7 @@ def get_long_running_output(pipeline_response): async def _export_throttled_requests_initial( self, location: str, parameters: Union[_models.ThrottledRequestsInput, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11400,7 +11394,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.RunComman api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-04-01")) cls: ClsType[_models.RunCommandListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11473,7 +11467,7 @@ async def get(self, location: str, command_id: str, **kwargs: Any) -> _models.Ru :rtype: ~azure.mgmt.compute.v2018_04_01.models.RunCommandDocument :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11539,7 +11533,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.Disk, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11723,7 +11717,7 @@ def get_long_running_output(pipeline_response): async def _update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.DiskUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11918,7 +11912,7 @@ async def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.compute.v2018_04_01.models.Disk :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11961,7 +11955,7 @@ async def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> return deserialized # type: ignore async def _delete_initial(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12078,7 +12072,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-04-01")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12153,7 +12147,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Disk"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-04-01")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12220,7 +12214,7 @@ async def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12415,7 +12409,7 @@ def get_long_running_output(pipeline_response): async def _revoke_access_initial( self, resource_group_name: str, disk_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12544,7 +12538,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, snapshot_name: str, snapshot: Union[_models.Snapshot, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12735,7 +12729,7 @@ async def _update_initial( snapshot: Union[_models.SnapshotUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12939,7 +12933,7 @@ async def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) :rtype: ~azure.mgmt.compute.v2018_04_01.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12984,7 +12978,7 @@ async def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) async def _delete_initial( self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13102,7 +13096,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-04-01")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13178,7 +13172,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Snapshot"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-04-01")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13245,7 +13239,7 @@ async def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13440,7 +13434,7 @@ def get_long_running_output(pipeline_response): async def _revoke_access_initial( self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/__init__.py index aeaacab46c2d1..a0ac1f0e6fc09 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/__init__.py @@ -5,193 +5,204 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._models_py3 import AccessUri -from ._models_py3 import AdditionalUnattendContent -from ._models_py3 import ApiEntityReference -from ._models_py3 import ApiError -from ._models_py3 import ApiErrorBase -from ._models_py3 import AutoOSUpgradePolicy -from ._models_py3 import AvailabilitySet -from ._models_py3 import AvailabilitySetListResult -from ._models_py3 import AvailabilitySetUpdate -from ._models_py3 import BootDiagnostics -from ._models_py3 import BootDiagnosticsInstanceView -from ._models_py3 import ComputeOperationListResult -from ._models_py3 import ComputeOperationValue -from ._models_py3 import CreationData -from ._models_py3 import DataDisk -from ._models_py3 import DataDiskImage -from ._models_py3 import DiagnosticsProfile -from ._models_py3 import Disk -from ._models_py3 import DiskEncryptionSettings -from ._models_py3 import DiskInstanceView -from ._models_py3 import DiskList -from ._models_py3 import DiskSku -from ._models_py3 import DiskUpdate -from ._models_py3 import EncryptionSettings -from ._models_py3 import GrantAccessData -from ._models_py3 import HardwareProfile -from ._models_py3 import Image -from ._models_py3 import ImageDataDisk -from ._models_py3 import ImageDiskReference -from ._models_py3 import ImageListResult -from ._models_py3 import ImageOSDisk -from ._models_py3 import ImageReference -from ._models_py3 import ImageStorageProfile -from ._models_py3 import ImageUpdate -from ._models_py3 import InnerError -from ._models_py3 import InstanceViewStatus -from ._models_py3 import KeyVaultAndKeyReference -from ._models_py3 import KeyVaultAndSecretReference -from ._models_py3 import KeyVaultKeyReference -from ._models_py3 import KeyVaultSecretReference -from ._models_py3 import LinuxConfiguration -from ._models_py3 import ListUsagesResult -from ._models_py3 import LogAnalyticsInputBase -from ._models_py3 import LogAnalyticsOperationResult -from ._models_py3 import LogAnalyticsOutput -from ._models_py3 import MaintenanceRedeployStatus -from ._models_py3 import ManagedDiskParameters -from ._models_py3 import NetworkInterfaceReference -from ._models_py3 import NetworkProfile -from ._models_py3 import OSDisk -from ._models_py3 import OSDiskImage -from ._models_py3 import OSProfile -from ._models_py3 import Plan -from ._models_py3 import ProximityPlacementGroup -from ._models_py3 import ProximityPlacementGroupListResult -from ._models_py3 import ProximityPlacementGroupUpdate -from ._models_py3 import PurchasePlan -from ._models_py3 import RecoveryWalkResponse -from ._models_py3 import RequestRateByIntervalInput -from ._models_py3 import Resource -from ._models_py3 import RollbackStatusInfo -from ._models_py3 import RollingUpgradePolicy -from ._models_py3 import RollingUpgradeProgressInfo -from ._models_py3 import RollingUpgradeRunningStatus -from ._models_py3 import RollingUpgradeStatusInfo -from ._models_py3 import RunCommandDocument -from ._models_py3 import RunCommandDocumentBase -from ._models_py3 import RunCommandInput -from ._models_py3 import RunCommandInputParameter -from ._models_py3 import RunCommandListResult -from ._models_py3 import RunCommandParameterDefinition -from ._models_py3 import RunCommandResult -from ._models_py3 import Sku -from ._models_py3 import Snapshot -from ._models_py3 import SnapshotList -from ._models_py3 import SnapshotSku -from ._models_py3 import SnapshotUpdate -from ._models_py3 import SourceVault -from ._models_py3 import SshConfiguration -from ._models_py3 import SshPublicKey -from ._models_py3 import StorageProfile -from ._models_py3 import SubResource -from ._models_py3 import SubResourceReadOnly -from ._models_py3 import ThrottledRequestsInput -from ._models_py3 import UpdateResource -from ._models_py3 import UpgradeOperationHistoricalStatusInfo -from ._models_py3 import UpgradeOperationHistoricalStatusInfoProperties -from ._models_py3 import UpgradeOperationHistoryStatus -from ._models_py3 import UpgradePolicy -from ._models_py3 import Usage -from ._models_py3 import UsageName -from ._models_py3 import VaultCertificate -from ._models_py3 import VaultSecretGroup -from ._models_py3 import VirtualHardDisk -from ._models_py3 import VirtualMachine -from ._models_py3 import VirtualMachineAgentInstanceView -from ._models_py3 import VirtualMachineCaptureParameters -from ._models_py3 import VirtualMachineCaptureResult -from ._models_py3 import VirtualMachineExtension -from ._models_py3 import VirtualMachineExtensionHandlerInstanceView -from ._models_py3 import VirtualMachineExtensionImage -from ._models_py3 import VirtualMachineExtensionInstanceView -from ._models_py3 import VirtualMachineExtensionUpdate -from ._models_py3 import VirtualMachineExtensionsListResult -from ._models_py3 import VirtualMachineHealthStatus -from ._models_py3 import VirtualMachineIdentity -from ._models_py3 import VirtualMachineImage -from ._models_py3 import VirtualMachineImageResource -from ._models_py3 import VirtualMachineInstanceView -from ._models_py3 import VirtualMachineListResult -from ._models_py3 import VirtualMachineScaleSet -from ._models_py3 import VirtualMachineScaleSetDataDisk -from ._models_py3 import VirtualMachineScaleSetExtension -from ._models_py3 import VirtualMachineScaleSetExtensionListResult -from ._models_py3 import VirtualMachineScaleSetExtensionProfile -from ._models_py3 import VirtualMachineScaleSetIPConfiguration -from ._models_py3 import VirtualMachineScaleSetIdentity -from ._models_py3 import VirtualMachineScaleSetInstanceView -from ._models_py3 import VirtualMachineScaleSetInstanceViewStatusesSummary -from ._models_py3 import VirtualMachineScaleSetIpTag -from ._models_py3 import VirtualMachineScaleSetListOSUpgradeHistory -from ._models_py3 import VirtualMachineScaleSetListResult -from ._models_py3 import VirtualMachineScaleSetListSkusResult -from ._models_py3 import VirtualMachineScaleSetListWithLinkResult -from ._models_py3 import VirtualMachineScaleSetManagedDiskParameters -from ._models_py3 import VirtualMachineScaleSetNetworkConfiguration -from ._models_py3 import VirtualMachineScaleSetNetworkConfigurationDnsSettings -from ._models_py3 import VirtualMachineScaleSetNetworkProfile -from ._models_py3 import VirtualMachineScaleSetOSDisk -from ._models_py3 import VirtualMachineScaleSetOSProfile -from ._models_py3 import VirtualMachineScaleSetPublicIPAddressConfiguration -from ._models_py3 import VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings -from ._models_py3 import VirtualMachineScaleSetSku -from ._models_py3 import VirtualMachineScaleSetSkuCapacity -from ._models_py3 import VirtualMachineScaleSetStorageProfile -from ._models_py3 import VirtualMachineScaleSetUpdate -from ._models_py3 import VirtualMachineScaleSetUpdateIPConfiguration -from ._models_py3 import VirtualMachineScaleSetUpdateNetworkConfiguration -from ._models_py3 import VirtualMachineScaleSetUpdateNetworkProfile -from ._models_py3 import VirtualMachineScaleSetUpdateOSDisk -from ._models_py3 import VirtualMachineScaleSetUpdateOSProfile -from ._models_py3 import VirtualMachineScaleSetUpdatePublicIPAddressConfiguration -from ._models_py3 import VirtualMachineScaleSetUpdateStorageProfile -from ._models_py3 import VirtualMachineScaleSetUpdateVMProfile -from ._models_py3 import VirtualMachineScaleSetVM -from ._models_py3 import VirtualMachineScaleSetVMExtensionsSummary -from ._models_py3 import VirtualMachineScaleSetVMInstanceIDs -from ._models_py3 import VirtualMachineScaleSetVMInstanceRequiredIDs -from ._models_py3 import VirtualMachineScaleSetVMInstanceView -from ._models_py3 import VirtualMachineScaleSetVMListResult -from ._models_py3 import VirtualMachineScaleSetVMProfile -from ._models_py3 import VirtualMachineSize -from ._models_py3 import VirtualMachineSizeListResult -from ._models_py3 import VirtualMachineStatusCodeCount -from ._models_py3 import VirtualMachineUpdate -from ._models_py3 import WinRMConfiguration -from ._models_py3 import WinRMListener -from ._models_py3 import WindowsConfiguration +from typing import TYPE_CHECKING -from ._compute_management_client_enums import AccessLevel -from ._compute_management_client_enums import CachingTypes -from ._compute_management_client_enums import DiskCreateOption -from ._compute_management_client_enums import DiskCreateOptionTypes -from ._compute_management_client_enums import IPVersion -from ._compute_management_client_enums import IntervalInMins -from ._compute_management_client_enums import MaintenanceOperationResultCodeTypes -from ._compute_management_client_enums import OperatingSystemStateTypes -from ._compute_management_client_enums import OperatingSystemTypes -from ._compute_management_client_enums import ProtocolTypes -from ._compute_management_client_enums import ProximityPlacementGroupType -from ._compute_management_client_enums import ResourceIdentityType -from ._compute_management_client_enums import RollingUpgradeActionType -from ._compute_management_client_enums import RollingUpgradeStatusCode -from ._compute_management_client_enums import SettingNames -from ._compute_management_client_enums import SnapshotStorageAccountTypes -from ._compute_management_client_enums import StatusLevelTypes -from ._compute_management_client_enums import StorageAccountTypes -from ._compute_management_client_enums import UpgradeMode -from ._compute_management_client_enums import UpgradeOperationInvoker -from ._compute_management_client_enums import UpgradeState -from ._compute_management_client_enums import VirtualMachineEvictionPolicyTypes -from ._compute_management_client_enums import VirtualMachinePriorityTypes -from ._compute_management_client_enums import VirtualMachineScaleSetSkuScaleType -from ._compute_management_client_enums import VirtualMachineSizeTypes +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + + +from ._models_py3 import ( # type: ignore + AccessUri, + AdditionalUnattendContent, + ApiEntityReference, + ApiError, + ApiErrorBase, + AutoOSUpgradePolicy, + AvailabilitySet, + AvailabilitySetListResult, + AvailabilitySetUpdate, + BootDiagnostics, + BootDiagnosticsInstanceView, + ComputeOperationListResult, + ComputeOperationValue, + CreationData, + DataDisk, + DataDiskImage, + DiagnosticsProfile, + Disk, + DiskEncryptionSettings, + DiskInstanceView, + DiskList, + DiskSku, + DiskUpdate, + EncryptionSettings, + GrantAccessData, + HardwareProfile, + Image, + ImageDataDisk, + ImageDiskReference, + ImageListResult, + ImageOSDisk, + ImageReference, + ImageStorageProfile, + ImageUpdate, + InnerError, + InstanceViewStatus, + KeyVaultAndKeyReference, + KeyVaultAndSecretReference, + KeyVaultKeyReference, + KeyVaultSecretReference, + LinuxConfiguration, + ListUsagesResult, + LogAnalyticsInputBase, + LogAnalyticsOperationResult, + LogAnalyticsOutput, + MaintenanceRedeployStatus, + ManagedDiskParameters, + NetworkInterfaceReference, + NetworkProfile, + OSDisk, + OSDiskImage, + OSProfile, + Plan, + ProximityPlacementGroup, + ProximityPlacementGroupListResult, + ProximityPlacementGroupUpdate, + PurchasePlan, + RecoveryWalkResponse, + RequestRateByIntervalInput, + Resource, + RollbackStatusInfo, + RollingUpgradePolicy, + RollingUpgradeProgressInfo, + RollingUpgradeRunningStatus, + RollingUpgradeStatusInfo, + RunCommandDocument, + RunCommandDocumentBase, + RunCommandInput, + RunCommandInputParameter, + RunCommandListResult, + RunCommandParameterDefinition, + RunCommandResult, + Sku, + Snapshot, + SnapshotList, + SnapshotSku, + SnapshotUpdate, + SourceVault, + SshConfiguration, + SshPublicKey, + StorageProfile, + SubResource, + SubResourceReadOnly, + ThrottledRequestsInput, + UpdateResource, + UpgradeOperationHistoricalStatusInfo, + UpgradeOperationHistoricalStatusInfoProperties, + UpgradeOperationHistoryStatus, + UpgradePolicy, + Usage, + UsageName, + VaultCertificate, + VaultSecretGroup, + VirtualHardDisk, + VirtualMachine, + VirtualMachineAgentInstanceView, + VirtualMachineCaptureParameters, + VirtualMachineCaptureResult, + VirtualMachineExtension, + VirtualMachineExtensionHandlerInstanceView, + VirtualMachineExtensionImage, + VirtualMachineExtensionInstanceView, + VirtualMachineExtensionUpdate, + VirtualMachineExtensionsListResult, + VirtualMachineHealthStatus, + VirtualMachineIdentity, + VirtualMachineImage, + VirtualMachineImageResource, + VirtualMachineInstanceView, + VirtualMachineListResult, + VirtualMachineScaleSet, + VirtualMachineScaleSetDataDisk, + VirtualMachineScaleSetExtension, + VirtualMachineScaleSetExtensionListResult, + VirtualMachineScaleSetExtensionProfile, + VirtualMachineScaleSetIPConfiguration, + VirtualMachineScaleSetIdentity, + VirtualMachineScaleSetInstanceView, + VirtualMachineScaleSetInstanceViewStatusesSummary, + VirtualMachineScaleSetIpTag, + VirtualMachineScaleSetListOSUpgradeHistory, + VirtualMachineScaleSetListResult, + VirtualMachineScaleSetListSkusResult, + VirtualMachineScaleSetListWithLinkResult, + VirtualMachineScaleSetManagedDiskParameters, + VirtualMachineScaleSetNetworkConfiguration, + VirtualMachineScaleSetNetworkConfigurationDnsSettings, + VirtualMachineScaleSetNetworkProfile, + VirtualMachineScaleSetOSDisk, + VirtualMachineScaleSetOSProfile, + VirtualMachineScaleSetPublicIPAddressConfiguration, + VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings, + VirtualMachineScaleSetSku, + VirtualMachineScaleSetSkuCapacity, + VirtualMachineScaleSetStorageProfile, + VirtualMachineScaleSetUpdate, + VirtualMachineScaleSetUpdateIPConfiguration, + VirtualMachineScaleSetUpdateNetworkConfiguration, + VirtualMachineScaleSetUpdateNetworkProfile, + VirtualMachineScaleSetUpdateOSDisk, + VirtualMachineScaleSetUpdateOSProfile, + VirtualMachineScaleSetUpdatePublicIPAddressConfiguration, + VirtualMachineScaleSetUpdateStorageProfile, + VirtualMachineScaleSetUpdateVMProfile, + VirtualMachineScaleSetVM, + VirtualMachineScaleSetVMExtensionsSummary, + VirtualMachineScaleSetVMInstanceIDs, + VirtualMachineScaleSetVMInstanceRequiredIDs, + VirtualMachineScaleSetVMInstanceView, + VirtualMachineScaleSetVMListResult, + VirtualMachineScaleSetVMProfile, + VirtualMachineSize, + VirtualMachineSizeListResult, + VirtualMachineStatusCodeCount, + VirtualMachineUpdate, + WinRMConfiguration, + WinRMListener, + WindowsConfiguration, +) + +from ._compute_management_client_enums import ( # type: ignore + AccessLevel, + CachingTypes, + DiskCreateOption, + DiskCreateOptionTypes, + IPVersion, + IntervalInMins, + MaintenanceOperationResultCodeTypes, + OperatingSystemStateTypes, + OperatingSystemTypes, + ProtocolTypes, + ProximityPlacementGroupType, + ResourceIdentityType, + RollingUpgradeActionType, + RollingUpgradeStatusCode, + SettingNames, + SnapshotStorageAccountTypes, + StatusLevelTypes, + StorageAccountTypes, + UpgradeMode, + UpgradeOperationInvoker, + UpgradeState, + VirtualMachineEvictionPolicyTypes, + VirtualMachinePriorityTypes, + VirtualMachineScaleSetSkuScaleType, + VirtualMachineSizeTypes, +) 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__ = [ @@ -379,5 +390,5 @@ "VirtualMachineScaleSetSkuScaleType", "VirtualMachineSizeTypes", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/_models_py3.py index 49630777629a1..f8f06c6f95d78 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/_models_py3.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/_models_py3.py @@ -1,5 +1,5 @@ -# 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. @@ -16,10 +16,9 @@ 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 if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object @@ -287,7 +286,7 @@ def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kw self.tags = tags -class AvailabilitySet(Resource): # pylint: disable=too-many-instance-attributes +class AvailabilitySet(Resource): """Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see `Manage the @@ -900,7 +899,7 @@ def __init__(self, *, boot_diagnostics: Optional["_models.BootDiagnostics"] = No self.boot_diagnostics = boot_diagnostics -class Disk(Resource): # pylint: disable=too-many-instance-attributes +class Disk(Resource): """Disk resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -3774,7 +3773,7 @@ def __init__( self.capacity = capacity -class Snapshot(Resource): # pylint: disable=too-many-instance-attributes +class Snapshot(Resource): """Snapshot resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -4548,7 +4547,7 @@ def __init__(self, *, uri: Optional[str] = None, **kwargs: Any) -> None: self.uri = uri -class VirtualMachine(Resource): # pylint: disable=too-many-instance-attributes +class VirtualMachine(Resource): """Describes a Virtual Machine. Variables are only populated by the server, and will be ignored when sending a request. @@ -4871,7 +4870,7 @@ def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylin self.resources = None -class VirtualMachineExtension(Resource): # pylint: disable=too-many-instance-attributes +class VirtualMachineExtension(Resource): """Describes a Virtual Machine Extension. Variables are only populated by the server, and will be ignored when sending a request. @@ -5492,7 +5491,7 @@ def __init__( self.data_disk_images = data_disk_images -class VirtualMachineInstanceView(_serialization.Model): # pylint: disable=too-many-instance-attributes +class VirtualMachineInstanceView(_serialization.Model): """The instance view of a virtual machine. :ivar platform_update_domain: Specifies the update domain of the virtual machine. @@ -5640,7 +5639,7 @@ def __init__( self.next_link = next_link -class VirtualMachineScaleSet(Resource): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSet(Resource): """Describes a Virtual Machine Scale Set. Variables are only populated by the server, and will be ignored when sending a request. @@ -7728,7 +7727,7 @@ def __init__( self.license_type = license_type -class VirtualMachineScaleSetVM(Resource): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetVM(Resource): """Describes a virtual machine scale set virtual machine. Variables are only populated by the server, and will be ignored when sending a request. @@ -7997,7 +7996,7 @@ def __init__(self, *, instance_ids: List[str], **kwargs: Any) -> None: self.instance_ids = instance_ids -class VirtualMachineScaleSetVMInstanceView(_serialization.Model): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetVMInstanceView(_serialization.Model): """The instance view of a virtual machine scale set VM. Variables are only populated by the server, and will be ignored when sending a request. @@ -8367,7 +8366,7 @@ def __init__(self, **kwargs: Any) -> None: self.count = None -class VirtualMachineUpdate(UpdateResource): # pylint: disable=too-many-instance-attributes +class VirtualMachineUpdate(UpdateResource): """Describes a Virtual Machine Update. Variables are only populated by the server, and will be ignored when sending a request. diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/__init__.py index 721a9886b26d2..b86df74754093 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/__init__.py @@ -5,28 +5,34 @@ # Code generated by Microsoft (R) AutoRest 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 AvailabilitySetsOperations -from ._operations import ProximityPlacementGroupsOperations -from ._operations import VirtualMachineExtensionImagesOperations -from ._operations import VirtualMachineExtensionsOperations -from ._operations import VirtualMachineImagesOperations -from ._operations import UsageOperations -from ._operations import VirtualMachinesOperations -from ._operations import VirtualMachineSizesOperations -from ._operations import ImagesOperations -from ._operations import VirtualMachineScaleSetsOperations -from ._operations import VirtualMachineScaleSetExtensionsOperations -from ._operations import VirtualMachineScaleSetRollingUpgradesOperations -from ._operations import VirtualMachineScaleSetVMsOperations -from ._operations import LogAnalyticsOperations -from ._operations import VirtualMachineRunCommandsOperations -from ._operations import DisksOperations -from ._operations import SnapshotsOperations +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 AvailabilitySetsOperations # type: ignore +from ._operations import ProximityPlacementGroupsOperations # type: ignore +from ._operations import VirtualMachineExtensionImagesOperations # type: ignore +from ._operations import VirtualMachineExtensionsOperations # type: ignore +from ._operations import VirtualMachineImagesOperations # type: ignore +from ._operations import UsageOperations # type: ignore +from ._operations import VirtualMachinesOperations # type: ignore +from ._operations import VirtualMachineSizesOperations # type: ignore +from ._operations import ImagesOperations # type: ignore +from ._operations import VirtualMachineScaleSetsOperations # type: ignore +from ._operations import VirtualMachineScaleSetExtensionsOperations # type: ignore +from ._operations import VirtualMachineScaleSetRollingUpgradesOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMsOperations # type: ignore +from ._operations import LogAnalyticsOperations # type: ignore +from ._operations import VirtualMachineRunCommandsOperations # type: ignore +from ._operations import DisksOperations # type: ignore +from ._operations import SnapshotsOperations # 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__ = [ @@ -49,5 +55,5 @@ "DisksOperations", "SnapshotsOperations", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/_operations.py index 0f087baf6856f..aa794ae05b09b 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/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. @@ -8,22 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import ( - Any, - Callable, - Dict, - IO, - Iterable, - Iterator, - List, - Literal, - Optional, - Type, - TypeVar, - Union, - cast, - overload, -) +from typing import Any, Callable, Dict, IO, Iterable, Iterator, List, Literal, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -51,7 +36,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, HttpResponse], T, Dict[str, Any]], Any]] @@ -3594,7 +3579,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.ComputeOperationValue"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-04-01")) cls: ClsType[_models.ComputeOperationListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3747,7 +3732,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2018_04_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3874,7 +3859,7 @@ def update( :rtype: ~azure.mgmt.compute.v2018_04_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3942,7 +3927,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3992,7 +3977,7 @@ def get(self, resource_group_name: str, availability_set_name: str, **kwargs: An :rtype: ~azure.mgmt.compute.v2018_04_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4053,7 +4038,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-04-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4130,7 +4115,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Ava api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-04-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4212,7 +4197,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-04-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4370,7 +4355,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2018_04_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4500,7 +4485,7 @@ def update( :rtype: ~azure.mgmt.compute.v2018_04_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4568,7 +4553,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4620,7 +4605,7 @@ def get( :rtype: ~azure.mgmt.compute.v2018_04_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4678,7 +4663,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.ProximityPlac api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-04-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4758,7 +4743,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-04-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4858,7 +4843,7 @@ def get( :rtype: ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineExtensionImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4916,7 +4901,7 @@ def list_types( :rtype: list[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4988,7 +4973,7 @@ def list_versions( :rtype: list[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5063,7 +5048,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineExtension, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5273,7 +5258,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineExtensionUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5479,7 +5464,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_name: str, vm_extension_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5609,7 +5594,7 @@ def get( :rtype: ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5669,7 +5654,7 @@ def list( :rtype: ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5753,7 +5738,7 @@ def get( :rtype: ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5832,7 +5817,7 @@ def list( :rtype: list[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5893,7 +5878,7 @@ def list_offers( :rtype: list[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5945,7 +5930,7 @@ def list_publishers(self, location: str, **kwargs: Any) -> List[_models.VirtualM :rtype: list[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6002,7 +5987,7 @@ def list_skus( :rtype: list[~azure.mgmt.compute.v2018_04_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6083,7 +6068,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.Usage"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-04-01")) cls: ClsType[_models.ListUsagesResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6182,7 +6167,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> Iterable["_models.Vi api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-04-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6250,7 +6235,7 @@ def _capture_initial( parameters: Union[_models.VirtualMachineCaptureParameters, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6448,7 +6433,7 @@ def _create_or_update_initial( parameters: Union[_models.VirtualMachine, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6637,7 +6622,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6820,7 +6805,7 @@ def get_long_running_output(pipeline_response): ) def _delete_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6936,7 +6921,7 @@ def get( :rtype: ~azure.mgmt.compute.v2018_04_01.models.VirtualMachine :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6993,7 +6978,7 @@ def instance_view( :rtype: ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7038,7 +7023,7 @@ def instance_view( def _convert_to_managed_disks_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7139,7 +7124,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _deallocate_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7253,7 +7238,7 @@ def generalize( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7308,7 +7293,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Vir api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-04-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7384,7 +7369,7 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.VirtualMachine"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-04-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7465,7 +7450,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-04-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7528,7 +7513,7 @@ def get_next(next_link=None): return ItemPaged(get_next, extract_data) def _power_off_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7629,7 +7614,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _restart_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7729,7 +7714,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _start_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7829,7 +7814,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _redeploy_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7929,7 +7914,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _perform_maintenance_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8035,7 +8020,7 @@ def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8256,7 +8241,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.VirtualMachine api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-04-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8341,7 +8326,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, image_name: str, parameters: Union[_models.Image, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8523,7 +8508,7 @@ def _update_initial( parameters: Union[_models.ImageUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8703,7 +8688,7 @@ def get_long_running_output(pipeline_response): ) def _delete_initial(self, resource_group_name: str, image_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8818,7 +8803,7 @@ def get( :rtype: ~azure.mgmt.compute.v2018_04_01.models.Image :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8877,7 +8862,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-04-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8953,7 +8938,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Image"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-04-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9041,7 +9026,7 @@ def _create_or_update_initial( parameters: Union[_models.VirtualMachineScaleSet, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9233,7 +9218,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineScaleSetUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9420,7 +9405,7 @@ def get_long_running_output(pipeline_response): ) def _delete_initial(self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9531,7 +9516,7 @@ def get(self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) - :rtype: ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9580,7 +9565,7 @@ def _deallocate_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9775,7 +9760,7 @@ def _delete_instances_initial( vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9968,7 +9953,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10028,7 +10013,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Vir api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-04-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10107,7 +10092,7 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.VirtualMachineScaleSet"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-04-01")) cls: ClsType[_models.VirtualMachineScaleSetListWithLinkResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10190,7 +10175,7 @@ def list_skus( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-04-01")) cls: ClsType[_models.VirtualMachineScaleSetListSkusResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10274,7 +10259,7 @@ def get_os_upgrade_history( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-04-01")) cls: ClsType[_models.VirtualMachineScaleSetListOSUpgradeHistory] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10343,7 +10328,7 @@ def _power_off_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10538,7 +10523,7 @@ def _restart_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10727,7 +10712,7 @@ def _start_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10916,7 +10901,7 @@ def _redeploy_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11108,7 +11093,7 @@ def _perform_maintenance_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11306,7 +11291,7 @@ def _update_instances_initial( vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11492,7 +11477,7 @@ def _reimage_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11681,7 +11666,7 @@ def _reimage_all_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11884,7 +11869,7 @@ def force_recovery_service_fabric_platform_update_domain_walk( # pylint: disabl :rtype: ~azure.mgmt.compute.v2018_04_01.models.RecoveryWalkResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11956,7 +11941,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtension, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12162,7 +12147,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, vmss_extension_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12292,7 +12277,7 @@ def get( :rtype: ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12358,7 +12343,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-04-01")) cls: ClsType[_models.VirtualMachineScaleSetExtensionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12442,7 +12427,7 @@ def __init__(self, *args, **kwargs): self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") def _cancel_initial(self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12544,7 +12529,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_os_upgrade_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12661,7 +12646,7 @@ def get_latest( :rtype: ~azure.mgmt.compute.v2018_04_01.models.RollingUpgradeStatusInfo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12727,7 +12712,7 @@ def __init__(self, *args, **kwargs): def _reimage_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12835,7 +12820,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _reimage_all_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12944,7 +12929,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _deallocate_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13059,7 +13044,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineScaleSetVM, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13263,7 +13248,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13384,7 +13369,7 @@ def get( :rtype: ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetVM :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13443,7 +13428,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2018_04_01.models.VirtualMachineScaleSetVMInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13525,7 +13510,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-04-01")) cls: ClsType[_models.VirtualMachineScaleSetVMListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13593,7 +13578,7 @@ def get_next(next_link=None): def _power_off_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13703,7 +13688,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _restart_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13811,7 +13796,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13919,7 +13904,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _redeploy_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14028,7 +14013,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _perform_maintenance_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14141,7 +14126,7 @@ def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14360,7 +14345,7 @@ def __init__(self, *args, **kwargs): def _export_request_rate_by_interval_initial( self, location: str, parameters: Union[_models.RequestRateByIntervalInput, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14537,7 +14522,7 @@ def get_long_running_output(pipeline_response): def _export_throttled_requests_initial( self, location: str, parameters: Union[_models.ThrottledRequestsInput, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14747,7 +14732,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.RunCommandDocu api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-04-01")) cls: ClsType[_models.RunCommandListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14820,7 +14805,7 @@ def get(self, location: str, command_id: str, **kwargs: Any) -> _models.RunComma :rtype: ~azure.mgmt.compute.v2018_04_01.models.RunCommandDocument :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14886,7 +14871,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.Disk, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15070,7 +15055,7 @@ def get_long_running_output(pipeline_response): def _update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.DiskUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15265,7 +15250,7 @@ def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> _model :rtype: ~azure.mgmt.compute.v2018_04_01.models.Disk :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15308,7 +15293,7 @@ def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> _model return deserialized # type: ignore def _delete_initial(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15425,7 +15410,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-04-01")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15500,7 +15485,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Disk"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-04-01")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15567,7 +15552,7 @@ def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15757,7 +15742,7 @@ def get_long_running_output(pipeline_response): ) def _revoke_access_initial(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15884,7 +15869,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, snapshot_name: str, snapshot: Union[_models.Snapshot, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16072,7 +16057,7 @@ def _update_initial( snapshot: Union[_models.SnapshotUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16273,7 +16258,7 @@ def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> _m :rtype: ~azure.mgmt.compute.v2018_04_01.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16316,7 +16301,7 @@ def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> _m return deserialized # type: ignore def _delete_initial(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16433,7 +16418,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-04-01")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16508,7 +16493,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Snapshot"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-04-01")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16575,7 +16560,7 @@ def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16765,7 +16750,7 @@ def get_long_running_output(pipeline_response): ) def _revoke_access_initial(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/__init__.py index 3b1b6244b2375..ab7c46e8991db 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/__init__.py @@ -5,15 +5,21 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._compute_management_client import ComputeManagementClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._compute_management_client import ComputeManagementClient # 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__ = [ "ComputeManagementClient", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/_compute_management_client.py index 1a05fa1223ff0..f49892f9e86cf 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/_compute_management_client.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/_compute_management_client.py @@ -43,11 +43,10 @@ ) if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class ComputeManagementClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes +class ComputeManagementClient: # pylint: disable=too-many-instance-attributes """Compute Client. :ivar operations: Operations operations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/_configuration.py index 2e004dce05ac3..591dd6c209ca0 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/_configuration.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/_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 ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ComputeManagementClient. Note that all parameters used to create this instance are saved as instance diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/_version.py index d79b2760319c5..e5754a47ce68f 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "33.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/aio/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/aio/__init__.py index 0715f50185586..d3fd1ba93379a 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/aio/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/aio/__init__.py @@ -5,12 +5,18 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._compute_management_client import ComputeManagementClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._compute_management_client import ComputeManagementClient # 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__ = [ "ComputeManagementClient", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/aio/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/aio/_compute_management_client.py index 25eca4dea3bc0..9a95057be39b5 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/aio/_compute_management_client.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/aio/_compute_management_client.py @@ -43,11 +43,10 @@ ) if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class ComputeManagementClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes +class ComputeManagementClient: # pylint: disable=too-many-instance-attributes """Compute Client. :ivar operations: Operations operations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/aio/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/aio/_configuration.py index 4fba35c0877d5..981c53e0b96b9 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/aio/_configuration.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/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 ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ComputeManagementClient. Note that all parameters used to create this instance are saved as instance diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/aio/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/aio/operations/__init__.py index 5742aa4381b56..7cc1e04a1ba67 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/aio/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/aio/operations/__init__.py @@ -5,31 +5,37 @@ # Code generated by Microsoft (R) AutoRest 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 AvailabilitySetsOperations -from ._operations import ProximityPlacementGroupsOperations -from ._operations import VirtualMachineExtensionImagesOperations -from ._operations import VirtualMachineExtensionsOperations -from ._operations import VirtualMachineImagesOperations -from ._operations import UsageOperations -from ._operations import VirtualMachinesOperations -from ._operations import VirtualMachineSizesOperations -from ._operations import ImagesOperations -from ._operations import VirtualMachineScaleSetsOperations -from ._operations import VirtualMachineScaleSetExtensionsOperations -from ._operations import VirtualMachineScaleSetRollingUpgradesOperations -from ._operations import VirtualMachineScaleSetVMsOperations -from ._operations import LogAnalyticsOperations -from ._operations import VirtualMachineRunCommandsOperations -from ._operations import GalleriesOperations -from ._operations import GalleryImagesOperations -from ._operations import GalleryImageVersionsOperations -from ._operations import DisksOperations -from ._operations import SnapshotsOperations +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 AvailabilitySetsOperations # type: ignore +from ._operations import ProximityPlacementGroupsOperations # type: ignore +from ._operations import VirtualMachineExtensionImagesOperations # type: ignore +from ._operations import VirtualMachineExtensionsOperations # type: ignore +from ._operations import VirtualMachineImagesOperations # type: ignore +from ._operations import UsageOperations # type: ignore +from ._operations import VirtualMachinesOperations # type: ignore +from ._operations import VirtualMachineSizesOperations # type: ignore +from ._operations import ImagesOperations # type: ignore +from ._operations import VirtualMachineScaleSetsOperations # type: ignore +from ._operations import VirtualMachineScaleSetExtensionsOperations # type: ignore +from ._operations import VirtualMachineScaleSetRollingUpgradesOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMsOperations # type: ignore +from ._operations import LogAnalyticsOperations # type: ignore +from ._operations import VirtualMachineRunCommandsOperations # type: ignore +from ._operations import GalleriesOperations # type: ignore +from ._operations import GalleryImagesOperations # type: ignore +from ._operations import GalleryImageVersionsOperations # type: ignore +from ._operations import DisksOperations # type: ignore +from ._operations import SnapshotsOperations # 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__ = [ @@ -55,5 +61,5 @@ "DisksOperations", "SnapshotsOperations", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/aio/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/aio/operations/_operations.py index 29dc5ae3d989f..238a029103f74 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/aio/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/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. @@ -18,7 +18,6 @@ List, Literal, Optional, - Type, TypeVar, Union, cast, @@ -183,7 +182,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]] @@ -224,7 +223,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.ComputeOperationValue"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.ComputeOperationListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -377,7 +376,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2018_06_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -504,7 +503,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2018_06_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -559,9 +558,7 @@ async def update( return deserialized # type: ignore @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, availability_set_name: str, **kwargs: Any - ) -> None: + async def delete(self, resource_group_name: str, availability_set_name: str, **kwargs: Any) -> None: """Delete an availability set. :param resource_group_name: The name of the resource group. Required. @@ -572,7 +569,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -622,7 +619,7 @@ async def get(self, resource_group_name: str, availability_set_name: str, **kwar :rtype: ~azure.mgmt.compute.v2018_06_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -684,7 +681,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -762,7 +759,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -845,7 +842,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1003,7 +1000,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2018_06_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1133,7 +1130,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2018_06_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1188,9 +1185,7 @@ async def update( return deserialized # type: ignore @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, proximity_placement_group_name: str, **kwargs: Any - ) -> None: + async def delete(self, resource_group_name: str, proximity_placement_group_name: str, **kwargs: Any) -> None: """Delete a proximity placement group. :param resource_group_name: The name of the resource group. Required. @@ -1201,7 +1196,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1253,7 +1248,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2018_06_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1311,7 +1306,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Proximit api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1391,7 +1386,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1491,7 +1486,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineExtensionImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1549,7 +1544,7 @@ async def list_types( :rtype: list[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1621,7 +1616,7 @@ async def list_versions( :rtype: list[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1696,7 +1691,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineExtension, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1906,7 +1901,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineExtensionUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2112,7 +2107,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_name: str, vm_extension_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2242,7 +2237,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2302,7 +2297,7 @@ async def list( :rtype: ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2386,7 +2381,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2465,7 +2460,7 @@ async def list( :rtype: list[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2526,7 +2521,7 @@ async def list_offers( :rtype: list[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2578,7 +2573,7 @@ async def list_publishers(self, location: str, **kwargs: Any) -> List[_models.Vi :rtype: list[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2635,7 +2630,7 @@ async def list_skus( :rtype: list[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2716,7 +2711,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.Usage"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.ListUsagesResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2816,7 +2811,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> AsyncIterable["_mode api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2884,7 +2879,7 @@ async def _capture_initial( parameters: Union[_models.VirtualMachineCaptureParameters, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3082,7 +3077,7 @@ async def _create_or_update_initial( parameters: Union[_models.VirtualMachine, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3274,7 +3269,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3460,7 +3455,7 @@ def get_long_running_output(pipeline_response): ) async def _delete_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3576,7 +3571,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2018_06_01.models.VirtualMachine :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3633,7 +3628,7 @@ async def instance_view( :rtype: ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3678,7 +3673,7 @@ async def instance_view( async def _convert_to_managed_disks_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3781,7 +3776,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _deallocate_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3882,9 +3877,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace_async - async def generalize( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, vm_name: str, **kwargs: Any - ) -> None: + async def generalize(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> None: """Sets the state of the virtual machine to generalized. :param resource_group_name: The name of the resource group. Required. @@ -3895,7 +3888,7 @@ async def generalize( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3951,7 +3944,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4028,7 +4021,7 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.VirtualMachine"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4110,7 +4103,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4173,7 +4166,7 @@ async def get_next(next_link=None): return AsyncItemPaged(get_next, extract_data) async def _power_off_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4274,7 +4267,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _restart_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4374,7 +4367,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _start_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4474,7 +4467,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _redeploy_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4580,7 +4573,7 @@ async def _reimage_initial( parameters: Optional[Union[_models.VirtualMachineReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4764,7 +4757,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _perform_maintenance_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4872,7 +4865,7 @@ async def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5098,7 +5091,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.VirtualMa api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5183,7 +5176,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, image_name: str, parameters: Union[_models.Image, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5365,7 +5358,7 @@ async def _update_initial( parameters: Union[_models.ImageUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5545,7 +5538,7 @@ def get_long_running_output(pipeline_response): ) async def _delete_initial(self, resource_group_name: str, image_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5660,7 +5653,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2018_06_01.models.Image :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5719,7 +5712,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5795,7 +5788,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Image"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5883,7 +5876,7 @@ async def _create_or_update_initial( parameters: Union[_models.VirtualMachineScaleSet, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6075,7 +6068,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineScaleSetUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6264,7 +6257,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6379,7 +6372,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6428,7 +6421,7 @@ async def _deallocate_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6623,7 +6616,7 @@ async def _delete_instances_initial( vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6816,7 +6809,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6876,7 +6869,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6955,7 +6948,7 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.VirtualMachineScaleS api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.VirtualMachineScaleSetListWithLinkResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7038,7 +7031,7 @@ def list_skus( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.VirtualMachineScaleSetListSkusResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7104,6 +7097,7 @@ async def get_next(next_link=None): def get_os_upgrade_history( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> AsyncIterable["_models.UpgradeOperationHistoricalStatusInfo"]: + # pylint: disable=line-too-long """Gets list of OS upgrades on a VM scale set instance. :param resource_group_name: The name of the resource group. Required. @@ -7122,7 +7116,7 @@ def get_os_upgrade_history( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.VirtualMachineScaleSetListOSUpgradeHistory] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7191,7 +7185,7 @@ async def _power_off_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7386,7 +7380,7 @@ async def _restart_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7575,7 +7569,7 @@ async def _start_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7764,7 +7758,7 @@ async def _redeploy_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7956,7 +7950,7 @@ async def _perform_maintenance_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8154,7 +8148,7 @@ async def _update_instances_initial( vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8340,7 +8334,7 @@ async def _reimage_initial( vm_scale_set_reimage_input: Optional[Union[_models.VirtualMachineScaleSetReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8533,7 +8527,7 @@ async def _reimage_all_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8736,7 +8730,7 @@ async def force_recovery_service_fabric_platform_update_domain_walk( # pylint: :rtype: ~azure.mgmt.compute.v2018_06_01.models.RecoveryWalkResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8808,7 +8802,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtension, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9014,7 +9008,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, vmss_extension_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9144,7 +9138,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9210,7 +9204,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.VirtualMachineScaleSetExtensionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9296,7 +9290,7 @@ def __init__(self, *args, **kwargs) -> None: async def _cancel_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9400,7 +9394,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_os_upgrade_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9506,7 +9500,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_extension_upgrade_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9623,7 +9617,7 @@ async def get_latest( :rtype: ~azure.mgmt.compute.v2018_06_01.models.RollingUpgradeStatusInfo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9696,7 +9690,7 @@ async def _reimage_initial( ] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9895,7 +9889,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _reimage_all_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10004,7 +9998,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _deallocate_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10119,7 +10113,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineScaleSetVM, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10323,7 +10317,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10444,7 +10438,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetVM :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10503,7 +10497,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetVMInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10585,7 +10579,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.VirtualMachineScaleSetVMListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10653,7 +10647,7 @@ async def get_next(next_link=None): async def _power_off_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10763,7 +10757,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _restart_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10871,7 +10865,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10979,7 +10973,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _redeploy_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11088,7 +11082,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _perform_maintenance_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11201,7 +11195,7 @@ async def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11423,7 +11417,7 @@ def __init__(self, *args, **kwargs) -> None: async def _export_request_rate_by_interval_initial( self, location: str, parameters: Union[_models.RequestRateByIntervalInput, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11601,7 +11595,7 @@ def get_long_running_output(pipeline_response): async def _export_throttled_requests_initial( self, location: str, parameters: Union[_models.ThrottledRequestsInput, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11812,7 +11806,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.RunComman api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.RunCommandListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11885,7 +11879,7 @@ async def get(self, location: str, command_id: str, **kwargs: Any) -> _models.Ru :rtype: ~azure.mgmt.compute.v2018_06_01.models.RunCommandDocument :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11951,7 +11945,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, gallery_name: str, gallery: Union[_models.Gallery, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12149,7 +12143,7 @@ async def get(self, resource_group_name: str, gallery_name: str, **kwargs: Any) :rtype: ~azure.mgmt.compute.v2018_06_01.models.Gallery :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12192,7 +12186,7 @@ async def get(self, resource_group_name: str, gallery_name: str, **kwargs: Any) return deserialized # type: ignore async def _delete_initial(self, resource_group_name: str, gallery_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12307,7 +12301,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.GalleryList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12382,7 +12376,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Gallery"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.GalleryList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12471,7 +12465,7 @@ async def _create_or_update_initial( gallery_image: Union[_models.GalleryImage, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12692,7 +12686,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2018_06_01.models.GalleryImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12738,7 +12732,7 @@ async def get( async def _delete_initial( self, resource_group_name: str, gallery_name: str, gallery_image_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12866,7 +12860,7 @@ def list_by_gallery( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.GalleryImageList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12958,7 +12952,7 @@ async def _create_or_update_initial( gallery_image_version: Union[_models.GalleryImageVersion, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13214,7 +13208,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2018_06_01.models.GalleryImageVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13267,7 +13261,7 @@ async def _delete_initial( gallery_image_version_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13409,7 +13403,7 @@ def list_by_gallery_image( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.GalleryImageVersionList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13496,7 +13490,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.Disk, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13680,7 +13674,7 @@ def get_long_running_output(pipeline_response): async def _update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.DiskUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13875,7 +13869,7 @@ async def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.compute.v2018_06_01.models.Disk :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13918,7 +13912,7 @@ async def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> return deserialized # type: ignore async def _delete_initial(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14035,7 +14029,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14110,7 +14104,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Disk"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14177,7 +14171,7 @@ async def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14372,7 +14366,7 @@ def get_long_running_output(pipeline_response): async def _revoke_access_initial( self, resource_group_name: str, disk_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14501,7 +14495,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, snapshot_name: str, snapshot: Union[_models.Snapshot, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14692,7 +14686,7 @@ async def _update_initial( snapshot: Union[_models.SnapshotUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14896,7 +14890,7 @@ async def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) :rtype: ~azure.mgmt.compute.v2018_06_01.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14941,7 +14935,7 @@ async def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) async def _delete_initial( self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15059,7 +15053,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15135,7 +15129,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Snapshot"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15202,7 +15196,7 @@ async def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15397,7 +15391,7 @@ def get_long_running_output(pipeline_response): async def _revoke_access_initial( self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/__init__.py index e286f7f299c51..03436969754c1 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/__init__.py @@ -5,233 +5,244 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._models_py3 import AccessUri -from ._models_py3 import AdditionalCapabilities -from ._models_py3 import AdditionalUnattendContent -from ._models_py3 import ApiEntityReference -from ._models_py3 import ApiError -from ._models_py3 import ApiErrorBase -from ._models_py3 import AutoOSUpgradePolicy -from ._models_py3 import AvailabilitySet -from ._models_py3 import AvailabilitySetListResult -from ._models_py3 import AvailabilitySetUpdate -from ._models_py3 import BootDiagnostics -from ._models_py3 import BootDiagnosticsInstanceView -from ._models_py3 import ComputeOperationListResult -from ._models_py3 import ComputeOperationValue -from ._models_py3 import CreationData -from ._models_py3 import DataDisk -from ._models_py3 import DataDiskImage -from ._models_py3 import DiagnosticsProfile -from ._models_py3 import DiffDiskSettings -from ._models_py3 import Disallowed -from ._models_py3 import Disk -from ._models_py3 import DiskEncryptionSettings -from ._models_py3 import DiskInstanceView -from ._models_py3 import DiskList -from ._models_py3 import DiskSku -from ._models_py3 import DiskUpdate -from ._models_py3 import EncryptionSettings -from ._models_py3 import Gallery -from ._models_py3 import GalleryArtifactPublishingProfileBase -from ._models_py3 import GalleryArtifactSource -from ._models_py3 import GalleryDataDiskImage -from ._models_py3 import GalleryDiskImage -from ._models_py3 import GalleryIdentifier -from ._models_py3 import GalleryImage -from ._models_py3 import GalleryImageIdentifier -from ._models_py3 import GalleryImageList -from ._models_py3 import GalleryImageVersion -from ._models_py3 import GalleryImageVersionList -from ._models_py3 import GalleryImageVersionPublishingProfile -from ._models_py3 import GalleryImageVersionStorageProfile -from ._models_py3 import GalleryList -from ._models_py3 import GalleryOSDiskImage -from ._models_py3 import GrantAccessData -from ._models_py3 import HardwareProfile -from ._models_py3 import Image -from ._models_py3 import ImageDataDisk -from ._models_py3 import ImageDiskReference -from ._models_py3 import ImageListResult -from ._models_py3 import ImageOSDisk -from ._models_py3 import ImagePurchasePlan -from ._models_py3 import ImageReference -from ._models_py3 import ImageStorageProfile -from ._models_py3 import ImageUpdate -from ._models_py3 import InnerError -from ._models_py3 import InstanceViewStatus -from ._models_py3 import KeyVaultAndKeyReference -from ._models_py3 import KeyVaultAndSecretReference -from ._models_py3 import KeyVaultKeyReference -from ._models_py3 import KeyVaultSecretReference -from ._models_py3 import LinuxConfiguration -from ._models_py3 import ListUsagesResult -from ._models_py3 import LogAnalyticsInputBase -from ._models_py3 import LogAnalyticsOperationResult -from ._models_py3 import LogAnalyticsOutput -from ._models_py3 import MaintenanceRedeployStatus -from ._models_py3 import ManagedArtifact -from ._models_py3 import ManagedDiskParameters -from ._models_py3 import NetworkInterfaceReference -from ._models_py3 import NetworkProfile -from ._models_py3 import OSDisk -from ._models_py3 import OSDiskImage -from ._models_py3 import OSProfile -from ._models_py3 import Plan -from ._models_py3 import ProximityPlacementGroup -from ._models_py3 import ProximityPlacementGroupListResult -from ._models_py3 import ProximityPlacementGroupUpdate -from ._models_py3 import PurchasePlan -from ._models_py3 import RecommendedMachineConfiguration -from ._models_py3 import RecoveryWalkResponse -from ._models_py3 import RegionalReplicationStatus -from ._models_py3 import ReplicationStatus -from ._models_py3 import RequestRateByIntervalInput -from ._models_py3 import Resource -from ._models_py3 import ResourceRange -from ._models_py3 import RollbackStatusInfo -from ._models_py3 import RollingUpgradePolicy -from ._models_py3 import RollingUpgradeProgressInfo -from ._models_py3 import RollingUpgradeRunningStatus -from ._models_py3 import RollingUpgradeStatusInfo -from ._models_py3 import RunCommandDocument -from ._models_py3 import RunCommandDocumentBase -from ._models_py3 import RunCommandInput -from ._models_py3 import RunCommandInputParameter -from ._models_py3 import RunCommandListResult -from ._models_py3 import RunCommandParameterDefinition -from ._models_py3 import RunCommandResult -from ._models_py3 import Sku -from ._models_py3 import Snapshot -from ._models_py3 import SnapshotList -from ._models_py3 import SnapshotSku -from ._models_py3 import SnapshotUpdate -from ._models_py3 import SourceVault -from ._models_py3 import SshConfiguration -from ._models_py3 import SshPublicKey -from ._models_py3 import StorageProfile -from ._models_py3 import SubResource -from ._models_py3 import SubResourceReadOnly -from ._models_py3 import TargetRegion -from ._models_py3 import ThrottledRequestsInput -from ._models_py3 import UpdateResource -from ._models_py3 import UpgradeOperationHistoricalStatusInfo -from ._models_py3 import UpgradeOperationHistoricalStatusInfoProperties -from ._models_py3 import UpgradeOperationHistoryStatus -from ._models_py3 import UpgradePolicy -from ._models_py3 import Usage -from ._models_py3 import UsageName -from ._models_py3 import UserAssignedIdentitiesValue -from ._models_py3 import VaultCertificate -from ._models_py3 import VaultSecretGroup -from ._models_py3 import VirtualHardDisk -from ._models_py3 import VirtualMachine -from ._models_py3 import VirtualMachineAgentInstanceView -from ._models_py3 import VirtualMachineCaptureParameters -from ._models_py3 import VirtualMachineCaptureResult -from ._models_py3 import VirtualMachineExtension -from ._models_py3 import VirtualMachineExtensionHandlerInstanceView -from ._models_py3 import VirtualMachineExtensionImage -from ._models_py3 import VirtualMachineExtensionInstanceView -from ._models_py3 import VirtualMachineExtensionUpdate -from ._models_py3 import VirtualMachineExtensionsListResult -from ._models_py3 import VirtualMachineHealthStatus -from ._models_py3 import VirtualMachineIdentity -from ._models_py3 import VirtualMachineImage -from ._models_py3 import VirtualMachineImageResource -from ._models_py3 import VirtualMachineInstanceView -from ._models_py3 import VirtualMachineListResult -from ._models_py3 import VirtualMachineReimageParameters -from ._models_py3 import VirtualMachineScaleSet -from ._models_py3 import VirtualMachineScaleSetDataDisk -from ._models_py3 import VirtualMachineScaleSetExtension -from ._models_py3 import VirtualMachineScaleSetExtensionListResult -from ._models_py3 import VirtualMachineScaleSetExtensionProfile -from ._models_py3 import VirtualMachineScaleSetIPConfiguration -from ._models_py3 import VirtualMachineScaleSetIdentity -from ._models_py3 import VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue -from ._models_py3 import VirtualMachineScaleSetInstanceView -from ._models_py3 import VirtualMachineScaleSetInstanceViewStatusesSummary -from ._models_py3 import VirtualMachineScaleSetIpTag -from ._models_py3 import VirtualMachineScaleSetListOSUpgradeHistory -from ._models_py3 import VirtualMachineScaleSetListResult -from ._models_py3 import VirtualMachineScaleSetListSkusResult -from ._models_py3 import VirtualMachineScaleSetListWithLinkResult -from ._models_py3 import VirtualMachineScaleSetManagedDiskParameters -from ._models_py3 import VirtualMachineScaleSetNetworkConfiguration -from ._models_py3 import VirtualMachineScaleSetNetworkConfigurationDnsSettings -from ._models_py3 import VirtualMachineScaleSetNetworkProfile -from ._models_py3 import VirtualMachineScaleSetOSDisk -from ._models_py3 import VirtualMachineScaleSetOSProfile -from ._models_py3 import VirtualMachineScaleSetPublicIPAddressConfiguration -from ._models_py3 import VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings -from ._models_py3 import VirtualMachineScaleSetReimageParameters -from ._models_py3 import VirtualMachineScaleSetSku -from ._models_py3 import VirtualMachineScaleSetSkuCapacity -from ._models_py3 import VirtualMachineScaleSetStorageProfile -from ._models_py3 import VirtualMachineScaleSetUpdate -from ._models_py3 import VirtualMachineScaleSetUpdateIPConfiguration -from ._models_py3 import VirtualMachineScaleSetUpdateNetworkConfiguration -from ._models_py3 import VirtualMachineScaleSetUpdateNetworkProfile -from ._models_py3 import VirtualMachineScaleSetUpdateOSDisk -from ._models_py3 import VirtualMachineScaleSetUpdateOSProfile -from ._models_py3 import VirtualMachineScaleSetUpdatePublicIPAddressConfiguration -from ._models_py3 import VirtualMachineScaleSetUpdateStorageProfile -from ._models_py3 import VirtualMachineScaleSetUpdateVMProfile -from ._models_py3 import VirtualMachineScaleSetVM -from ._models_py3 import VirtualMachineScaleSetVMExtensionsSummary -from ._models_py3 import VirtualMachineScaleSetVMInstanceIDs -from ._models_py3 import VirtualMachineScaleSetVMInstanceRequiredIDs -from ._models_py3 import VirtualMachineScaleSetVMInstanceView -from ._models_py3 import VirtualMachineScaleSetVMListResult -from ._models_py3 import VirtualMachineScaleSetVMProfile -from ._models_py3 import VirtualMachineScaleSetVMReimageParameters -from ._models_py3 import VirtualMachineSize -from ._models_py3 import VirtualMachineSizeListResult -from ._models_py3 import VirtualMachineStatusCodeCount -from ._models_py3 import VirtualMachineUpdate -from ._models_py3 import WinRMConfiguration -from ._models_py3 import WinRMListener -from ._models_py3 import WindowsConfiguration +from typing import TYPE_CHECKING -from ._compute_management_client_enums import AccessLevel -from ._compute_management_client_enums import AggregatedReplicationState -from ._compute_management_client_enums import AvailabilitySetSkuTypes -from ._compute_management_client_enums import CachingTypes -from ._compute_management_client_enums import DiffDiskOptions -from ._compute_management_client_enums import DiskCreateOption -from ._compute_management_client_enums import DiskCreateOptionTypes -from ._compute_management_client_enums import DiskStorageAccountTypes -from ._compute_management_client_enums import GalleryImagePropertiesProvisioningState -from ._compute_management_client_enums import GalleryImageVersionPropertiesProvisioningState -from ._compute_management_client_enums import GalleryPropertiesProvisioningState -from ._compute_management_client_enums import HostCaching -from ._compute_management_client_enums import IPVersion -from ._compute_management_client_enums import IntervalInMins -from ._compute_management_client_enums import MaintenanceOperationResultCodeTypes -from ._compute_management_client_enums import OperatingSystemStateTypes -from ._compute_management_client_enums import OperatingSystemTypes -from ._compute_management_client_enums import ProtocolTypes -from ._compute_management_client_enums import ProximityPlacementGroupType -from ._compute_management_client_enums import ReplicationState -from ._compute_management_client_enums import ReplicationStatusTypes -from ._compute_management_client_enums import ResourceIdentityType -from ._compute_management_client_enums import RollingUpgradeActionType -from ._compute_management_client_enums import RollingUpgradeStatusCode -from ._compute_management_client_enums import SettingNames -from ._compute_management_client_enums import SnapshotStorageAccountTypes -from ._compute_management_client_enums import StatusLevelTypes -from ._compute_management_client_enums import StorageAccountTypes -from ._compute_management_client_enums import UpgradeMode -from ._compute_management_client_enums import UpgradeOperationInvoker -from ._compute_management_client_enums import UpgradeState -from ._compute_management_client_enums import VirtualMachineEvictionPolicyTypes -from ._compute_management_client_enums import VirtualMachinePriorityTypes -from ._compute_management_client_enums import VirtualMachineScaleSetSkuScaleType -from ._compute_management_client_enums import VirtualMachineSizeTypes +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + + +from ._models_py3 import ( # type: ignore + AccessUri, + AdditionalCapabilities, + AdditionalUnattendContent, + ApiEntityReference, + ApiError, + ApiErrorBase, + AutoOSUpgradePolicy, + AvailabilitySet, + AvailabilitySetListResult, + AvailabilitySetUpdate, + BootDiagnostics, + BootDiagnosticsInstanceView, + ComputeOperationListResult, + ComputeOperationValue, + CreationData, + DataDisk, + DataDiskImage, + DiagnosticsProfile, + DiffDiskSettings, + Disallowed, + Disk, + DiskEncryptionSettings, + DiskInstanceView, + DiskList, + DiskSku, + DiskUpdate, + EncryptionSettings, + Gallery, + GalleryArtifactPublishingProfileBase, + GalleryArtifactSource, + GalleryDataDiskImage, + GalleryDiskImage, + GalleryIdentifier, + GalleryImage, + GalleryImageIdentifier, + GalleryImageList, + GalleryImageVersion, + GalleryImageVersionList, + GalleryImageVersionPublishingProfile, + GalleryImageVersionStorageProfile, + GalleryList, + GalleryOSDiskImage, + GrantAccessData, + HardwareProfile, + Image, + ImageDataDisk, + ImageDiskReference, + ImageListResult, + ImageOSDisk, + ImagePurchasePlan, + ImageReference, + ImageStorageProfile, + ImageUpdate, + InnerError, + InstanceViewStatus, + KeyVaultAndKeyReference, + KeyVaultAndSecretReference, + KeyVaultKeyReference, + KeyVaultSecretReference, + LinuxConfiguration, + ListUsagesResult, + LogAnalyticsInputBase, + LogAnalyticsOperationResult, + LogAnalyticsOutput, + MaintenanceRedeployStatus, + ManagedArtifact, + ManagedDiskParameters, + NetworkInterfaceReference, + NetworkProfile, + OSDisk, + OSDiskImage, + OSProfile, + Plan, + ProximityPlacementGroup, + ProximityPlacementGroupListResult, + ProximityPlacementGroupUpdate, + PurchasePlan, + RecommendedMachineConfiguration, + RecoveryWalkResponse, + RegionalReplicationStatus, + ReplicationStatus, + RequestRateByIntervalInput, + Resource, + ResourceRange, + RollbackStatusInfo, + RollingUpgradePolicy, + RollingUpgradeProgressInfo, + RollingUpgradeRunningStatus, + RollingUpgradeStatusInfo, + RunCommandDocument, + RunCommandDocumentBase, + RunCommandInput, + RunCommandInputParameter, + RunCommandListResult, + RunCommandParameterDefinition, + RunCommandResult, + Sku, + Snapshot, + SnapshotList, + SnapshotSku, + SnapshotUpdate, + SourceVault, + SshConfiguration, + SshPublicKey, + StorageProfile, + SubResource, + SubResourceReadOnly, + TargetRegion, + ThrottledRequestsInput, + UpdateResource, + UpgradeOperationHistoricalStatusInfo, + UpgradeOperationHistoricalStatusInfoProperties, + UpgradeOperationHistoryStatus, + UpgradePolicy, + Usage, + UsageName, + UserAssignedIdentitiesValue, + VaultCertificate, + VaultSecretGroup, + VirtualHardDisk, + VirtualMachine, + VirtualMachineAgentInstanceView, + VirtualMachineCaptureParameters, + VirtualMachineCaptureResult, + VirtualMachineExtension, + VirtualMachineExtensionHandlerInstanceView, + VirtualMachineExtensionImage, + VirtualMachineExtensionInstanceView, + VirtualMachineExtensionUpdate, + VirtualMachineExtensionsListResult, + VirtualMachineHealthStatus, + VirtualMachineIdentity, + VirtualMachineImage, + VirtualMachineImageResource, + VirtualMachineInstanceView, + VirtualMachineListResult, + VirtualMachineReimageParameters, + VirtualMachineScaleSet, + VirtualMachineScaleSetDataDisk, + VirtualMachineScaleSetExtension, + VirtualMachineScaleSetExtensionListResult, + VirtualMachineScaleSetExtensionProfile, + VirtualMachineScaleSetIPConfiguration, + VirtualMachineScaleSetIdentity, + VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue, + VirtualMachineScaleSetInstanceView, + VirtualMachineScaleSetInstanceViewStatusesSummary, + VirtualMachineScaleSetIpTag, + VirtualMachineScaleSetListOSUpgradeHistory, + VirtualMachineScaleSetListResult, + VirtualMachineScaleSetListSkusResult, + VirtualMachineScaleSetListWithLinkResult, + VirtualMachineScaleSetManagedDiskParameters, + VirtualMachineScaleSetNetworkConfiguration, + VirtualMachineScaleSetNetworkConfigurationDnsSettings, + VirtualMachineScaleSetNetworkProfile, + VirtualMachineScaleSetOSDisk, + VirtualMachineScaleSetOSProfile, + VirtualMachineScaleSetPublicIPAddressConfiguration, + VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings, + VirtualMachineScaleSetReimageParameters, + VirtualMachineScaleSetSku, + VirtualMachineScaleSetSkuCapacity, + VirtualMachineScaleSetStorageProfile, + VirtualMachineScaleSetUpdate, + VirtualMachineScaleSetUpdateIPConfiguration, + VirtualMachineScaleSetUpdateNetworkConfiguration, + VirtualMachineScaleSetUpdateNetworkProfile, + VirtualMachineScaleSetUpdateOSDisk, + VirtualMachineScaleSetUpdateOSProfile, + VirtualMachineScaleSetUpdatePublicIPAddressConfiguration, + VirtualMachineScaleSetUpdateStorageProfile, + VirtualMachineScaleSetUpdateVMProfile, + VirtualMachineScaleSetVM, + VirtualMachineScaleSetVMExtensionsSummary, + VirtualMachineScaleSetVMInstanceIDs, + VirtualMachineScaleSetVMInstanceRequiredIDs, + VirtualMachineScaleSetVMInstanceView, + VirtualMachineScaleSetVMListResult, + VirtualMachineScaleSetVMProfile, + VirtualMachineScaleSetVMReimageParameters, + VirtualMachineSize, + VirtualMachineSizeListResult, + VirtualMachineStatusCodeCount, + VirtualMachineUpdate, + WinRMConfiguration, + WinRMListener, + WindowsConfiguration, +) + +from ._compute_management_client_enums import ( # type: ignore + AccessLevel, + AggregatedReplicationState, + AvailabilitySetSkuTypes, + CachingTypes, + DiffDiskOptions, + DiskCreateOption, + DiskCreateOptionTypes, + DiskStorageAccountTypes, + GalleryImagePropertiesProvisioningState, + GalleryImageVersionPropertiesProvisioningState, + GalleryPropertiesProvisioningState, + HostCaching, + IPVersion, + IntervalInMins, + MaintenanceOperationResultCodeTypes, + OperatingSystemStateTypes, + OperatingSystemTypes, + ProtocolTypes, + ProximityPlacementGroupType, + ReplicationState, + ReplicationStatusTypes, + ResourceIdentityType, + RollingUpgradeActionType, + RollingUpgradeStatusCode, + SettingNames, + SnapshotStorageAccountTypes, + StatusLevelTypes, + StorageAccountTypes, + UpgradeMode, + UpgradeOperationInvoker, + UpgradeState, + VirtualMachineEvictionPolicyTypes, + VirtualMachinePriorityTypes, + VirtualMachineScaleSetSkuScaleType, + VirtualMachineSizeTypes, +) 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__ = [ @@ -459,5 +470,5 @@ "VirtualMachineScaleSetSkuScaleType", "VirtualMachineSizeTypes", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/_models_py3.py index 5bf2bc7ad77d5..7908969824c92 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/_models_py3.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/_models_py3.py @@ -1,5 +1,5 @@ -# 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. @@ -16,10 +16,9 @@ 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 if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object @@ -313,7 +312,7 @@ def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kw self.tags = tags -class AvailabilitySet(Resource): # pylint: disable=too-many-instance-attributes +class AvailabilitySet(Resource): """Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see `Manage the @@ -974,7 +973,7 @@ def __init__(self, *, disk_types: Optional[List[str]] = None, **kwargs: Any) -> self.disk_types = disk_types -class Disk(Resource): # pylint: disable=too-many-instance-attributes +class Disk(Resource): """Disk resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -1621,7 +1620,7 @@ def __init__(self, **kwargs: Any) -> None: self.unique_name = None -class GalleryImage(Resource): # pylint: disable=too-many-instance-attributes +class GalleryImage(Resource): """Specifies information about the gallery Image Definition that you want to create or update. Variables are only populated by the server, and will be ignored when sending a request. @@ -3430,7 +3429,7 @@ def __init__( self.network_interfaces = network_interfaces -class OSDisk(_serialization.Model): # pylint: disable=too-many-instance-attributes +class OSDisk(_serialization.Model): """Specifies information about the operating system disk used by the virtual machine. :code:`
`:code:`
` For more information about disks, see `About disks and VHDs for Azure virtual machines @@ -4844,7 +4843,7 @@ def __init__( self.capacity = capacity -class Snapshot(Resource): # pylint: disable=too-many-instance-attributes +class Snapshot(Resource): """Snapshot resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -5680,7 +5679,7 @@ def __init__(self, *, uri: Optional[str] = None, **kwargs: Any) -> None: self.uri = uri -class VirtualMachine(Resource): # pylint: disable=too-many-instance-attributes +class VirtualMachine(Resource): """Describes a Virtual Machine. Variables are only populated by the server, and will be ignored when sending a request. @@ -6013,7 +6012,7 @@ def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylin self.resources = None -class VirtualMachineExtension(Resource): # pylint: disable=too-many-instance-attributes +class VirtualMachineExtension(Resource): """Describes a Virtual Machine Extension. Variables are only populated by the server, and will be ignored when sending a request. @@ -6636,7 +6635,7 @@ def __init__( self.data_disk_images = data_disk_images -class VirtualMachineInstanceView(_serialization.Model): # pylint: disable=too-many-instance-attributes +class VirtualMachineInstanceView(_serialization.Model): """The instance view of a virtual machine. :ivar platform_update_domain: Specifies the update domain of the virtual machine. @@ -6807,7 +6806,7 @@ def __init__(self, *, temp_disk: Optional[bool] = None, **kwargs: Any) -> None: self.temp_disk = temp_disk -class VirtualMachineScaleSet(Resource): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSet(Resource): """Describes a Virtual Machine Scale Set. Variables are only populated by the server, and will be ignored when sending a request. @@ -7062,7 +7061,7 @@ def __init__( self.managed_disk = managed_disk -class VirtualMachineScaleSetExtension(SubResourceReadOnly): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetExtension(SubResourceReadOnly): """Describes a Virtual Machine Scale Set Extension. Variables are only populated by the server, and will be ignored when sending a request. @@ -9018,7 +9017,7 @@ def __init__( self.license_type = license_type -class VirtualMachineScaleSetVM(Resource): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetVM(Resource): """Describes a virtual machine scale set virtual machine. Variables are only populated by the server, and will be ignored when sending a request. @@ -9299,7 +9298,7 @@ def __init__(self, *, instance_ids: List[str], **kwargs: Any) -> None: self.instance_ids = instance_ids -class VirtualMachineScaleSetVMInstanceView(_serialization.Model): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetVMInstanceView(_serialization.Model): """The instance view of a virtual machine scale set VM. Variables are only populated by the server, and will be ignored when sending a request. @@ -9681,7 +9680,7 @@ def __init__(self, **kwargs: Any) -> None: self.count = None -class VirtualMachineUpdate(UpdateResource): # pylint: disable=too-many-instance-attributes +class VirtualMachineUpdate(UpdateResource): """Describes a Virtual Machine Update. Variables are only populated by the server, and will be ignored when sending a request. diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/__init__.py index 5742aa4381b56..7cc1e04a1ba67 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/__init__.py @@ -5,31 +5,37 @@ # Code generated by Microsoft (R) AutoRest 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 AvailabilitySetsOperations -from ._operations import ProximityPlacementGroupsOperations -from ._operations import VirtualMachineExtensionImagesOperations -from ._operations import VirtualMachineExtensionsOperations -from ._operations import VirtualMachineImagesOperations -from ._operations import UsageOperations -from ._operations import VirtualMachinesOperations -from ._operations import VirtualMachineSizesOperations -from ._operations import ImagesOperations -from ._operations import VirtualMachineScaleSetsOperations -from ._operations import VirtualMachineScaleSetExtensionsOperations -from ._operations import VirtualMachineScaleSetRollingUpgradesOperations -from ._operations import VirtualMachineScaleSetVMsOperations -from ._operations import LogAnalyticsOperations -from ._operations import VirtualMachineRunCommandsOperations -from ._operations import GalleriesOperations -from ._operations import GalleryImagesOperations -from ._operations import GalleryImageVersionsOperations -from ._operations import DisksOperations -from ._operations import SnapshotsOperations +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 AvailabilitySetsOperations # type: ignore +from ._operations import ProximityPlacementGroupsOperations # type: ignore +from ._operations import VirtualMachineExtensionImagesOperations # type: ignore +from ._operations import VirtualMachineExtensionsOperations # type: ignore +from ._operations import VirtualMachineImagesOperations # type: ignore +from ._operations import UsageOperations # type: ignore +from ._operations import VirtualMachinesOperations # type: ignore +from ._operations import VirtualMachineSizesOperations # type: ignore +from ._operations import ImagesOperations # type: ignore +from ._operations import VirtualMachineScaleSetsOperations # type: ignore +from ._operations import VirtualMachineScaleSetExtensionsOperations # type: ignore +from ._operations import VirtualMachineScaleSetRollingUpgradesOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMsOperations # type: ignore +from ._operations import LogAnalyticsOperations # type: ignore +from ._operations import VirtualMachineRunCommandsOperations # type: ignore +from ._operations import GalleriesOperations # type: ignore +from ._operations import GalleryImagesOperations # type: ignore +from ._operations import GalleryImageVersionsOperations # type: ignore +from ._operations import DisksOperations # type: ignore +from ._operations import SnapshotsOperations # 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__ = [ @@ -55,5 +61,5 @@ "DisksOperations", "SnapshotsOperations", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/_operations.py index 64a3566687453..af550542a3f12 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/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. @@ -8,22 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import ( - Any, - Callable, - Dict, - IO, - Iterable, - Iterator, - List, - Literal, - Optional, - Type, - TypeVar, - Union, - cast, - overload, -) +from typing import Any, Callable, Dict, IO, Iterable, Iterator, List, Literal, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -51,7 +36,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, HttpResponse], T, Dict[str, Any]], Any]] @@ -4089,7 +4074,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.ComputeOperationValue"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.ComputeOperationListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4242,7 +4227,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2018_06_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4369,7 +4354,7 @@ def update( :rtype: ~azure.mgmt.compute.v2018_06_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4437,7 +4422,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4487,7 +4472,7 @@ def get(self, resource_group_name: str, availability_set_name: str, **kwargs: An :rtype: ~azure.mgmt.compute.v2018_06_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4548,7 +4533,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4625,7 +4610,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Ava api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4707,7 +4692,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4865,7 +4850,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2018_06_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4995,7 +4980,7 @@ def update( :rtype: ~azure.mgmt.compute.v2018_06_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5063,7 +5048,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5115,7 +5100,7 @@ def get( :rtype: ~azure.mgmt.compute.v2018_06_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5173,7 +5158,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.ProximityPlac api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5253,7 +5238,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5353,7 +5338,7 @@ def get( :rtype: ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineExtensionImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5411,7 +5396,7 @@ def list_types( :rtype: list[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5483,7 +5468,7 @@ def list_versions( :rtype: list[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5558,7 +5543,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineExtension, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5768,7 +5753,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineExtensionUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5974,7 +5959,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_name: str, vm_extension_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6104,7 +6089,7 @@ def get( :rtype: ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6164,7 +6149,7 @@ def list( :rtype: ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6248,7 +6233,7 @@ def get( :rtype: ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6327,7 +6312,7 @@ def list( :rtype: list[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6388,7 +6373,7 @@ def list_offers( :rtype: list[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6440,7 +6425,7 @@ def list_publishers(self, location: str, **kwargs: Any) -> List[_models.VirtualM :rtype: list[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6497,7 +6482,7 @@ def list_skus( :rtype: list[~azure.mgmt.compute.v2018_06_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6578,7 +6563,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.Usage"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.ListUsagesResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6677,7 +6662,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> Iterable["_models.Vi api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6745,7 +6730,7 @@ def _capture_initial( parameters: Union[_models.VirtualMachineCaptureParameters, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6943,7 +6928,7 @@ def _create_or_update_initial( parameters: Union[_models.VirtualMachine, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7132,7 +7117,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7315,7 +7300,7 @@ def get_long_running_output(pipeline_response): ) def _delete_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7431,7 +7416,7 @@ def get( :rtype: ~azure.mgmt.compute.v2018_06_01.models.VirtualMachine :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7488,7 +7473,7 @@ def instance_view( :rtype: ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7533,7 +7518,7 @@ def instance_view( def _convert_to_managed_disks_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7634,7 +7619,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _deallocate_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7748,7 +7733,7 @@ def generalize( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7803,7 +7788,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Vir api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7879,7 +7864,7 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.VirtualMachine"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7960,7 +7945,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8023,7 +8008,7 @@ def get_next(next_link=None): return ItemPaged(get_next, extract_data) def _power_off_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8124,7 +8109,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _restart_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8224,7 +8209,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _start_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8324,7 +8309,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _redeploy_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8430,7 +8415,7 @@ def _reimage_initial( parameters: Optional[Union[_models.VirtualMachineReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8612,7 +8597,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _perform_maintenance_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8718,7 +8703,7 @@ def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8940,7 +8925,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.VirtualMachine api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9025,7 +9010,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, image_name: str, parameters: Union[_models.Image, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9207,7 +9192,7 @@ def _update_initial( parameters: Union[_models.ImageUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9387,7 +9372,7 @@ def get_long_running_output(pipeline_response): ) def _delete_initial(self, resource_group_name: str, image_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9502,7 +9487,7 @@ def get( :rtype: ~azure.mgmt.compute.v2018_06_01.models.Image :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9561,7 +9546,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9637,7 +9622,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Image"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9725,7 +9710,7 @@ def _create_or_update_initial( parameters: Union[_models.VirtualMachineScaleSet, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9917,7 +9902,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineScaleSetUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10104,7 +10089,7 @@ def get_long_running_output(pipeline_response): ) def _delete_initial(self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10215,7 +10200,7 @@ def get(self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) - :rtype: ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10264,7 +10249,7 @@ def _deallocate_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10459,7 +10444,7 @@ def _delete_instances_initial( vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10652,7 +10637,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10712,7 +10697,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Vir api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10791,7 +10776,7 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.VirtualMachineScaleSet"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.VirtualMachineScaleSetListWithLinkResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10874,7 +10859,7 @@ def list_skus( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.VirtualMachineScaleSetListSkusResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10958,7 +10943,7 @@ def get_os_upgrade_history( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.VirtualMachineScaleSetListOSUpgradeHistory] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11027,7 +11012,7 @@ def _power_off_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11222,7 +11207,7 @@ def _restart_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11411,7 +11396,7 @@ def _start_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11600,7 +11585,7 @@ def _redeploy_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11792,7 +11777,7 @@ def _perform_maintenance_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11990,7 +11975,7 @@ def _update_instances_initial( vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12176,7 +12161,7 @@ def _reimage_initial( vm_scale_set_reimage_input: Optional[Union[_models.VirtualMachineScaleSetReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12369,7 +12354,7 @@ def _reimage_all_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12572,7 +12557,7 @@ def force_recovery_service_fabric_platform_update_domain_walk( # pylint: disabl :rtype: ~azure.mgmt.compute.v2018_06_01.models.RecoveryWalkResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12644,7 +12629,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtension, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12850,7 +12835,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, vmss_extension_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12980,7 +12965,7 @@ def get( :rtype: ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13046,7 +13031,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.VirtualMachineScaleSetExtensionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13130,7 +13115,7 @@ def __init__(self, *args, **kwargs): self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") def _cancel_initial(self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13232,7 +13217,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_os_upgrade_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13338,7 +13323,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_extension_upgrade_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13455,7 +13440,7 @@ def get_latest( :rtype: ~azure.mgmt.compute.v2018_06_01.models.RollingUpgradeStatusInfo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13528,7 +13513,7 @@ def _reimage_initial( ] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13727,7 +13712,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _reimage_all_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13836,7 +13821,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _deallocate_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13951,7 +13936,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineScaleSetVM, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14155,7 +14140,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14276,7 +14261,7 @@ def get( :rtype: ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetVM :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14335,7 +14320,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2018_06_01.models.VirtualMachineScaleSetVMInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14417,7 +14402,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.VirtualMachineScaleSetVMListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14485,7 +14470,7 @@ def get_next(next_link=None): def _power_off_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14595,7 +14580,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _restart_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14703,7 +14688,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14811,7 +14796,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _redeploy_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14920,7 +14905,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _perform_maintenance_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15033,7 +15018,7 @@ def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15252,7 +15237,7 @@ def __init__(self, *args, **kwargs): def _export_request_rate_by_interval_initial( self, location: str, parameters: Union[_models.RequestRateByIntervalInput, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15429,7 +15414,7 @@ def get_long_running_output(pipeline_response): def _export_throttled_requests_initial( self, location: str, parameters: Union[_models.ThrottledRequestsInput, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15639,7 +15624,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.RunCommandDocu api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.RunCommandListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15712,7 +15697,7 @@ def get(self, location: str, command_id: str, **kwargs: Any) -> _models.RunComma :rtype: ~azure.mgmt.compute.v2018_06_01.models.RunCommandDocument :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15778,7 +15763,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, gallery_name: str, gallery: Union[_models.Gallery, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15973,7 +15958,7 @@ def get(self, resource_group_name: str, gallery_name: str, **kwargs: Any) -> _mo :rtype: ~azure.mgmt.compute.v2018_06_01.models.Gallery :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16016,7 +16001,7 @@ def get(self, resource_group_name: str, gallery_name: str, **kwargs: Any) -> _mo return deserialized # type: ignore def _delete_initial(self, resource_group_name: str, gallery_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16131,7 +16116,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.GalleryList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16206,7 +16191,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Gallery"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.GalleryList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16295,7 +16280,7 @@ def _create_or_update_initial( gallery_image: Union[_models.GalleryImage, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16516,7 +16501,7 @@ def get( :rtype: ~azure.mgmt.compute.v2018_06_01.models.GalleryImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16562,7 +16547,7 @@ def get( def _delete_initial( self, resource_group_name: str, gallery_name: str, gallery_image_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16689,7 +16674,7 @@ def list_by_gallery( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.GalleryImageList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16781,7 +16766,7 @@ def _create_or_update_initial( gallery_image_version: Union[_models.GalleryImageVersion, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17037,7 +17022,7 @@ def get( :rtype: ~azure.mgmt.compute.v2018_06_01.models.GalleryImageVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17090,7 +17075,7 @@ def _delete_initial( gallery_image_version_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17232,7 +17217,7 @@ def list_by_gallery_image( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.GalleryImageVersionList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17319,7 +17304,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.Disk, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17503,7 +17488,7 @@ def get_long_running_output(pipeline_response): def _update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.DiskUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17698,7 +17683,7 @@ def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> _model :rtype: ~azure.mgmt.compute.v2018_06_01.models.Disk :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17741,7 +17726,7 @@ def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> _model return deserialized # type: ignore def _delete_initial(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17858,7 +17843,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17933,7 +17918,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Disk"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18000,7 +17985,7 @@ def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18190,7 +18175,7 @@ def get_long_running_output(pipeline_response): ) def _revoke_access_initial(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18317,7 +18302,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, snapshot_name: str, snapshot: Union[_models.Snapshot, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18505,7 +18490,7 @@ def _update_initial( snapshot: Union[_models.SnapshotUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18706,7 +18691,7 @@ def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> _m :rtype: ~azure.mgmt.compute.v2018_06_01.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18749,7 +18734,7 @@ def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> _m return deserialized # type: ignore def _delete_initial(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18866,7 +18851,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18941,7 +18926,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Snapshot"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-06-01")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19008,7 +18993,7 @@ def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19198,7 +19183,7 @@ def get_long_running_output(pipeline_response): ) def _revoke_access_initial(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/__init__.py index 3b1b6244b2375..ab7c46e8991db 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/__init__.py @@ -5,15 +5,21 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._compute_management_client import ComputeManagementClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._compute_management_client import ComputeManagementClient # 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__ = [ "ComputeManagementClient", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/_compute_management_client.py index f08f7874d3247..2c777bbdb141d 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/_compute_management_client.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/_compute_management_client.py @@ -21,11 +21,10 @@ from .operations import DisksOperations, SnapshotsOperations if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class ComputeManagementClient: # pylint: disable=client-accepts-api-version-keyword +class ComputeManagementClient: """Compute Client. :ivar disks: DisksOperations operations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/_configuration.py index 2e93434093a3b..42af1075e77ae 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/_configuration.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/_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 ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ComputeManagementClient. Note that all parameters used to create this instance are saved as instance diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/_version.py index d79b2760319c5..e5754a47ce68f 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "33.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/aio/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/aio/__init__.py index 0715f50185586..d3fd1ba93379a 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/aio/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/aio/__init__.py @@ -5,12 +5,18 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._compute_management_client import ComputeManagementClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._compute_management_client import ComputeManagementClient # 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__ = [ "ComputeManagementClient", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/aio/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/aio/_compute_management_client.py index 1133bc09eeb4e..bc85885f55f34 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/aio/_compute_management_client.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/aio/_compute_management_client.py @@ -21,11 +21,10 @@ from .operations import DisksOperations, SnapshotsOperations if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class ComputeManagementClient: # pylint: disable=client-accepts-api-version-keyword +class ComputeManagementClient: """Compute Client. :ivar disks: DisksOperations operations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/aio/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/aio/_configuration.py index 18c4fd0fb5b15..26a55a68696eb 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/aio/_configuration.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/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 ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ComputeManagementClient. Note that all parameters used to create this instance are saved as instance diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/aio/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/aio/operations/__init__.py index 680151cef04fb..0d503ec2eb53a 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/aio/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/aio/operations/__init__.py @@ -5,17 +5,23 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._operations import DisksOperations -from ._operations import SnapshotsOperations +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._operations import DisksOperations # type: ignore +from ._operations import SnapshotsOperations # 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__ = [ "DisksOperations", "SnapshotsOperations", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/aio/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/aio/operations/_operations.py index aaf024e21aa43..228abd2ba4f44 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/aio/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/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. @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -54,7 +54,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]] @@ -82,7 +82,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.Disk, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -266,7 +266,7 @@ def get_long_running_output(pipeline_response): async def _update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.DiskUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -461,7 +461,7 @@ async def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.compute.v2018_09_30.models.Disk :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -504,7 +504,7 @@ async def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> return deserialized # type: ignore async def _delete_initial(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -621,7 +621,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-09-30")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -696,7 +696,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Disk"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-09-30")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -763,7 +763,7 @@ async def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -958,7 +958,7 @@ def get_long_running_output(pipeline_response): async def _revoke_access_initial( self, resource_group_name: str, disk_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1087,7 +1087,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, snapshot_name: str, snapshot: Union[_models.Snapshot, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1278,7 +1278,7 @@ async def _update_initial( snapshot: Union[_models.SnapshotUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1482,7 +1482,7 @@ async def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) :rtype: ~azure.mgmt.compute.v2018_09_30.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1527,7 +1527,7 @@ async def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) async def _delete_initial( self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1645,7 +1645,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-09-30")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1721,7 +1721,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Snapshot"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-09-30")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1788,7 +1788,7 @@ async def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1983,7 +1983,7 @@ def get_long_running_output(pipeline_response): async def _revoke_access_initial( self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/__init__.py index 88e4943e222c3..f1895894e49da 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/__init__.py @@ -5,35 +5,46 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._models_py3 import AccessUri -from ._models_py3 import CreationData -from ._models_py3 import Disk -from ._models_py3 import DiskList -from ._models_py3 import DiskSku -from ._models_py3 import DiskUpdate -from ._models_py3 import EncryptionSettingsCollection -from ._models_py3 import EncryptionSettingsElement -from ._models_py3 import GrantAccessData -from ._models_py3 import ImageDiskReference -from ._models_py3 import KeyVaultAndKeyReference -from ._models_py3 import KeyVaultAndSecretReference -from ._models_py3 import Resource -from ._models_py3 import Snapshot -from ._models_py3 import SnapshotList -from ._models_py3 import SnapshotSku -from ._models_py3 import SnapshotUpdate -from ._models_py3 import SourceVault +from typing import TYPE_CHECKING -from ._compute_management_client_enums import AccessLevel -from ._compute_management_client_enums import DiskCreateOption -from ._compute_management_client_enums import DiskState -from ._compute_management_client_enums import DiskStorageAccountTypes -from ._compute_management_client_enums import HyperVGeneration -from ._compute_management_client_enums import OperatingSystemTypes -from ._compute_management_client_enums import SnapshotStorageAccountTypes +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + + +from ._models_py3 import ( # type: ignore + AccessUri, + CreationData, + Disk, + DiskList, + DiskSku, + DiskUpdate, + EncryptionSettingsCollection, + EncryptionSettingsElement, + GrantAccessData, + ImageDiskReference, + KeyVaultAndKeyReference, + KeyVaultAndSecretReference, + Resource, + Snapshot, + SnapshotList, + SnapshotSku, + SnapshotUpdate, + SourceVault, +) + +from ._compute_management_client_enums import ( # type: ignore + AccessLevel, + DiskCreateOption, + DiskState, + DiskStorageAccountTypes, + HyperVGeneration, + OperatingSystemTypes, + SnapshotStorageAccountTypes, +) 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__ = [ @@ -63,5 +74,5 @@ "OperatingSystemTypes", "SnapshotStorageAccountTypes", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/_models_py3.py index e5bd51c9ba6c6..aa350f78f587d 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/_models_py3.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/models/_models_py3.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. @@ -12,7 +11,6 @@ from ... import _serialization if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models @@ -159,7 +157,7 @@ def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kw self.tags = tags -class Disk(Resource): # pylint: disable=too-many-instance-attributes +class Disk(Resource): """Disk resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -691,7 +689,7 @@ def __init__(self, *, source_vault: "_models.SourceVault", secret_url: str, **kw self.secret_url = secret_url -class Snapshot(Resource): # pylint: disable=too-many-instance-attributes +class Snapshot(Resource): """Snapshot resource. Variables are only populated by the server, and will be ignored when sending a request. diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/operations/__init__.py index 680151cef04fb..0d503ec2eb53a 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/operations/__init__.py @@ -5,17 +5,23 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._operations import DisksOperations -from ._operations import SnapshotsOperations +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._operations import DisksOperations # type: ignore +from ._operations import SnapshotsOperations # 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__ = [ "DisksOperations", "SnapshotsOperations", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/operations/_operations.py index 7f752bd8d329b..f431058d20b66 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/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. @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -36,7 +36,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, HttpResponse], T, Dict[str, Any]], Any]] @@ -541,7 +541,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.Disk, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -725,7 +725,7 @@ def get_long_running_output(pipeline_response): def _update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.DiskUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -920,7 +920,7 @@ def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> _model :rtype: ~azure.mgmt.compute.v2018_09_30.models.Disk :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -963,7 +963,7 @@ def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> _model return deserialized # type: ignore def _delete_initial(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1080,7 +1080,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-09-30")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1155,7 +1155,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Disk"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-09-30")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1222,7 +1222,7 @@ def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1412,7 +1412,7 @@ def get_long_running_output(pipeline_response): ) def _revoke_access_initial(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1539,7 +1539,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, snapshot_name: str, snapshot: Union[_models.Snapshot, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1727,7 +1727,7 @@ def _update_initial( snapshot: Union[_models.SnapshotUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1928,7 +1928,7 @@ def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> _m :rtype: ~azure.mgmt.compute.v2018_09_30.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1971,7 +1971,7 @@ def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> _m return deserialized # type: ignore def _delete_initial(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2088,7 +2088,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-09-30")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2163,7 +2163,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Snapshot"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-09-30")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2230,7 +2230,7 @@ def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2420,7 +2420,7 @@ def get_long_running_output(pipeline_response): ) def _revoke_access_initial(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/__init__.py index 3b1b6244b2375..ab7c46e8991db 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/__init__.py @@ -5,15 +5,21 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._compute_management_client import ComputeManagementClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._compute_management_client import ComputeManagementClient # 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__ = [ "ComputeManagementClient", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/_compute_management_client.py index 4642f14082d80..4f97a37f15bd2 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/_compute_management_client.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/_compute_management_client.py @@ -38,11 +38,10 @@ ) if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class ComputeManagementClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes +class ComputeManagementClient: # pylint: disable=too-many-instance-attributes """Compute Client. :ivar operations: Operations operations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/_configuration.py index 5b79072078294..7e4a1b712416b 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/_configuration.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/_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 ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ComputeManagementClient. Note that all parameters used to create this instance are saved as instance diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/_version.py index d79b2760319c5..e5754a47ce68f 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "33.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/aio/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/aio/__init__.py index 0715f50185586..d3fd1ba93379a 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/aio/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/aio/__init__.py @@ -5,12 +5,18 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._compute_management_client import ComputeManagementClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._compute_management_client import ComputeManagementClient # 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__ = [ "ComputeManagementClient", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/aio/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/aio/_compute_management_client.py index 6a35df2a8ec7b..73689f90ef0d4 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/aio/_compute_management_client.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/aio/_compute_management_client.py @@ -38,11 +38,10 @@ ) if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class ComputeManagementClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes +class ComputeManagementClient: # pylint: disable=too-many-instance-attributes """Compute Client. :ivar operations: Operations operations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/aio/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/aio/_configuration.py index 3e63e63b02948..e9c8a12589269 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/aio/_configuration.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/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 ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ComputeManagementClient. Note that all parameters used to create this instance are saved as instance diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/aio/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/aio/operations/__init__.py index 7d6d0c8abfeb8..7d90977b3ead3 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/aio/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/aio/operations/__init__.py @@ -5,26 +5,32 @@ # Code generated by Microsoft (R) AutoRest 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 AvailabilitySetsOperations -from ._operations import ProximityPlacementGroupsOperations -from ._operations import VirtualMachineExtensionImagesOperations -from ._operations import VirtualMachineExtensionsOperations -from ._operations import VirtualMachineImagesOperations -from ._operations import UsageOperations -from ._operations import VirtualMachinesOperations -from ._operations import VirtualMachineSizesOperations -from ._operations import ImagesOperations -from ._operations import VirtualMachineScaleSetsOperations -from ._operations import VirtualMachineScaleSetExtensionsOperations -from ._operations import VirtualMachineScaleSetRollingUpgradesOperations -from ._operations import VirtualMachineScaleSetVMsOperations -from ._operations import LogAnalyticsOperations -from ._operations import VirtualMachineRunCommandsOperations +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 AvailabilitySetsOperations # type: ignore +from ._operations import ProximityPlacementGroupsOperations # type: ignore +from ._operations import VirtualMachineExtensionImagesOperations # type: ignore +from ._operations import VirtualMachineExtensionsOperations # type: ignore +from ._operations import VirtualMachineImagesOperations # type: ignore +from ._operations import UsageOperations # type: ignore +from ._operations import VirtualMachinesOperations # type: ignore +from ._operations import VirtualMachineSizesOperations # type: ignore +from ._operations import ImagesOperations # type: ignore +from ._operations import VirtualMachineScaleSetsOperations # type: ignore +from ._operations import VirtualMachineScaleSetExtensionsOperations # type: ignore +from ._operations import VirtualMachineScaleSetRollingUpgradesOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMsOperations # type: ignore +from ._operations import LogAnalyticsOperations # type: ignore +from ._operations import VirtualMachineRunCommandsOperations # 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__ = [ @@ -45,5 +51,5 @@ "LogAnalyticsOperations", "VirtualMachineRunCommandsOperations", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/aio/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/aio/operations/_operations.py index 4797dc225973b..645877128c18b 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/aio/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/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. @@ -18,7 +18,6 @@ List, Literal, Optional, - Type, TypeVar, Union, cast, @@ -154,7 +153,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]] @@ -195,7 +194,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.ComputeOperationValue"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-10-01")) cls: ClsType[_models.ComputeOperationListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -348,7 +347,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2018_10_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -475,7 +474,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2018_10_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -530,9 +529,7 @@ async def update( return deserialized # type: ignore @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, availability_set_name: str, **kwargs: Any - ) -> None: + async def delete(self, resource_group_name: str, availability_set_name: str, **kwargs: Any) -> None: """Delete an availability set. :param resource_group_name: The name of the resource group. Required. @@ -543,7 +540,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -593,7 +590,7 @@ async def get(self, resource_group_name: str, availability_set_name: str, **kwar :rtype: ~azure.mgmt.compute.v2018_10_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -655,7 +652,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-10-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -733,7 +730,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-10-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -816,7 +813,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-10-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -974,7 +971,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2018_10_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1104,7 +1101,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2018_10_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1159,9 +1156,7 @@ async def update( return deserialized # type: ignore @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, proximity_placement_group_name: str, **kwargs: Any - ) -> None: + async def delete(self, resource_group_name: str, proximity_placement_group_name: str, **kwargs: Any) -> None: """Delete a proximity placement group. :param resource_group_name: The name of the resource group. Required. @@ -1172,7 +1167,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1224,7 +1219,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2018_10_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1282,7 +1277,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Proximit api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-10-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1362,7 +1357,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-10-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1462,7 +1457,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineExtensionImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1520,7 +1515,7 @@ async def list_types( :rtype: list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1592,7 +1587,7 @@ async def list_versions( :rtype: list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1667,7 +1662,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineExtension, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1877,7 +1872,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineExtensionUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2083,7 +2078,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_name: str, vm_extension_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2213,7 +2208,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2273,7 +2268,7 @@ async def list( :rtype: ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2357,7 +2352,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2436,7 +2431,7 @@ async def list( :rtype: list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2497,7 +2492,7 @@ async def list_offers( :rtype: list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2549,7 +2544,7 @@ async def list_publishers(self, location: str, **kwargs: Any) -> List[_models.Vi :rtype: list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2606,7 +2601,7 @@ async def list_skus( :rtype: list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2687,7 +2682,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.Usage"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-10-01")) cls: ClsType[_models.ListUsagesResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2787,7 +2782,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> AsyncIterable["_mode api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-10-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2855,7 +2850,7 @@ async def _capture_initial( parameters: Union[_models.VirtualMachineCaptureParameters, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3053,7 +3048,7 @@ async def _create_or_update_initial( parameters: Union[_models.VirtualMachine, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3245,7 +3240,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3431,7 +3426,7 @@ def get_long_running_output(pipeline_response): ) async def _delete_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3547,7 +3542,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2018_10_01.models.VirtualMachine :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3604,7 +3599,7 @@ async def instance_view( :rtype: ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3649,7 +3644,7 @@ async def instance_view( async def _convert_to_managed_disks_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3752,7 +3747,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _deallocate_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3853,9 +3848,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace_async - async def generalize( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, vm_name: str, **kwargs: Any - ) -> None: + async def generalize(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> None: """Sets the state of the virtual machine to generalized. :param resource_group_name: The name of the resource group. Required. @@ -3866,7 +3859,7 @@ async def generalize( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3922,7 +3915,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-10-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3999,7 +3992,7 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.VirtualMachine"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-10-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4081,7 +4074,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-10-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4144,7 +4137,7 @@ async def get_next(next_link=None): return AsyncItemPaged(get_next, extract_data) async def _power_off_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4245,7 +4238,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _restart_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4345,7 +4338,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _start_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4445,7 +4438,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _redeploy_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4551,7 +4544,7 @@ async def _reimage_initial( parameters: Optional[Union[_models.VirtualMachineReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4735,7 +4728,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _perform_maintenance_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4843,7 +4836,7 @@ async def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5069,7 +5062,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.VirtualMa api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-10-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5154,7 +5147,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, image_name: str, parameters: Union[_models.Image, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5336,7 +5329,7 @@ async def _update_initial( parameters: Union[_models.ImageUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5516,7 +5509,7 @@ def get_long_running_output(pipeline_response): ) async def _delete_initial(self, resource_group_name: str, image_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5631,7 +5624,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2018_10_01.models.Image :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5690,7 +5683,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-10-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5766,7 +5759,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Image"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-10-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5854,7 +5847,7 @@ async def _create_or_update_initial( parameters: Union[_models.VirtualMachineScaleSet, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6046,7 +6039,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineScaleSetUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6235,7 +6228,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6350,7 +6343,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6399,7 +6392,7 @@ async def _deallocate_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6594,7 +6587,7 @@ async def _delete_instances_initial( vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6787,7 +6780,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6847,7 +6840,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-10-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6926,7 +6919,7 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.VirtualMachineScaleS api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-10-01")) cls: ClsType[_models.VirtualMachineScaleSetListWithLinkResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7009,7 +7002,7 @@ def list_skus( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-10-01")) cls: ClsType[_models.VirtualMachineScaleSetListSkusResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7075,6 +7068,7 @@ async def get_next(next_link=None): def get_os_upgrade_history( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> AsyncIterable["_models.UpgradeOperationHistoricalStatusInfo"]: + # pylint: disable=line-too-long """Gets list of OS upgrades on a VM scale set instance. :param resource_group_name: The name of the resource group. Required. @@ -7093,7 +7087,7 @@ def get_os_upgrade_history( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-10-01")) cls: ClsType[_models.VirtualMachineScaleSetListOSUpgradeHistory] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7162,7 +7156,7 @@ async def _power_off_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7357,7 +7351,7 @@ async def _restart_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7546,7 +7540,7 @@ async def _start_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7735,7 +7729,7 @@ async def _redeploy_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7927,7 +7921,7 @@ async def _perform_maintenance_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8125,7 +8119,7 @@ async def _update_instances_initial( vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8311,7 +8305,7 @@ async def _reimage_initial( vm_scale_set_reimage_input: Optional[Union[_models.VirtualMachineScaleSetReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8504,7 +8498,7 @@ async def _reimage_all_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8707,7 +8701,7 @@ async def force_recovery_service_fabric_platform_update_domain_walk( # pylint: :rtype: ~azure.mgmt.compute.v2018_10_01.models.RecoveryWalkResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8779,7 +8773,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtension, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8985,7 +8979,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, vmss_extension_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9115,7 +9109,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9181,7 +9175,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-10-01")) cls: ClsType[_models.VirtualMachineScaleSetExtensionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9267,7 +9261,7 @@ def __init__(self, *args, **kwargs) -> None: async def _cancel_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9371,7 +9365,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_os_upgrade_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9477,7 +9471,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_extension_upgrade_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9594,7 +9588,7 @@ async def get_latest( :rtype: ~azure.mgmt.compute.v2018_10_01.models.RollingUpgradeStatusInfo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9667,7 +9661,7 @@ async def _reimage_initial( ] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9866,7 +9860,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _reimage_all_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9975,7 +9969,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _deallocate_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10090,7 +10084,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineScaleSetVM, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10294,7 +10288,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10415,7 +10409,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetVM :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10474,7 +10468,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetVMInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10556,7 +10550,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-10-01")) cls: ClsType[_models.VirtualMachineScaleSetVMListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10624,7 +10618,7 @@ async def get_next(next_link=None): async def _power_off_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10734,7 +10728,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _restart_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10842,7 +10836,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10950,7 +10944,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _redeploy_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11059,7 +11053,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _perform_maintenance_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11172,7 +11166,7 @@ async def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11394,7 +11388,7 @@ def __init__(self, *args, **kwargs) -> None: async def _export_request_rate_by_interval_initial( self, location: str, parameters: Union[_models.RequestRateByIntervalInput, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11572,7 +11566,7 @@ def get_long_running_output(pipeline_response): async def _export_throttled_requests_initial( self, location: str, parameters: Union[_models.ThrottledRequestsInput, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11783,7 +11777,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.RunComman api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-10-01")) cls: ClsType[_models.RunCommandListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11856,7 +11850,7 @@ async def get(self, location: str, command_id: str, **kwargs: Any) -> _models.Ru :rtype: ~azure.mgmt.compute.v2018_10_01.models.RunCommandDocument :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/__init__.py index 9a28d483d9c4f..2bee23bc2de2e 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/__init__.py @@ -5,185 +5,196 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._models_py3 import AdditionalCapabilities -from ._models_py3 import AdditionalUnattendContent -from ._models_py3 import ApiEntityReference -from ._models_py3 import ApiError -from ._models_py3 import ApiErrorBase -from ._models_py3 import AutomaticOSUpgradePolicy -from ._models_py3 import AutomaticOSUpgradeProperties -from ._models_py3 import AutomaticRepairsPolicy -from ._models_py3 import AvailabilitySet -from ._models_py3 import AvailabilitySetListResult -from ._models_py3 import AvailabilitySetUpdate -from ._models_py3 import BootDiagnostics -from ._models_py3 import BootDiagnosticsInstanceView -from ._models_py3 import ComputeOperationListResult -from ._models_py3 import ComputeOperationValue -from ._models_py3 import DataDisk -from ._models_py3 import DataDiskImage -from ._models_py3 import DiagnosticsProfile -from ._models_py3 import DiffDiskSettings -from ._models_py3 import DiskEncryptionSettings -from ._models_py3 import DiskInstanceView -from ._models_py3 import HardwareProfile -from ._models_py3 import Image -from ._models_py3 import ImageDataDisk -from ._models_py3 import ImageListResult -from ._models_py3 import ImageOSDisk -from ._models_py3 import ImageReference -from ._models_py3 import ImageStorageProfile -from ._models_py3 import ImageUpdate -from ._models_py3 import InnerError -from ._models_py3 import InstanceViewStatus -from ._models_py3 import KeyVaultKeyReference -from ._models_py3 import KeyVaultSecretReference -from ._models_py3 import LinuxConfiguration -from ._models_py3 import ListUsagesResult -from ._models_py3 import LogAnalyticsInputBase -from ._models_py3 import LogAnalyticsOperationResult -from ._models_py3 import LogAnalyticsOutput -from ._models_py3 import MaintenanceRedeployStatus -from ._models_py3 import ManagedDiskParameters -from ._models_py3 import NetworkInterfaceReference -from ._models_py3 import NetworkProfile -from ._models_py3 import OSDisk -from ._models_py3 import OSDiskImage -from ._models_py3 import OSProfile -from ._models_py3 import Plan -from ._models_py3 import ProximityPlacementGroup -from ._models_py3 import ProximityPlacementGroupListResult -from ._models_py3 import ProximityPlacementGroupUpdate -from ._models_py3 import PurchasePlan -from ._models_py3 import RecoveryWalkResponse -from ._models_py3 import RequestRateByIntervalInput -from ._models_py3 import Resource -from ._models_py3 import RollbackStatusInfo -from ._models_py3 import RollingUpgradePolicy -from ._models_py3 import RollingUpgradeProgressInfo -from ._models_py3 import RollingUpgradeRunningStatus -from ._models_py3 import RollingUpgradeStatusInfo -from ._models_py3 import RunCommandDocument -from ._models_py3 import RunCommandDocumentBase -from ._models_py3 import RunCommandInput -from ._models_py3 import RunCommandInputParameter -from ._models_py3 import RunCommandListResult -from ._models_py3 import RunCommandParameterDefinition -from ._models_py3 import RunCommandResult -from ._models_py3 import Sku -from ._models_py3 import SshConfiguration -from ._models_py3 import SshPublicKey -from ._models_py3 import StorageProfile -from ._models_py3 import SubResource -from ._models_py3 import SubResourceReadOnly -from ._models_py3 import ThrottledRequestsInput -from ._models_py3 import UpdateResource -from ._models_py3 import UpgradeOperationHistoricalStatusInfo -from ._models_py3 import UpgradeOperationHistoricalStatusInfoProperties -from ._models_py3 import UpgradeOperationHistoryStatus -from ._models_py3 import UpgradePolicy -from ._models_py3 import Usage -from ._models_py3 import UsageName -from ._models_py3 import UserAssignedIdentitiesValue -from ._models_py3 import VaultCertificate -from ._models_py3 import VaultSecretGroup -from ._models_py3 import VirtualHardDisk -from ._models_py3 import VirtualMachine -from ._models_py3 import VirtualMachineAgentInstanceView -from ._models_py3 import VirtualMachineCaptureParameters -from ._models_py3 import VirtualMachineCaptureResult -from ._models_py3 import VirtualMachineExtension -from ._models_py3 import VirtualMachineExtensionHandlerInstanceView -from ._models_py3 import VirtualMachineExtensionImage -from ._models_py3 import VirtualMachineExtensionInstanceView -from ._models_py3 import VirtualMachineExtensionUpdate -from ._models_py3 import VirtualMachineExtensionsListResult -from ._models_py3 import VirtualMachineHealthStatus -from ._models_py3 import VirtualMachineIdentity -from ._models_py3 import VirtualMachineImage -from ._models_py3 import VirtualMachineImageResource -from ._models_py3 import VirtualMachineInstanceView -from ._models_py3 import VirtualMachineListResult -from ._models_py3 import VirtualMachineReimageParameters -from ._models_py3 import VirtualMachineScaleSet -from ._models_py3 import VirtualMachineScaleSetDataDisk -from ._models_py3 import VirtualMachineScaleSetExtension -from ._models_py3 import VirtualMachineScaleSetExtensionListResult -from ._models_py3 import VirtualMachineScaleSetExtensionProfile -from ._models_py3 import VirtualMachineScaleSetIPConfiguration -from ._models_py3 import VirtualMachineScaleSetIdentity -from ._models_py3 import VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue -from ._models_py3 import VirtualMachineScaleSetInstanceView -from ._models_py3 import VirtualMachineScaleSetInstanceViewStatusesSummary -from ._models_py3 import VirtualMachineScaleSetIpTag -from ._models_py3 import VirtualMachineScaleSetListOSUpgradeHistory -from ._models_py3 import VirtualMachineScaleSetListResult -from ._models_py3 import VirtualMachineScaleSetListSkusResult -from ._models_py3 import VirtualMachineScaleSetListWithLinkResult -from ._models_py3 import VirtualMachineScaleSetManagedDiskParameters -from ._models_py3 import VirtualMachineScaleSetNetworkConfiguration -from ._models_py3 import VirtualMachineScaleSetNetworkConfigurationDnsSettings -from ._models_py3 import VirtualMachineScaleSetNetworkProfile -from ._models_py3 import VirtualMachineScaleSetOSDisk -from ._models_py3 import VirtualMachineScaleSetOSProfile -from ._models_py3 import VirtualMachineScaleSetPublicIPAddressConfiguration -from ._models_py3 import VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings -from ._models_py3 import VirtualMachineScaleSetReimageParameters -from ._models_py3 import VirtualMachineScaleSetSku -from ._models_py3 import VirtualMachineScaleSetSkuCapacity -from ._models_py3 import VirtualMachineScaleSetStorageProfile -from ._models_py3 import VirtualMachineScaleSetUpdate -from ._models_py3 import VirtualMachineScaleSetUpdateIPConfiguration -from ._models_py3 import VirtualMachineScaleSetUpdateNetworkConfiguration -from ._models_py3 import VirtualMachineScaleSetUpdateNetworkProfile -from ._models_py3 import VirtualMachineScaleSetUpdateOSDisk -from ._models_py3 import VirtualMachineScaleSetUpdateOSProfile -from ._models_py3 import VirtualMachineScaleSetUpdatePublicIPAddressConfiguration -from ._models_py3 import VirtualMachineScaleSetUpdateStorageProfile -from ._models_py3 import VirtualMachineScaleSetUpdateVMProfile -from ._models_py3 import VirtualMachineScaleSetVM -from ._models_py3 import VirtualMachineScaleSetVMExtensionsSummary -from ._models_py3 import VirtualMachineScaleSetVMInstanceIDs -from ._models_py3 import VirtualMachineScaleSetVMInstanceRequiredIDs -from ._models_py3 import VirtualMachineScaleSetVMInstanceView -from ._models_py3 import VirtualMachineScaleSetVMListResult -from ._models_py3 import VirtualMachineScaleSetVMProfile -from ._models_py3 import VirtualMachineScaleSetVMReimageParameters -from ._models_py3 import VirtualMachineSize -from ._models_py3 import VirtualMachineSizeListResult -from ._models_py3 import VirtualMachineStatusCodeCount -from ._models_py3 import VirtualMachineUpdate -from ._models_py3 import WinRMConfiguration -from ._models_py3 import WinRMListener -from ._models_py3 import WindowsConfiguration +from typing import TYPE_CHECKING -from ._compute_management_client_enums import AvailabilitySetSkuTypes -from ._compute_management_client_enums import CachingTypes -from ._compute_management_client_enums import DiffDiskOptions -from ._compute_management_client_enums import DiskCreateOptionTypes -from ._compute_management_client_enums import IPVersion -from ._compute_management_client_enums import IntervalInMins -from ._compute_management_client_enums import MaintenanceOperationResultCodeTypes -from ._compute_management_client_enums import OperatingSystemStateTypes -from ._compute_management_client_enums import OperatingSystemTypes -from ._compute_management_client_enums import ProtocolTypes -from ._compute_management_client_enums import ProximityPlacementGroupType -from ._compute_management_client_enums import ResourceIdentityType -from ._compute_management_client_enums import RollingUpgradeActionType -from ._compute_management_client_enums import RollingUpgradeStatusCode -from ._compute_management_client_enums import SettingNames -from ._compute_management_client_enums import StatusLevelTypes -from ._compute_management_client_enums import StorageAccountTypes -from ._compute_management_client_enums import UpgradeMode -from ._compute_management_client_enums import UpgradeOperationInvoker -from ._compute_management_client_enums import UpgradeState -from ._compute_management_client_enums import VirtualMachineEvictionPolicyTypes -from ._compute_management_client_enums import VirtualMachinePriorityTypes -from ._compute_management_client_enums import VirtualMachineScaleSetSkuScaleType -from ._compute_management_client_enums import VirtualMachineSizeTypes +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + + +from ._models_py3 import ( # type: ignore + AdditionalCapabilities, + AdditionalUnattendContent, + ApiEntityReference, + ApiError, + ApiErrorBase, + AutomaticOSUpgradePolicy, + AutomaticOSUpgradeProperties, + AutomaticRepairsPolicy, + AvailabilitySet, + AvailabilitySetListResult, + AvailabilitySetUpdate, + BootDiagnostics, + BootDiagnosticsInstanceView, + ComputeOperationListResult, + ComputeOperationValue, + DataDisk, + DataDiskImage, + DiagnosticsProfile, + DiffDiskSettings, + DiskEncryptionSettings, + DiskInstanceView, + HardwareProfile, + Image, + ImageDataDisk, + ImageListResult, + ImageOSDisk, + ImageReference, + ImageStorageProfile, + ImageUpdate, + InnerError, + InstanceViewStatus, + KeyVaultKeyReference, + KeyVaultSecretReference, + LinuxConfiguration, + ListUsagesResult, + LogAnalyticsInputBase, + LogAnalyticsOperationResult, + LogAnalyticsOutput, + MaintenanceRedeployStatus, + ManagedDiskParameters, + NetworkInterfaceReference, + NetworkProfile, + OSDisk, + OSDiskImage, + OSProfile, + Plan, + ProximityPlacementGroup, + ProximityPlacementGroupListResult, + ProximityPlacementGroupUpdate, + PurchasePlan, + RecoveryWalkResponse, + RequestRateByIntervalInput, + Resource, + RollbackStatusInfo, + RollingUpgradePolicy, + RollingUpgradeProgressInfo, + RollingUpgradeRunningStatus, + RollingUpgradeStatusInfo, + RunCommandDocument, + RunCommandDocumentBase, + RunCommandInput, + RunCommandInputParameter, + RunCommandListResult, + RunCommandParameterDefinition, + RunCommandResult, + Sku, + SshConfiguration, + SshPublicKey, + StorageProfile, + SubResource, + SubResourceReadOnly, + ThrottledRequestsInput, + UpdateResource, + UpgradeOperationHistoricalStatusInfo, + UpgradeOperationHistoricalStatusInfoProperties, + UpgradeOperationHistoryStatus, + UpgradePolicy, + Usage, + UsageName, + UserAssignedIdentitiesValue, + VaultCertificate, + VaultSecretGroup, + VirtualHardDisk, + VirtualMachine, + VirtualMachineAgentInstanceView, + VirtualMachineCaptureParameters, + VirtualMachineCaptureResult, + VirtualMachineExtension, + VirtualMachineExtensionHandlerInstanceView, + VirtualMachineExtensionImage, + VirtualMachineExtensionInstanceView, + VirtualMachineExtensionUpdate, + VirtualMachineExtensionsListResult, + VirtualMachineHealthStatus, + VirtualMachineIdentity, + VirtualMachineImage, + VirtualMachineImageResource, + VirtualMachineInstanceView, + VirtualMachineListResult, + VirtualMachineReimageParameters, + VirtualMachineScaleSet, + VirtualMachineScaleSetDataDisk, + VirtualMachineScaleSetExtension, + VirtualMachineScaleSetExtensionListResult, + VirtualMachineScaleSetExtensionProfile, + VirtualMachineScaleSetIPConfiguration, + VirtualMachineScaleSetIdentity, + VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue, + VirtualMachineScaleSetInstanceView, + VirtualMachineScaleSetInstanceViewStatusesSummary, + VirtualMachineScaleSetIpTag, + VirtualMachineScaleSetListOSUpgradeHistory, + VirtualMachineScaleSetListResult, + VirtualMachineScaleSetListSkusResult, + VirtualMachineScaleSetListWithLinkResult, + VirtualMachineScaleSetManagedDiskParameters, + VirtualMachineScaleSetNetworkConfiguration, + VirtualMachineScaleSetNetworkConfigurationDnsSettings, + VirtualMachineScaleSetNetworkProfile, + VirtualMachineScaleSetOSDisk, + VirtualMachineScaleSetOSProfile, + VirtualMachineScaleSetPublicIPAddressConfiguration, + VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings, + VirtualMachineScaleSetReimageParameters, + VirtualMachineScaleSetSku, + VirtualMachineScaleSetSkuCapacity, + VirtualMachineScaleSetStorageProfile, + VirtualMachineScaleSetUpdate, + VirtualMachineScaleSetUpdateIPConfiguration, + VirtualMachineScaleSetUpdateNetworkConfiguration, + VirtualMachineScaleSetUpdateNetworkProfile, + VirtualMachineScaleSetUpdateOSDisk, + VirtualMachineScaleSetUpdateOSProfile, + VirtualMachineScaleSetUpdatePublicIPAddressConfiguration, + VirtualMachineScaleSetUpdateStorageProfile, + VirtualMachineScaleSetUpdateVMProfile, + VirtualMachineScaleSetVM, + VirtualMachineScaleSetVMExtensionsSummary, + VirtualMachineScaleSetVMInstanceIDs, + VirtualMachineScaleSetVMInstanceRequiredIDs, + VirtualMachineScaleSetVMInstanceView, + VirtualMachineScaleSetVMListResult, + VirtualMachineScaleSetVMProfile, + VirtualMachineScaleSetVMReimageParameters, + VirtualMachineSize, + VirtualMachineSizeListResult, + VirtualMachineStatusCodeCount, + VirtualMachineUpdate, + WinRMConfiguration, + WinRMListener, + WindowsConfiguration, +) + +from ._compute_management_client_enums import ( # type: ignore + AvailabilitySetSkuTypes, + CachingTypes, + DiffDiskOptions, + DiskCreateOptionTypes, + IPVersion, + IntervalInMins, + MaintenanceOperationResultCodeTypes, + OperatingSystemStateTypes, + OperatingSystemTypes, + ProtocolTypes, + ProximityPlacementGroupType, + ResourceIdentityType, + RollingUpgradeActionType, + RollingUpgradeStatusCode, + SettingNames, + StatusLevelTypes, + StorageAccountTypes, + UpgradeMode, + UpgradeOperationInvoker, + UpgradeState, + VirtualMachineEvictionPolicyTypes, + VirtualMachinePriorityTypes, + VirtualMachineScaleSetSkuScaleType, + VirtualMachineSizeTypes, +) 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__ = [ @@ -363,5 +374,5 @@ "VirtualMachineScaleSetSkuScaleType", "VirtualMachineSizeTypes", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/_models_py3.py index 7e9eacedccab7..949b4a25da72d 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/_models_py3.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/_models_py3.py @@ -1,5 +1,5 @@ -# 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. @@ -16,10 +16,9 @@ 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 if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object @@ -376,7 +375,7 @@ def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kw self.tags = tags -class AvailabilitySet(Resource): # pylint: disable=too-many-instance-attributes +class AvailabilitySet(Resource): """Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see `Manage the @@ -2151,7 +2150,7 @@ def __init__( self.network_interfaces = network_interfaces -class OSDisk(_serialization.Model): # pylint: disable=too-many-instance-attributes +class OSDisk(_serialization.Model): """Specifies information about the operating system disk used by the virtual machine. :code:`
`:code:`
` For more information about disks, see `About disks and VHDs for Azure virtual machines @@ -3971,7 +3970,7 @@ def __init__(self, *, uri: Optional[str] = None, **kwargs: Any) -> None: self.uri = uri -class VirtualMachine(Resource): # pylint: disable=too-many-instance-attributes +class VirtualMachine(Resource): """Describes a Virtual Machine. Variables are only populated by the server, and will be ignored when sending a request. @@ -4304,7 +4303,7 @@ def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylin self.resources = None -class VirtualMachineExtension(Resource): # pylint: disable=too-many-instance-attributes +class VirtualMachineExtension(Resource): """Describes a Virtual Machine Extension. Variables are only populated by the server, and will be ignored when sending a request. @@ -4940,7 +4939,7 @@ def __init__( self.automatic_os_upgrade_properties = automatic_os_upgrade_properties -class VirtualMachineInstanceView(_serialization.Model): # pylint: disable=too-many-instance-attributes +class VirtualMachineInstanceView(_serialization.Model): """The instance view of a virtual machine. :ivar platform_update_domain: Specifies the update domain of the virtual machine. @@ -5111,7 +5110,7 @@ def __init__(self, *, temp_disk: Optional[bool] = None, **kwargs: Any) -> None: self.temp_disk = temp_disk -class VirtualMachineScaleSet(Resource): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSet(Resource): """Describes a Virtual Machine Scale Set. Variables are only populated by the server, and will be ignored when sending a request. @@ -5389,7 +5388,7 @@ def __init__( self.managed_disk = managed_disk -class VirtualMachineScaleSetExtension(SubResourceReadOnly): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetExtension(SubResourceReadOnly): """Describes a Virtual Machine Scale Set Extension. Variables are only populated by the server, and will be ignored when sending a request. @@ -6744,7 +6743,7 @@ def __init__( self.data_disks = data_disks -class VirtualMachineScaleSetUpdate(UpdateResource): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetUpdate(UpdateResource): """Describes a Virtual Machine Scale Set. :ivar tags: Resource tags. @@ -7368,7 +7367,7 @@ def __init__( self.license_type = license_type -class VirtualMachineScaleSetVM(Resource): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetVM(Resource): """Describes a virtual machine scale set virtual machine. Variables are only populated by the server, and will be ignored when sending a request. @@ -7649,7 +7648,7 @@ def __init__(self, *, instance_ids: List[str], **kwargs: Any) -> None: self.instance_ids = instance_ids -class VirtualMachineScaleSetVMInstanceView(_serialization.Model): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetVMInstanceView(_serialization.Model): """The instance view of a virtual machine scale set VM. Variables are only populated by the server, and will be ignored when sending a request. @@ -8031,7 +8030,7 @@ def __init__(self, **kwargs: Any) -> None: self.count = None -class VirtualMachineUpdate(UpdateResource): # pylint: disable=too-many-instance-attributes +class VirtualMachineUpdate(UpdateResource): """Describes a Virtual Machine Update. Variables are only populated by the server, and will be ignored when sending a request. diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/__init__.py index 7d6d0c8abfeb8..7d90977b3ead3 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/__init__.py @@ -5,26 +5,32 @@ # Code generated by Microsoft (R) AutoRest 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 AvailabilitySetsOperations -from ._operations import ProximityPlacementGroupsOperations -from ._operations import VirtualMachineExtensionImagesOperations -from ._operations import VirtualMachineExtensionsOperations -from ._operations import VirtualMachineImagesOperations -from ._operations import UsageOperations -from ._operations import VirtualMachinesOperations -from ._operations import VirtualMachineSizesOperations -from ._operations import ImagesOperations -from ._operations import VirtualMachineScaleSetsOperations -from ._operations import VirtualMachineScaleSetExtensionsOperations -from ._operations import VirtualMachineScaleSetRollingUpgradesOperations -from ._operations import VirtualMachineScaleSetVMsOperations -from ._operations import LogAnalyticsOperations -from ._operations import VirtualMachineRunCommandsOperations +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 AvailabilitySetsOperations # type: ignore +from ._operations import ProximityPlacementGroupsOperations # type: ignore +from ._operations import VirtualMachineExtensionImagesOperations # type: ignore +from ._operations import VirtualMachineExtensionsOperations # type: ignore +from ._operations import VirtualMachineImagesOperations # type: ignore +from ._operations import UsageOperations # type: ignore +from ._operations import VirtualMachinesOperations # type: ignore +from ._operations import VirtualMachineSizesOperations # type: ignore +from ._operations import ImagesOperations # type: ignore +from ._operations import VirtualMachineScaleSetsOperations # type: ignore +from ._operations import VirtualMachineScaleSetExtensionsOperations # type: ignore +from ._operations import VirtualMachineScaleSetRollingUpgradesOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMsOperations # type: ignore +from ._operations import LogAnalyticsOperations # type: ignore +from ._operations import VirtualMachineRunCommandsOperations # 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__ = [ @@ -45,5 +51,5 @@ "LogAnalyticsOperations", "VirtualMachineRunCommandsOperations", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/_operations.py index 2a679bd7a3c6d..a8d1822f77a1e 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/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. @@ -8,22 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import ( - Any, - Callable, - Dict, - IO, - Iterable, - Iterator, - List, - Literal, - Optional, - Type, - TypeVar, - Union, - cast, - overload, -) +from typing import Any, Callable, Dict, IO, Iterable, Iterator, List, Literal, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -51,7 +36,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, HttpResponse], T, Dict[str, Any]], Any]] @@ -3182,7 +3167,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.ComputeOperationValue"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-10-01")) cls: ClsType[_models.ComputeOperationListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3335,7 +3320,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2018_10_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3462,7 +3447,7 @@ def update( :rtype: ~azure.mgmt.compute.v2018_10_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3530,7 +3515,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3580,7 +3565,7 @@ def get(self, resource_group_name: str, availability_set_name: str, **kwargs: An :rtype: ~azure.mgmt.compute.v2018_10_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3641,7 +3626,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-10-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3718,7 +3703,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Ava api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-10-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3800,7 +3785,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-10-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3958,7 +3943,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2018_10_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4088,7 +4073,7 @@ def update( :rtype: ~azure.mgmt.compute.v2018_10_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4156,7 +4141,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4208,7 +4193,7 @@ def get( :rtype: ~azure.mgmt.compute.v2018_10_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4266,7 +4251,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.ProximityPlac api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-10-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4346,7 +4331,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-10-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4446,7 +4431,7 @@ def get( :rtype: ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineExtensionImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4504,7 +4489,7 @@ def list_types( :rtype: list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4576,7 +4561,7 @@ def list_versions( :rtype: list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4651,7 +4636,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineExtension, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4861,7 +4846,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineExtensionUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5067,7 +5052,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_name: str, vm_extension_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5197,7 +5182,7 @@ def get( :rtype: ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5257,7 +5242,7 @@ def list( :rtype: ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5341,7 +5326,7 @@ def get( :rtype: ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5420,7 +5405,7 @@ def list( :rtype: list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5481,7 +5466,7 @@ def list_offers( :rtype: list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5533,7 +5518,7 @@ def list_publishers(self, location: str, **kwargs: Any) -> List[_models.VirtualM :rtype: list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5590,7 +5575,7 @@ def list_skus( :rtype: list[~azure.mgmt.compute.v2018_10_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5671,7 +5656,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.Usage"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-10-01")) cls: ClsType[_models.ListUsagesResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5770,7 +5755,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> Iterable["_models.Vi api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-10-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5838,7 +5823,7 @@ def _capture_initial( parameters: Union[_models.VirtualMachineCaptureParameters, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6036,7 +6021,7 @@ def _create_or_update_initial( parameters: Union[_models.VirtualMachine, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6225,7 +6210,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6408,7 +6393,7 @@ def get_long_running_output(pipeline_response): ) def _delete_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6524,7 +6509,7 @@ def get( :rtype: ~azure.mgmt.compute.v2018_10_01.models.VirtualMachine :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6581,7 +6566,7 @@ def instance_view( :rtype: ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6626,7 +6611,7 @@ def instance_view( def _convert_to_managed_disks_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6727,7 +6712,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _deallocate_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6841,7 +6826,7 @@ def generalize( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6896,7 +6881,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Vir api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-10-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6972,7 +6957,7 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.VirtualMachine"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-10-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7053,7 +7038,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-10-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7116,7 +7101,7 @@ def get_next(next_link=None): return ItemPaged(get_next, extract_data) def _power_off_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7217,7 +7202,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _restart_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7317,7 +7302,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _start_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7417,7 +7402,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _redeploy_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7523,7 +7508,7 @@ def _reimage_initial( parameters: Optional[Union[_models.VirtualMachineReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7705,7 +7690,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _perform_maintenance_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7811,7 +7796,7 @@ def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8033,7 +8018,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.VirtualMachine api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-10-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8118,7 +8103,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, image_name: str, parameters: Union[_models.Image, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8300,7 +8285,7 @@ def _update_initial( parameters: Union[_models.ImageUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8480,7 +8465,7 @@ def get_long_running_output(pipeline_response): ) def _delete_initial(self, resource_group_name: str, image_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8595,7 +8580,7 @@ def get( :rtype: ~azure.mgmt.compute.v2018_10_01.models.Image :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8654,7 +8639,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-10-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8730,7 +8715,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Image"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-10-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8818,7 +8803,7 @@ def _create_or_update_initial( parameters: Union[_models.VirtualMachineScaleSet, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9010,7 +8995,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineScaleSetUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9197,7 +9182,7 @@ def get_long_running_output(pipeline_response): ) def _delete_initial(self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9308,7 +9293,7 @@ def get(self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) - :rtype: ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9357,7 +9342,7 @@ def _deallocate_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9552,7 +9537,7 @@ def _delete_instances_initial( vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9745,7 +9730,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9805,7 +9790,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Vir api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-10-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9884,7 +9869,7 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.VirtualMachineScaleSet"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-10-01")) cls: ClsType[_models.VirtualMachineScaleSetListWithLinkResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9967,7 +9952,7 @@ def list_skus( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-10-01")) cls: ClsType[_models.VirtualMachineScaleSetListSkusResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10051,7 +10036,7 @@ def get_os_upgrade_history( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-10-01")) cls: ClsType[_models.VirtualMachineScaleSetListOSUpgradeHistory] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10120,7 +10105,7 @@ def _power_off_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10315,7 +10300,7 @@ def _restart_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10504,7 +10489,7 @@ def _start_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10693,7 +10678,7 @@ def _redeploy_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10885,7 +10870,7 @@ def _perform_maintenance_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11083,7 +11068,7 @@ def _update_instances_initial( vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11269,7 +11254,7 @@ def _reimage_initial( vm_scale_set_reimage_input: Optional[Union[_models.VirtualMachineScaleSetReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11462,7 +11447,7 @@ def _reimage_all_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11665,7 +11650,7 @@ def force_recovery_service_fabric_platform_update_domain_walk( # pylint: disabl :rtype: ~azure.mgmt.compute.v2018_10_01.models.RecoveryWalkResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11737,7 +11722,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtension, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11943,7 +11928,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, vmss_extension_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12073,7 +12058,7 @@ def get( :rtype: ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12139,7 +12124,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-10-01")) cls: ClsType[_models.VirtualMachineScaleSetExtensionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12223,7 +12208,7 @@ def __init__(self, *args, **kwargs): self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") def _cancel_initial(self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12325,7 +12310,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_os_upgrade_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12431,7 +12416,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_extension_upgrade_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12548,7 +12533,7 @@ def get_latest( :rtype: ~azure.mgmt.compute.v2018_10_01.models.RollingUpgradeStatusInfo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12621,7 +12606,7 @@ def _reimage_initial( ] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12820,7 +12805,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _reimage_all_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12929,7 +12914,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _deallocate_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13044,7 +13029,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineScaleSetVM, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13248,7 +13233,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13369,7 +13354,7 @@ def get( :rtype: ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetVM :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13428,7 +13413,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2018_10_01.models.VirtualMachineScaleSetVMInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13510,7 +13495,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-10-01")) cls: ClsType[_models.VirtualMachineScaleSetVMListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13578,7 +13563,7 @@ def get_next(next_link=None): def _power_off_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13688,7 +13673,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _restart_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13796,7 +13781,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13904,7 +13889,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _redeploy_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14013,7 +13998,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _perform_maintenance_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14126,7 +14111,7 @@ def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14345,7 +14330,7 @@ def __init__(self, *args, **kwargs): def _export_request_rate_by_interval_initial( self, location: str, parameters: Union[_models.RequestRateByIntervalInput, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14522,7 +14507,7 @@ def get_long_running_output(pipeline_response): def _export_throttled_requests_initial( self, location: str, parameters: Union[_models.ThrottledRequestsInput, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14732,7 +14717,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.RunCommandDocu api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2018-10-01")) cls: ClsType[_models.RunCommandListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14805,7 +14790,7 @@ def get(self, location: str, command_id: str, **kwargs: Any) -> _models.RunComma :rtype: ~azure.mgmt.compute.v2018_10_01.models.RunCommandDocument :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/__init__.py index 3b1b6244b2375..ab7c46e8991db 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/__init__.py @@ -5,15 +5,21 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._compute_management_client import ComputeManagementClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._compute_management_client import ComputeManagementClient # 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__ = [ "ComputeManagementClient", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/_compute_management_client.py index 83b8f81c925f5..6cb34df64dfb8 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/_compute_management_client.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/_compute_management_client.py @@ -47,11 +47,10 @@ ) if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class ComputeManagementClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes +class ComputeManagementClient: # pylint: disable=too-many-instance-attributes """Compute Client. :ivar operations: Operations operations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/_configuration.py index 66be55a80f73b..73d2035c3fe3a 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/_configuration.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/_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 ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ComputeManagementClient. Note that all parameters used to create this instance are saved as instance diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/_version.py index d79b2760319c5..e5754a47ce68f 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "33.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/aio/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/aio/__init__.py index 0715f50185586..d3fd1ba93379a 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/aio/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/aio/__init__.py @@ -5,12 +5,18 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._compute_management_client import ComputeManagementClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._compute_management_client import ComputeManagementClient # 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__ = [ "ComputeManagementClient", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/aio/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/aio/_compute_management_client.py index 1a906bdcb2f7e..7d353d13239c5 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/aio/_compute_management_client.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/aio/_compute_management_client.py @@ -47,11 +47,10 @@ ) if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class ComputeManagementClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes +class ComputeManagementClient: # pylint: disable=too-many-instance-attributes """Compute Client. :ivar operations: Operations operations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/aio/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/aio/_configuration.py index f4c216ecd24ed..33eaa92590f30 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/aio/_configuration.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/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 ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ComputeManagementClient. Note that all parameters used to create this instance are saved as instance diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/aio/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/aio/operations/__init__.py index c7b787eba98d3..8bf884273b9b1 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/aio/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/aio/operations/__init__.py @@ -5,35 +5,41 @@ # Code generated by Microsoft (R) AutoRest 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 AvailabilitySetsOperations -from ._operations import ProximityPlacementGroupsOperations -from ._operations import DedicatedHostGroupsOperations -from ._operations import DedicatedHostsOperations -from ._operations import VirtualMachineExtensionImagesOperations -from ._operations import VirtualMachineExtensionsOperations -from ._operations import VirtualMachineImagesOperations -from ._operations import UsageOperations -from ._operations import VirtualMachinesOperations -from ._operations import VirtualMachineSizesOperations -from ._operations import ImagesOperations -from ._operations import VirtualMachineScaleSetsOperations -from ._operations import VirtualMachineScaleSetExtensionsOperations -from ._operations import VirtualMachineScaleSetRollingUpgradesOperations -from ._operations import VirtualMachineScaleSetVMsOperations -from ._operations import LogAnalyticsOperations -from ._operations import VirtualMachineRunCommandsOperations -from ._operations import GalleriesOperations -from ._operations import GalleryImagesOperations -from ._operations import GalleryImageVersionsOperations -from ._operations import GalleryApplicationsOperations -from ._operations import GalleryApplicationVersionsOperations -from ._operations import DisksOperations -from ._operations import SnapshotsOperations +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 AvailabilitySetsOperations # type: ignore +from ._operations import ProximityPlacementGroupsOperations # type: ignore +from ._operations import DedicatedHostGroupsOperations # type: ignore +from ._operations import DedicatedHostsOperations # type: ignore +from ._operations import VirtualMachineExtensionImagesOperations # type: ignore +from ._operations import VirtualMachineExtensionsOperations # type: ignore +from ._operations import VirtualMachineImagesOperations # type: ignore +from ._operations import UsageOperations # type: ignore +from ._operations import VirtualMachinesOperations # type: ignore +from ._operations import VirtualMachineSizesOperations # type: ignore +from ._operations import ImagesOperations # type: ignore +from ._operations import VirtualMachineScaleSetsOperations # type: ignore +from ._operations import VirtualMachineScaleSetExtensionsOperations # type: ignore +from ._operations import VirtualMachineScaleSetRollingUpgradesOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMsOperations # type: ignore +from ._operations import LogAnalyticsOperations # type: ignore +from ._operations import VirtualMachineRunCommandsOperations # type: ignore +from ._operations import GalleriesOperations # type: ignore +from ._operations import GalleryImagesOperations # type: ignore +from ._operations import GalleryImageVersionsOperations # type: ignore +from ._operations import GalleryApplicationsOperations # type: ignore +from ._operations import GalleryApplicationVersionsOperations # type: ignore +from ._operations import DisksOperations # type: ignore +from ._operations import SnapshotsOperations # 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__ = [ @@ -63,5 +69,5 @@ "DisksOperations", "SnapshotsOperations", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/aio/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/aio/operations/_operations.py index 59cf4d66ba579..d361865a04020 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/aio/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/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. @@ -18,7 +18,6 @@ List, Literal, Optional, - Type, TypeVar, Union, cast, @@ -203,7 +202,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]] @@ -244,7 +243,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.ComputeOperationValue"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.ComputeOperationListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -397,7 +396,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2019_03_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -524,7 +523,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2019_03_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -579,9 +578,7 @@ async def update( return deserialized # type: ignore @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, availability_set_name: str, **kwargs: Any - ) -> None: + async def delete(self, resource_group_name: str, availability_set_name: str, **kwargs: Any) -> None: """Delete an availability set. :param resource_group_name: The name of the resource group. Required. @@ -592,7 +589,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -642,7 +639,7 @@ async def get(self, resource_group_name: str, availability_set_name: str, **kwar :rtype: ~azure.mgmt.compute.v2019_03_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -704,7 +701,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -782,7 +779,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -865,7 +862,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1023,7 +1020,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2019_03_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1153,7 +1150,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2019_03_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1208,9 +1205,7 @@ async def update( return deserialized # type: ignore @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, proximity_placement_group_name: str, **kwargs: Any - ) -> None: + async def delete(self, resource_group_name: str, proximity_placement_group_name: str, **kwargs: Any) -> None: """Delete a proximity placement group. :param resource_group_name: The name of the resource group. Required. @@ -1221,7 +1216,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1273,7 +1268,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2019_03_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1331,7 +1326,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Proximit api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1411,7 +1406,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1572,7 +1567,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2019_03_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1699,7 +1694,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2019_03_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1754,9 +1749,7 @@ async def update( return deserialized # type: ignore @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, host_group_name: str, **kwargs: Any - ) -> None: + async def delete(self, resource_group_name: str, host_group_name: str, **kwargs: Any) -> None: """Delete a dedicated host group. :param resource_group_name: The name of the resource group. Required. @@ -1767,7 +1760,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1817,7 +1810,7 @@ async def get(self, resource_group_name: str, host_group_name: str, **kwargs: An :rtype: ~azure.mgmt.compute.v2019_03_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1879,7 +1872,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1956,7 +1949,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Dedicate api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2045,7 +2038,7 @@ async def _create_or_update_initial( parameters: Union[_models.DedicatedHost, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2249,7 +2242,7 @@ async def _update_initial( parameters: Union[_models.DedicatedHostUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2448,7 +2441,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2578,7 +2571,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2019_03_01.models.DedicatedHost :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2644,7 +2637,7 @@ def list_by_host_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.DedicatedHostListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2745,7 +2738,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineExtensionImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2803,7 +2796,7 @@ async def list_types( :rtype: list[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2875,7 +2868,7 @@ async def list_versions( :rtype: list[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2950,7 +2943,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineExtension, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3160,7 +3153,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineExtensionUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3366,7 +3359,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_name: str, vm_extension_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3496,7 +3489,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3556,7 +3549,7 @@ async def list( :rtype: ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3640,7 +3633,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3719,7 +3712,7 @@ async def list( :rtype: list[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3780,7 +3773,7 @@ async def list_offers( :rtype: list[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3832,7 +3825,7 @@ async def list_publishers(self, location: str, **kwargs: Any) -> List[_models.Vi :rtype: list[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3889,7 +3882,7 @@ async def list_skus( :rtype: list[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3970,7 +3963,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.Usage"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.ListUsagesResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4070,7 +4063,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> AsyncIterable["_mode api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4138,7 +4131,7 @@ async def _capture_initial( parameters: Union[_models.VirtualMachineCaptureParameters, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4336,7 +4329,7 @@ async def _create_or_update_initial( parameters: Union[_models.VirtualMachine, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4528,7 +4521,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4714,7 +4707,7 @@ def get_long_running_output(pipeline_response): ) async def _delete_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4830,7 +4823,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2019_03_01.models.VirtualMachine :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4887,7 +4880,7 @@ async def instance_view( :rtype: ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4932,7 +4925,7 @@ async def instance_view( async def _convert_to_managed_disks_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5035,7 +5028,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _deallocate_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5136,9 +5129,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace_async - async def generalize( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, vm_name: str, **kwargs: Any - ) -> None: + async def generalize(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> None: """Sets the state of the virtual machine to generalized. :param resource_group_name: The name of the resource group. Required. @@ -5149,7 +5140,7 @@ async def generalize( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5205,7 +5196,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5282,7 +5273,7 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.VirtualMachine"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5364,7 +5355,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5429,7 +5420,7 @@ async def get_next(next_link=None): async def _power_off_initial( self, resource_group_name: str, vm_name: str, *, skip_shutdown: bool = False, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5538,7 +5529,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _restart_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5638,7 +5629,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _start_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5738,7 +5729,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _redeploy_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5844,7 +5835,7 @@ async def _reimage_initial( parameters: Optional[Union[_models.VirtualMachineReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6028,7 +6019,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _perform_maintenance_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6136,7 +6127,7 @@ async def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6362,7 +6353,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.VirtualMa api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6447,7 +6438,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, image_name: str, parameters: Union[_models.Image, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6629,7 +6620,7 @@ async def _update_initial( parameters: Union[_models.ImageUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6809,7 +6800,7 @@ def get_long_running_output(pipeline_response): ) async def _delete_initial(self, resource_group_name: str, image_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6924,7 +6915,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2019_03_01.models.Image :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6983,7 +6974,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7059,7 +7050,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Image"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7147,7 +7138,7 @@ async def _create_or_update_initial( parameters: Union[_models.VirtualMachineScaleSet, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7339,7 +7330,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineScaleSetUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7528,7 +7519,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7643,7 +7634,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7692,7 +7683,7 @@ async def _deallocate_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7887,7 +7878,7 @@ async def _delete_instances_initial( vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8080,7 +8071,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8140,7 +8131,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8219,7 +8210,7 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.VirtualMachineScaleS api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.VirtualMachineScaleSetListWithLinkResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8302,7 +8293,7 @@ def list_skus( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.VirtualMachineScaleSetListSkusResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8368,6 +8359,7 @@ async def get_next(next_link=None): def get_os_upgrade_history( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> AsyncIterable["_models.UpgradeOperationHistoricalStatusInfo"]: + # pylint: disable=line-too-long """Gets list of OS upgrades on a VM scale set instance. :param resource_group_name: The name of the resource group. Required. @@ -8386,7 +8378,7 @@ def get_os_upgrade_history( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.VirtualMachineScaleSetListOSUpgradeHistory] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8457,7 +8449,7 @@ async def _power_off_initial( skip_shutdown: bool = False, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8670,7 +8662,7 @@ async def _restart_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8859,7 +8851,7 @@ async def _start_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9048,7 +9040,7 @@ async def _redeploy_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9240,7 +9232,7 @@ async def _perform_maintenance_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9438,7 +9430,7 @@ async def _update_instances_initial( vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9624,7 +9616,7 @@ async def _reimage_initial( vm_scale_set_reimage_input: Optional[Union[_models.VirtualMachineScaleSetReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9817,7 +9809,7 @@ async def _reimage_all_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10020,7 +10012,7 @@ async def force_recovery_service_fabric_platform_update_domain_walk( # pylint: :rtype: ~azure.mgmt.compute.v2019_03_01.models.RecoveryWalkResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10064,7 +10056,7 @@ async def force_recovery_service_fabric_platform_update_domain_walk( # pylint: return deserialized # type: ignore @overload - async def convert_to_single_placement_group( # pylint: disable=inconsistent-return-statements + async def convert_to_single_placement_group( self, resource_group_name: str, vm_scale_set_name: str, @@ -10092,7 +10084,7 @@ async def convert_to_single_placement_group( # pylint: disable=inconsistent-ret """ @overload - async def convert_to_single_placement_group( # pylint: disable=inconsistent-return-statements + async def convert_to_single_placement_group( self, resource_group_name: str, vm_scale_set_name: str, @@ -10119,7 +10111,7 @@ async def convert_to_single_placement_group( # pylint: disable=inconsistent-ret """ @distributed_trace_async - async def convert_to_single_placement_group( # pylint: disable=inconsistent-return-statements + async def convert_to_single_placement_group( self, resource_group_name: str, vm_scale_set_name: str, @@ -10142,7 +10134,7 @@ async def convert_to_single_placement_group( # pylint: disable=inconsistent-ret :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10221,7 +10213,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtension, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10427,7 +10419,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, vmss_extension_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10557,7 +10549,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10623,7 +10615,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.VirtualMachineScaleSetExtensionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10709,7 +10701,7 @@ def __init__(self, *args, **kwargs) -> None: async def _cancel_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10813,7 +10805,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_os_upgrade_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10919,7 +10911,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_extension_upgrade_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11036,7 +11028,7 @@ async def get_latest( :rtype: ~azure.mgmt.compute.v2019_03_01.models.RollingUpgradeStatusInfo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11109,7 +11101,7 @@ async def _reimage_initial( ] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11308,7 +11300,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _reimage_all_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11417,7 +11409,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _deallocate_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11532,7 +11524,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineScaleSetVM, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11736,7 +11728,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11866,7 +11858,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetVM :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11926,7 +11918,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetVMInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12008,7 +12000,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.VirtualMachineScaleSetVMListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12082,7 +12074,7 @@ async def _power_off_initial( skip_shutdown: bool = False, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12204,7 +12196,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _restart_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12312,7 +12304,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12420,7 +12412,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _redeploy_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12529,7 +12521,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _perform_maintenance_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12642,7 +12634,7 @@ async def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12864,7 +12856,7 @@ def __init__(self, *args, **kwargs) -> None: async def _export_request_rate_by_interval_initial( self, location: str, parameters: Union[_models.RequestRateByIntervalInput, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13042,7 +13034,7 @@ def get_long_running_output(pipeline_response): async def _export_throttled_requests_initial( self, location: str, parameters: Union[_models.ThrottledRequestsInput, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13253,7 +13245,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.RunComman api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.RunCommandListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13326,7 +13318,7 @@ async def get(self, location: str, command_id: str, **kwargs: Any) -> _models.Ru :rtype: ~azure.mgmt.compute.v2019_03_01.models.RunCommandDocument :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13392,7 +13384,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, gallery_name: str, gallery: Union[_models.Gallery, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13590,7 +13582,7 @@ async def get(self, resource_group_name: str, gallery_name: str, **kwargs: Any) :rtype: ~azure.mgmt.compute.v2019_03_01.models.Gallery :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13633,7 +13625,7 @@ async def get(self, resource_group_name: str, gallery_name: str, **kwargs: Any) return deserialized # type: ignore async def _delete_initial(self, resource_group_name: str, gallery_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13748,7 +13740,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.GalleryList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13823,7 +13815,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Gallery"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.GalleryList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13912,7 +13904,7 @@ async def _create_or_update_initial( gallery_image: Union[_models.GalleryImage, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14133,7 +14125,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2019_03_01.models.GalleryImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14179,7 +14171,7 @@ async def get( async def _delete_initial( self, resource_group_name: str, gallery_name: str, gallery_image_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14307,7 +14299,7 @@ def list_by_gallery( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.GalleryImageList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14399,7 +14391,7 @@ async def _create_or_update_initial( gallery_image_version: Union[_models.GalleryImageVersion, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14655,7 +14647,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2019_03_01.models.GalleryImageVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14708,7 +14700,7 @@ async def _delete_initial( gallery_image_version_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14850,7 +14842,7 @@ def list_by_gallery_image( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.GalleryImageVersionList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14942,7 +14934,7 @@ async def _create_or_update_initial( gallery_application: Union[_models.GalleryApplication, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15168,7 +15160,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2019_03_01.models.GalleryApplication :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15214,7 +15206,7 @@ async def get( async def _delete_initial( self, resource_group_name: str, gallery_name: str, gallery_application_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15343,7 +15335,7 @@ def list_by_gallery( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.GalleryApplicationList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15435,7 +15427,7 @@ async def _create_or_update_initial( gallery_application_version: Union[_models.GalleryApplicationVersion, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15693,7 +15685,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2019_03_01.models.GalleryApplicationVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15746,7 +15738,7 @@ async def _delete_initial( gallery_application_version_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15889,7 +15881,7 @@ def list_by_gallery_application( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.GalleryApplicationVersionList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15976,7 +15968,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.Disk, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16160,7 +16152,7 @@ def get_long_running_output(pipeline_response): async def _update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.DiskUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16355,7 +16347,7 @@ async def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.compute.v2019_03_01.models.Disk :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16398,7 +16390,7 @@ async def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> return deserialized # type: ignore async def _delete_initial(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16515,7 +16507,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16590,7 +16582,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Disk"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16657,7 +16649,7 @@ async def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16852,7 +16844,7 @@ def get_long_running_output(pipeline_response): async def _revoke_access_initial( self, resource_group_name: str, disk_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16981,7 +16973,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, snapshot_name: str, snapshot: Union[_models.Snapshot, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17172,7 +17164,7 @@ async def _update_initial( snapshot: Union[_models.SnapshotUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17376,7 +17368,7 @@ async def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) :rtype: ~azure.mgmt.compute.v2019_03_01.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17421,7 +17413,7 @@ async def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) async def _delete_initial( self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17539,7 +17531,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17615,7 +17607,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Snapshot"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17682,7 +17674,7 @@ async def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17877,7 +17869,7 @@ def get_long_running_output(pipeline_response): async def _revoke_access_initial( self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/__init__.py index dea3db39513ad..d517cd8f06022 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/__init__.py @@ -5,267 +5,278 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._models_py3 import AccessUri -from ._models_py3 import AdditionalCapabilities -from ._models_py3 import AdditionalUnattendContent -from ._models_py3 import ApiEntityReference -from ._models_py3 import ApiError -from ._models_py3 import ApiErrorBase -from ._models_py3 import AutomaticOSUpgradePolicy -from ._models_py3 import AutomaticOSUpgradeProperties -from ._models_py3 import AutomaticRepairsPolicy -from ._models_py3 import AvailabilitySet -from ._models_py3 import AvailabilitySetListResult -from ._models_py3 import AvailabilitySetUpdate -from ._models_py3 import BillingProfile -from ._models_py3 import BootDiagnostics -from ._models_py3 import BootDiagnosticsInstanceView -from ._models_py3 import ComputeOperationListResult -from ._models_py3 import ComputeOperationValue -from ._models_py3 import CreationData -from ._models_py3 import DataDisk -from ._models_py3 import DataDiskImage -from ._models_py3 import DedicatedHost -from ._models_py3 import DedicatedHostAllocatableVM -from ._models_py3 import DedicatedHostAvailableCapacity -from ._models_py3 import DedicatedHostGroup -from ._models_py3 import DedicatedHostGroupListResult -from ._models_py3 import DedicatedHostGroupUpdate -from ._models_py3 import DedicatedHostInstanceView -from ._models_py3 import DedicatedHostListResult -from ._models_py3 import DedicatedHostUpdate -from ._models_py3 import DiagnosticsProfile -from ._models_py3 import DiffDiskSettings -from ._models_py3 import Disallowed -from ._models_py3 import Disk -from ._models_py3 import DiskEncryptionSettings -from ._models_py3 import DiskInstanceView -from ._models_py3 import DiskList -from ._models_py3 import DiskSku -from ._models_py3 import DiskUpdate -from ._models_py3 import EncryptionSettingsCollection -from ._models_py3 import EncryptionSettingsElement -from ._models_py3 import Gallery -from ._models_py3 import GalleryApplication -from ._models_py3 import GalleryApplicationList -from ._models_py3 import GalleryApplicationVersion -from ._models_py3 import GalleryApplicationVersionList -from ._models_py3 import GalleryApplicationVersionPublishingProfile -from ._models_py3 import GalleryArtifactPublishingProfileBase -from ._models_py3 import GalleryArtifactSource -from ._models_py3 import GalleryDataDiskImage -from ._models_py3 import GalleryDiskImage -from ._models_py3 import GalleryIdentifier -from ._models_py3 import GalleryImage -from ._models_py3 import GalleryImageIdentifier -from ._models_py3 import GalleryImageList -from ._models_py3 import GalleryImageVersion -from ._models_py3 import GalleryImageVersionList -from ._models_py3 import GalleryImageVersionPublishingProfile -from ._models_py3 import GalleryImageVersionStorageProfile -from ._models_py3 import GalleryList -from ._models_py3 import GalleryOSDiskImage -from ._models_py3 import GrantAccessData -from ._models_py3 import HardwareProfile -from ._models_py3 import Image -from ._models_py3 import ImageDataDisk -from ._models_py3 import ImageDiskReference -from ._models_py3 import ImageListResult -from ._models_py3 import ImageOSDisk -from ._models_py3 import ImagePurchasePlan -from ._models_py3 import ImageReference -from ._models_py3 import ImageStorageProfile -from ._models_py3 import ImageUpdate -from ._models_py3 import InnerError -from ._models_py3 import InstanceViewStatus -from ._models_py3 import KeyVaultAndKeyReference -from ._models_py3 import KeyVaultAndSecretReference -from ._models_py3 import KeyVaultKeyReference -from ._models_py3 import KeyVaultSecretReference -from ._models_py3 import LinuxConfiguration -from ._models_py3 import ListUsagesResult -from ._models_py3 import LogAnalyticsInputBase -from ._models_py3 import LogAnalyticsOperationResult -from ._models_py3 import LogAnalyticsOutput -from ._models_py3 import MaintenanceRedeployStatus -from ._models_py3 import ManagedArtifact -from ._models_py3 import ManagedDiskParameters -from ._models_py3 import NetworkInterfaceReference -from ._models_py3 import NetworkProfile -from ._models_py3 import OSDisk -from ._models_py3 import OSDiskImage -from ._models_py3 import OSProfile -from ._models_py3 import Plan -from ._models_py3 import ProximityPlacementGroup -from ._models_py3 import ProximityPlacementGroupListResult -from ._models_py3 import ProximityPlacementGroupUpdate -from ._models_py3 import PurchasePlan -from ._models_py3 import RecommendedMachineConfiguration -from ._models_py3 import RecoveryWalkResponse -from ._models_py3 import RegionalReplicationStatus -from ._models_py3 import ReplicationStatus -from ._models_py3 import RequestRateByIntervalInput -from ._models_py3 import Resource -from ._models_py3 import ResourceRange -from ._models_py3 import RollbackStatusInfo -from ._models_py3 import RollingUpgradePolicy -from ._models_py3 import RollingUpgradeProgressInfo -from ._models_py3 import RollingUpgradeRunningStatus -from ._models_py3 import RollingUpgradeStatusInfo -from ._models_py3 import RunCommandDocument -from ._models_py3 import RunCommandDocumentBase -from ._models_py3 import RunCommandInput -from ._models_py3 import RunCommandInputParameter -from ._models_py3 import RunCommandListResult -from ._models_py3 import RunCommandParameterDefinition -from ._models_py3 import RunCommandResult -from ._models_py3 import ScaleInPolicy -from ._models_py3 import ScheduledEventsProfile -from ._models_py3 import Sku -from ._models_py3 import Snapshot -from ._models_py3 import SnapshotList -from ._models_py3 import SnapshotSku -from ._models_py3 import SnapshotUpdate -from ._models_py3 import SourceVault -from ._models_py3 import SshConfiguration -from ._models_py3 import SshPublicKey -from ._models_py3 import StorageProfile -from ._models_py3 import SubResource -from ._models_py3 import SubResourceReadOnly -from ._models_py3 import TargetRegion -from ._models_py3 import TerminateNotificationProfile -from ._models_py3 import ThrottledRequestsInput -from ._models_py3 import UpdateResource -from ._models_py3 import UpgradeOperationHistoricalStatusInfo -from ._models_py3 import UpgradeOperationHistoricalStatusInfoProperties -from ._models_py3 import UpgradeOperationHistoryStatus -from ._models_py3 import UpgradePolicy -from ._models_py3 import Usage -from ._models_py3 import UsageName -from ._models_py3 import UserArtifactManage -from ._models_py3 import UserArtifactSource -from ._models_py3 import UserAssignedIdentitiesValue -from ._models_py3 import VMScaleSetConvertToSinglePlacementGroupInput -from ._models_py3 import VaultCertificate -from ._models_py3 import VaultSecretGroup -from ._models_py3 import VirtualHardDisk -from ._models_py3 import VirtualMachine -from ._models_py3 import VirtualMachineAgentInstanceView -from ._models_py3 import VirtualMachineCaptureParameters -from ._models_py3 import VirtualMachineCaptureResult -from ._models_py3 import VirtualMachineExtension -from ._models_py3 import VirtualMachineExtensionHandlerInstanceView -from ._models_py3 import VirtualMachineExtensionImage -from ._models_py3 import VirtualMachineExtensionInstanceView -from ._models_py3 import VirtualMachineExtensionUpdate -from ._models_py3 import VirtualMachineExtensionsListResult -from ._models_py3 import VirtualMachineHealthStatus -from ._models_py3 import VirtualMachineIdentity -from ._models_py3 import VirtualMachineImage -from ._models_py3 import VirtualMachineImageResource -from ._models_py3 import VirtualMachineInstanceView -from ._models_py3 import VirtualMachineListResult -from ._models_py3 import VirtualMachineReimageParameters -from ._models_py3 import VirtualMachineScaleSet -from ._models_py3 import VirtualMachineScaleSetDataDisk -from ._models_py3 import VirtualMachineScaleSetExtension -from ._models_py3 import VirtualMachineScaleSetExtensionListResult -from ._models_py3 import VirtualMachineScaleSetExtensionProfile -from ._models_py3 import VirtualMachineScaleSetIPConfiguration -from ._models_py3 import VirtualMachineScaleSetIdentity -from ._models_py3 import VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue -from ._models_py3 import VirtualMachineScaleSetInstanceView -from ._models_py3 import VirtualMachineScaleSetInstanceViewStatusesSummary -from ._models_py3 import VirtualMachineScaleSetIpTag -from ._models_py3 import VirtualMachineScaleSetListOSUpgradeHistory -from ._models_py3 import VirtualMachineScaleSetListResult -from ._models_py3 import VirtualMachineScaleSetListSkusResult -from ._models_py3 import VirtualMachineScaleSetListWithLinkResult -from ._models_py3 import VirtualMachineScaleSetManagedDiskParameters -from ._models_py3 import VirtualMachineScaleSetNetworkConfiguration -from ._models_py3 import VirtualMachineScaleSetNetworkConfigurationDnsSettings -from ._models_py3 import VirtualMachineScaleSetNetworkProfile -from ._models_py3 import VirtualMachineScaleSetOSDisk -from ._models_py3 import VirtualMachineScaleSetOSProfile -from ._models_py3 import VirtualMachineScaleSetPublicIPAddressConfiguration -from ._models_py3 import VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings -from ._models_py3 import VirtualMachineScaleSetReimageParameters -from ._models_py3 import VirtualMachineScaleSetSku -from ._models_py3 import VirtualMachineScaleSetSkuCapacity -from ._models_py3 import VirtualMachineScaleSetStorageProfile -from ._models_py3 import VirtualMachineScaleSetUpdate -from ._models_py3 import VirtualMachineScaleSetUpdateIPConfiguration -from ._models_py3 import VirtualMachineScaleSetUpdateNetworkConfiguration -from ._models_py3 import VirtualMachineScaleSetUpdateNetworkProfile -from ._models_py3 import VirtualMachineScaleSetUpdateOSDisk -from ._models_py3 import VirtualMachineScaleSetUpdateOSProfile -from ._models_py3 import VirtualMachineScaleSetUpdatePublicIPAddressConfiguration -from ._models_py3 import VirtualMachineScaleSetUpdateStorageProfile -from ._models_py3 import VirtualMachineScaleSetUpdateVMProfile -from ._models_py3 import VirtualMachineScaleSetVM -from ._models_py3 import VirtualMachineScaleSetVMExtensionsSummary -from ._models_py3 import VirtualMachineScaleSetVMInstanceIDs -from ._models_py3 import VirtualMachineScaleSetVMInstanceRequiredIDs -from ._models_py3 import VirtualMachineScaleSetVMInstanceView -from ._models_py3 import VirtualMachineScaleSetVMListResult -from ._models_py3 import VirtualMachineScaleSetVMNetworkProfileConfiguration -from ._models_py3 import VirtualMachineScaleSetVMProfile -from ._models_py3 import VirtualMachineScaleSetVMProtectionPolicy -from ._models_py3 import VirtualMachineScaleSetVMReimageParameters -from ._models_py3 import VirtualMachineSize -from ._models_py3 import VirtualMachineSizeListResult -from ._models_py3 import VirtualMachineStatusCodeCount -from ._models_py3 import VirtualMachineUpdate -from ._models_py3 import WinRMConfiguration -from ._models_py3 import WinRMListener -from ._models_py3 import WindowsConfiguration +from typing import TYPE_CHECKING -from ._compute_management_client_enums import AccessLevel -from ._compute_management_client_enums import AggregatedReplicationState -from ._compute_management_client_enums import AvailabilitySetSkuTypes -from ._compute_management_client_enums import CachingTypes -from ._compute_management_client_enums import DedicatedHostLicenseTypes -from ._compute_management_client_enums import DiffDiskOptions -from ._compute_management_client_enums import DiskCreateOption -from ._compute_management_client_enums import DiskCreateOptionTypes -from ._compute_management_client_enums import DiskState -from ._compute_management_client_enums import DiskStorageAccountTypes -from ._compute_management_client_enums import GalleryApplicationVersionPropertiesProvisioningState -from ._compute_management_client_enums import GalleryImagePropertiesProvisioningState -from ._compute_management_client_enums import GalleryImageVersionPropertiesProvisioningState -from ._compute_management_client_enums import GalleryPropertiesProvisioningState -from ._compute_management_client_enums import HostCaching -from ._compute_management_client_enums import HyperVGeneration -from ._compute_management_client_enums import HyperVGenerationType -from ._compute_management_client_enums import HyperVGenerationTypes -from ._compute_management_client_enums import IPVersion -from ._compute_management_client_enums import IntervalInMins -from ._compute_management_client_enums import MaintenanceOperationResultCodeTypes -from ._compute_management_client_enums import OperatingSystemStateTypes -from ._compute_management_client_enums import OperatingSystemTypes -from ._compute_management_client_enums import ProtocolTypes -from ._compute_management_client_enums import ProximityPlacementGroupType -from ._compute_management_client_enums import ReplicationState -from ._compute_management_client_enums import ReplicationStatusTypes -from ._compute_management_client_enums import ResourceIdentityType -from ._compute_management_client_enums import RollingUpgradeActionType -from ._compute_management_client_enums import RollingUpgradeStatusCode -from ._compute_management_client_enums import SettingNames -from ._compute_management_client_enums import SnapshotStorageAccountTypes -from ._compute_management_client_enums import StatusLevelTypes -from ._compute_management_client_enums import StorageAccountType -from ._compute_management_client_enums import StorageAccountTypes -from ._compute_management_client_enums import UpgradeMode -from ._compute_management_client_enums import UpgradeOperationInvoker -from ._compute_management_client_enums import UpgradeState -from ._compute_management_client_enums import VirtualMachineEvictionPolicyTypes -from ._compute_management_client_enums import VirtualMachinePriorityTypes -from ._compute_management_client_enums import VirtualMachineScaleSetScaleInRules -from ._compute_management_client_enums import VirtualMachineScaleSetSkuScaleType -from ._compute_management_client_enums import VirtualMachineSizeTypes +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + + +from ._models_py3 import ( # type: ignore + AccessUri, + AdditionalCapabilities, + AdditionalUnattendContent, + ApiEntityReference, + ApiError, + ApiErrorBase, + AutomaticOSUpgradePolicy, + AutomaticOSUpgradeProperties, + AutomaticRepairsPolicy, + AvailabilitySet, + AvailabilitySetListResult, + AvailabilitySetUpdate, + BillingProfile, + BootDiagnostics, + BootDiagnosticsInstanceView, + ComputeOperationListResult, + ComputeOperationValue, + CreationData, + DataDisk, + DataDiskImage, + DedicatedHost, + DedicatedHostAllocatableVM, + DedicatedHostAvailableCapacity, + DedicatedHostGroup, + DedicatedHostGroupListResult, + DedicatedHostGroupUpdate, + DedicatedHostInstanceView, + DedicatedHostListResult, + DedicatedHostUpdate, + DiagnosticsProfile, + DiffDiskSettings, + Disallowed, + Disk, + DiskEncryptionSettings, + DiskInstanceView, + DiskList, + DiskSku, + DiskUpdate, + EncryptionSettingsCollection, + EncryptionSettingsElement, + Gallery, + GalleryApplication, + GalleryApplicationList, + GalleryApplicationVersion, + GalleryApplicationVersionList, + GalleryApplicationVersionPublishingProfile, + GalleryArtifactPublishingProfileBase, + GalleryArtifactSource, + GalleryDataDiskImage, + GalleryDiskImage, + GalleryIdentifier, + GalleryImage, + GalleryImageIdentifier, + GalleryImageList, + GalleryImageVersion, + GalleryImageVersionList, + GalleryImageVersionPublishingProfile, + GalleryImageVersionStorageProfile, + GalleryList, + GalleryOSDiskImage, + GrantAccessData, + HardwareProfile, + Image, + ImageDataDisk, + ImageDiskReference, + ImageListResult, + ImageOSDisk, + ImagePurchasePlan, + ImageReference, + ImageStorageProfile, + ImageUpdate, + InnerError, + InstanceViewStatus, + KeyVaultAndKeyReference, + KeyVaultAndSecretReference, + KeyVaultKeyReference, + KeyVaultSecretReference, + LinuxConfiguration, + ListUsagesResult, + LogAnalyticsInputBase, + LogAnalyticsOperationResult, + LogAnalyticsOutput, + MaintenanceRedeployStatus, + ManagedArtifact, + ManagedDiskParameters, + NetworkInterfaceReference, + NetworkProfile, + OSDisk, + OSDiskImage, + OSProfile, + Plan, + ProximityPlacementGroup, + ProximityPlacementGroupListResult, + ProximityPlacementGroupUpdate, + PurchasePlan, + RecommendedMachineConfiguration, + RecoveryWalkResponse, + RegionalReplicationStatus, + ReplicationStatus, + RequestRateByIntervalInput, + Resource, + ResourceRange, + RollbackStatusInfo, + RollingUpgradePolicy, + RollingUpgradeProgressInfo, + RollingUpgradeRunningStatus, + RollingUpgradeStatusInfo, + RunCommandDocument, + RunCommandDocumentBase, + RunCommandInput, + RunCommandInputParameter, + RunCommandListResult, + RunCommandParameterDefinition, + RunCommandResult, + ScaleInPolicy, + ScheduledEventsProfile, + Sku, + Snapshot, + SnapshotList, + SnapshotSku, + SnapshotUpdate, + SourceVault, + SshConfiguration, + SshPublicKey, + StorageProfile, + SubResource, + SubResourceReadOnly, + TargetRegion, + TerminateNotificationProfile, + ThrottledRequestsInput, + UpdateResource, + UpgradeOperationHistoricalStatusInfo, + UpgradeOperationHistoricalStatusInfoProperties, + UpgradeOperationHistoryStatus, + UpgradePolicy, + Usage, + UsageName, + UserArtifactManage, + UserArtifactSource, + UserAssignedIdentitiesValue, + VMScaleSetConvertToSinglePlacementGroupInput, + VaultCertificate, + VaultSecretGroup, + VirtualHardDisk, + VirtualMachine, + VirtualMachineAgentInstanceView, + VirtualMachineCaptureParameters, + VirtualMachineCaptureResult, + VirtualMachineExtension, + VirtualMachineExtensionHandlerInstanceView, + VirtualMachineExtensionImage, + VirtualMachineExtensionInstanceView, + VirtualMachineExtensionUpdate, + VirtualMachineExtensionsListResult, + VirtualMachineHealthStatus, + VirtualMachineIdentity, + VirtualMachineImage, + VirtualMachineImageResource, + VirtualMachineInstanceView, + VirtualMachineListResult, + VirtualMachineReimageParameters, + VirtualMachineScaleSet, + VirtualMachineScaleSetDataDisk, + VirtualMachineScaleSetExtension, + VirtualMachineScaleSetExtensionListResult, + VirtualMachineScaleSetExtensionProfile, + VirtualMachineScaleSetIPConfiguration, + VirtualMachineScaleSetIdentity, + VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue, + VirtualMachineScaleSetInstanceView, + VirtualMachineScaleSetInstanceViewStatusesSummary, + VirtualMachineScaleSetIpTag, + VirtualMachineScaleSetListOSUpgradeHistory, + VirtualMachineScaleSetListResult, + VirtualMachineScaleSetListSkusResult, + VirtualMachineScaleSetListWithLinkResult, + VirtualMachineScaleSetManagedDiskParameters, + VirtualMachineScaleSetNetworkConfiguration, + VirtualMachineScaleSetNetworkConfigurationDnsSettings, + VirtualMachineScaleSetNetworkProfile, + VirtualMachineScaleSetOSDisk, + VirtualMachineScaleSetOSProfile, + VirtualMachineScaleSetPublicIPAddressConfiguration, + VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings, + VirtualMachineScaleSetReimageParameters, + VirtualMachineScaleSetSku, + VirtualMachineScaleSetSkuCapacity, + VirtualMachineScaleSetStorageProfile, + VirtualMachineScaleSetUpdate, + VirtualMachineScaleSetUpdateIPConfiguration, + VirtualMachineScaleSetUpdateNetworkConfiguration, + VirtualMachineScaleSetUpdateNetworkProfile, + VirtualMachineScaleSetUpdateOSDisk, + VirtualMachineScaleSetUpdateOSProfile, + VirtualMachineScaleSetUpdatePublicIPAddressConfiguration, + VirtualMachineScaleSetUpdateStorageProfile, + VirtualMachineScaleSetUpdateVMProfile, + VirtualMachineScaleSetVM, + VirtualMachineScaleSetVMExtensionsSummary, + VirtualMachineScaleSetVMInstanceIDs, + VirtualMachineScaleSetVMInstanceRequiredIDs, + VirtualMachineScaleSetVMInstanceView, + VirtualMachineScaleSetVMListResult, + VirtualMachineScaleSetVMNetworkProfileConfiguration, + VirtualMachineScaleSetVMProfile, + VirtualMachineScaleSetVMProtectionPolicy, + VirtualMachineScaleSetVMReimageParameters, + VirtualMachineSize, + VirtualMachineSizeListResult, + VirtualMachineStatusCodeCount, + VirtualMachineUpdate, + WinRMConfiguration, + WinRMListener, + WindowsConfiguration, +) + +from ._compute_management_client_enums import ( # type: ignore + AccessLevel, + AggregatedReplicationState, + AvailabilitySetSkuTypes, + CachingTypes, + DedicatedHostLicenseTypes, + DiffDiskOptions, + DiskCreateOption, + DiskCreateOptionTypes, + DiskState, + DiskStorageAccountTypes, + GalleryApplicationVersionPropertiesProvisioningState, + GalleryImagePropertiesProvisioningState, + GalleryImageVersionPropertiesProvisioningState, + GalleryPropertiesProvisioningState, + HostCaching, + HyperVGeneration, + HyperVGenerationType, + HyperVGenerationTypes, + IPVersion, + IntervalInMins, + MaintenanceOperationResultCodeTypes, + OperatingSystemStateTypes, + OperatingSystemTypes, + ProtocolTypes, + ProximityPlacementGroupType, + ReplicationState, + ReplicationStatusTypes, + ResourceIdentityType, + RollingUpgradeActionType, + RollingUpgradeStatusCode, + SettingNames, + SnapshotStorageAccountTypes, + StatusLevelTypes, + StorageAccountType, + StorageAccountTypes, + UpgradeMode, + UpgradeOperationInvoker, + UpgradeState, + VirtualMachineEvictionPolicyTypes, + VirtualMachinePriorityTypes, + VirtualMachineScaleSetScaleInRules, + VirtualMachineScaleSetSkuScaleType, + VirtualMachineSizeTypes, +) 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__ = [ @@ -527,5 +538,5 @@ "VirtualMachineScaleSetSkuScaleType", "VirtualMachineSizeTypes", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/_models_py3.py index 6936cebd14523..a4f11a3a99927 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/_models_py3.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/_models_py3.py @@ -1,5 +1,5 @@ -# 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. @@ -16,10 +16,9 @@ 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 if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object @@ -399,7 +398,7 @@ def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kw self.tags = tags -class AvailabilitySet(Resource): # pylint: disable=too-many-instance-attributes +class AvailabilitySet(Resource): """Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see `Manage the @@ -1064,7 +1063,7 @@ def __init__(self, **kwargs: Any) -> None: self.lun = None -class DedicatedHost(Resource): # pylint: disable=too-many-instance-attributes +class DedicatedHost(Resource): """Specifies information about the Dedicated host. Variables are only populated by the server, and will be ignored when sending a request. @@ -1643,7 +1642,7 @@ def __init__(self, *, disk_types: Optional[List[str]] = None, **kwargs: Any) -> self.disk_types = disk_types -class Disk(Resource): # pylint: disable=too-many-instance-attributes +class Disk(Resource): """Disk resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -2215,7 +2214,7 @@ def __init__( self.provisioning_state = None -class GalleryApplication(Resource): # pylint: disable=too-many-instance-attributes +class GalleryApplication(Resource): """Specifies information about the gallery Application Definition that you want to create or update. @@ -2757,7 +2756,7 @@ def __init__(self, **kwargs: Any) -> None: self.unique_name = None -class GalleryImage(Resource): # pylint: disable=too-many-instance-attributes +class GalleryImage(Resource): """Specifies information about the gallery Image Definition that you want to create or update. Variables are only populated by the server, and will be ignored when sending a request. @@ -4603,7 +4602,7 @@ def __init__( self.network_interfaces = network_interfaces -class OSDisk(_serialization.Model): # pylint: disable=too-many-instance-attributes +class OSDisk(_serialization.Model): """Specifies information about the operating system disk used by the virtual machine. :code:`
`:code:`
` For more information about disks, see `About disks and VHDs for Azure virtual machines @@ -6105,7 +6104,7 @@ def __init__( self.capacity = capacity -class Snapshot(Resource): # pylint: disable=too-many-instance-attributes +class Snapshot(Resource): """Snapshot resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -7109,7 +7108,7 @@ def __init__(self, *, uri: Optional[str] = None, **kwargs: Any) -> None: self.uri = uri -class VirtualMachine(Resource): # pylint: disable=too-many-instance-attributes +class VirtualMachine(Resource): """Describes a Virtual Machine. Variables are only populated by the server, and will be ignored when sending a request. @@ -7504,7 +7503,7 @@ def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylin self.resources = None -class VirtualMachineExtension(Resource): # pylint: disable=too-many-instance-attributes +class VirtualMachineExtension(Resource): """Describes a Virtual Machine Extension. Variables are only populated by the server, and will be ignored when sending a request. @@ -8150,7 +8149,7 @@ def __init__( self.hyper_v_generation = hyper_v_generation -class VirtualMachineInstanceView(_serialization.Model): # pylint: disable=too-many-instance-attributes +class VirtualMachineInstanceView(_serialization.Model): """The instance view of a virtual machine. :ivar platform_update_domain: Specifies the update domain of the virtual machine. @@ -8331,7 +8330,7 @@ def __init__(self, *, temp_disk: Optional[bool] = None, **kwargs: Any) -> None: self.temp_disk = temp_disk -class VirtualMachineScaleSet(Resource): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSet(Resource): """Describes a Virtual Machine Scale Set. Variables are only populated by the server, and will be ignored when sending a request. @@ -8632,7 +8631,7 @@ def __init__( self.managed_disk = managed_disk -class VirtualMachineScaleSetExtension(SubResourceReadOnly): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetExtension(SubResourceReadOnly): """Describes a Virtual Machine Scale Set Extension. Variables are only populated by the server, and will be ignored when sending a request. @@ -9987,7 +9986,7 @@ def __init__( self.data_disks = data_disks -class VirtualMachineScaleSetUpdate(UpdateResource): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetUpdate(UpdateResource): """Describes a Virtual Machine Scale Set. :ivar tags: Resource tags. @@ -10663,7 +10662,7 @@ def __init__( self.scheduled_events_profile = scheduled_events_profile -class VirtualMachineScaleSetVM(Resource): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetVM(Resource): """Describes a virtual machine scale set virtual machine. Variables are only populated by the server, and will be ignored when sending a request. @@ -10973,7 +10972,7 @@ def __init__(self, *, instance_ids: List[str], **kwargs: Any) -> None: self.instance_ids = instance_ids -class VirtualMachineScaleSetVMInstanceView(_serialization.Model): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetVMInstanceView(_serialization.Model): """The instance view of a virtual machine scale set VM. Variables are only populated by the server, and will be ignored when sending a request. @@ -11429,7 +11428,7 @@ def __init__(self, **kwargs: Any) -> None: self.count = None -class VirtualMachineUpdate(UpdateResource): # pylint: disable=too-many-instance-attributes +class VirtualMachineUpdate(UpdateResource): """Describes a Virtual Machine Update. Variables are only populated by the server, and will be ignored when sending a request. diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/__init__.py index c7b787eba98d3..8bf884273b9b1 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/__init__.py @@ -5,35 +5,41 @@ # Code generated by Microsoft (R) AutoRest 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 AvailabilitySetsOperations -from ._operations import ProximityPlacementGroupsOperations -from ._operations import DedicatedHostGroupsOperations -from ._operations import DedicatedHostsOperations -from ._operations import VirtualMachineExtensionImagesOperations -from ._operations import VirtualMachineExtensionsOperations -from ._operations import VirtualMachineImagesOperations -from ._operations import UsageOperations -from ._operations import VirtualMachinesOperations -from ._operations import VirtualMachineSizesOperations -from ._operations import ImagesOperations -from ._operations import VirtualMachineScaleSetsOperations -from ._operations import VirtualMachineScaleSetExtensionsOperations -from ._operations import VirtualMachineScaleSetRollingUpgradesOperations -from ._operations import VirtualMachineScaleSetVMsOperations -from ._operations import LogAnalyticsOperations -from ._operations import VirtualMachineRunCommandsOperations -from ._operations import GalleriesOperations -from ._operations import GalleryImagesOperations -from ._operations import GalleryImageVersionsOperations -from ._operations import GalleryApplicationsOperations -from ._operations import GalleryApplicationVersionsOperations -from ._operations import DisksOperations -from ._operations import SnapshotsOperations +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 AvailabilitySetsOperations # type: ignore +from ._operations import ProximityPlacementGroupsOperations # type: ignore +from ._operations import DedicatedHostGroupsOperations # type: ignore +from ._operations import DedicatedHostsOperations # type: ignore +from ._operations import VirtualMachineExtensionImagesOperations # type: ignore +from ._operations import VirtualMachineExtensionsOperations # type: ignore +from ._operations import VirtualMachineImagesOperations # type: ignore +from ._operations import UsageOperations # type: ignore +from ._operations import VirtualMachinesOperations # type: ignore +from ._operations import VirtualMachineSizesOperations # type: ignore +from ._operations import ImagesOperations # type: ignore +from ._operations import VirtualMachineScaleSetsOperations # type: ignore +from ._operations import VirtualMachineScaleSetExtensionsOperations # type: ignore +from ._operations import VirtualMachineScaleSetRollingUpgradesOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMsOperations # type: ignore +from ._operations import LogAnalyticsOperations # type: ignore +from ._operations import VirtualMachineRunCommandsOperations # type: ignore +from ._operations import GalleriesOperations # type: ignore +from ._operations import GalleryImagesOperations # type: ignore +from ._operations import GalleryImageVersionsOperations # type: ignore +from ._operations import GalleryApplicationsOperations # type: ignore +from ._operations import GalleryApplicationVersionsOperations # type: ignore +from ._operations import DisksOperations # type: ignore +from ._operations import SnapshotsOperations # 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__ = [ @@ -63,5 +69,5 @@ "DisksOperations", "SnapshotsOperations", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/_operations.py index c84ac45d493af..264c329626ce0 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/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. @@ -8,22 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import ( - Any, - Callable, - Dict, - IO, - Iterable, - Iterator, - List, - Literal, - Optional, - Type, - TypeVar, - Union, - cast, - overload, -) +from typing import Any, Callable, Dict, IO, Iterable, Iterator, List, Literal, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -51,7 +36,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, HttpResponse], T, Dict[str, Any]], Any]] @@ -4781,7 +4766,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.ComputeOperationValue"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.ComputeOperationListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4934,7 +4919,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2019_03_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5061,7 +5046,7 @@ def update( :rtype: ~azure.mgmt.compute.v2019_03_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5129,7 +5114,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5179,7 +5164,7 @@ def get(self, resource_group_name: str, availability_set_name: str, **kwargs: An :rtype: ~azure.mgmt.compute.v2019_03_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5240,7 +5225,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5317,7 +5302,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Ava api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5399,7 +5384,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5557,7 +5542,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2019_03_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5687,7 +5672,7 @@ def update( :rtype: ~azure.mgmt.compute.v2019_03_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5755,7 +5740,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5807,7 +5792,7 @@ def get( :rtype: ~azure.mgmt.compute.v2019_03_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5865,7 +5850,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.ProximityPlac api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5945,7 +5930,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6106,7 +6091,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2019_03_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6233,7 +6218,7 @@ def update( :rtype: ~azure.mgmt.compute.v2019_03_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6301,7 +6286,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6351,7 +6336,7 @@ def get(self, resource_group_name: str, host_group_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.compute.v2019_03_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6410,7 +6395,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6486,7 +6471,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.DedicatedHost api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6575,7 +6560,7 @@ def _create_or_update_initial( parameters: Union[_models.DedicatedHost, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6776,7 +6761,7 @@ def _update_initial( parameters: Union[_models.DedicatedHostUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6972,7 +6957,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7102,7 +7087,7 @@ def get( :rtype: ~azure.mgmt.compute.v2019_03_01.models.DedicatedHost :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7167,7 +7152,7 @@ def list_by_host_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.DedicatedHostListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7268,7 +7253,7 @@ def get( :rtype: ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineExtensionImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7326,7 +7311,7 @@ def list_types( :rtype: list[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7398,7 +7383,7 @@ def list_versions( :rtype: list[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7473,7 +7458,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineExtension, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7683,7 +7668,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineExtensionUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7889,7 +7874,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_name: str, vm_extension_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8019,7 +8004,7 @@ def get( :rtype: ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8079,7 +8064,7 @@ def list( :rtype: ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8163,7 +8148,7 @@ def get( :rtype: ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8242,7 +8227,7 @@ def list( :rtype: list[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8303,7 +8288,7 @@ def list_offers( :rtype: list[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8355,7 +8340,7 @@ def list_publishers(self, location: str, **kwargs: Any) -> List[_models.VirtualM :rtype: list[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8412,7 +8397,7 @@ def list_skus( :rtype: list[~azure.mgmt.compute.v2019_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8493,7 +8478,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.Usage"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.ListUsagesResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8592,7 +8577,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> Iterable["_models.Vi api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8660,7 +8645,7 @@ def _capture_initial( parameters: Union[_models.VirtualMachineCaptureParameters, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8858,7 +8843,7 @@ def _create_or_update_initial( parameters: Union[_models.VirtualMachine, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9047,7 +9032,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9230,7 +9215,7 @@ def get_long_running_output(pipeline_response): ) def _delete_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9346,7 +9331,7 @@ def get( :rtype: ~azure.mgmt.compute.v2019_03_01.models.VirtualMachine :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9403,7 +9388,7 @@ def instance_view( :rtype: ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9448,7 +9433,7 @@ def instance_view( def _convert_to_managed_disks_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9549,7 +9534,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _deallocate_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9663,7 +9648,7 @@ def generalize( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9718,7 +9703,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Vir api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9794,7 +9779,7 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.VirtualMachine"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9875,7 +9860,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9940,7 +9925,7 @@ def get_next(next_link=None): def _power_off_initial( self, resource_group_name: str, vm_name: str, *, skip_shutdown: bool = False, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10049,7 +10034,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _restart_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10149,7 +10134,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _start_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10249,7 +10234,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _redeploy_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10355,7 +10340,7 @@ def _reimage_initial( parameters: Optional[Union[_models.VirtualMachineReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10537,7 +10522,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _perform_maintenance_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10643,7 +10628,7 @@ def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10865,7 +10850,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.VirtualMachine api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10950,7 +10935,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, image_name: str, parameters: Union[_models.Image, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11132,7 +11117,7 @@ def _update_initial( parameters: Union[_models.ImageUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11312,7 +11297,7 @@ def get_long_running_output(pipeline_response): ) def _delete_initial(self, resource_group_name: str, image_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11427,7 +11412,7 @@ def get( :rtype: ~azure.mgmt.compute.v2019_03_01.models.Image :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11486,7 +11471,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11562,7 +11547,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Image"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11650,7 +11635,7 @@ def _create_or_update_initial( parameters: Union[_models.VirtualMachineScaleSet, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11842,7 +11827,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineScaleSetUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12029,7 +12014,7 @@ def get_long_running_output(pipeline_response): ) def _delete_initial(self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12140,7 +12125,7 @@ def get(self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) - :rtype: ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12189,7 +12174,7 @@ def _deallocate_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12384,7 +12369,7 @@ def _delete_instances_initial( vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12577,7 +12562,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12637,7 +12622,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Vir api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12716,7 +12701,7 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.VirtualMachineScaleSet"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.VirtualMachineScaleSetListWithLinkResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12799,7 +12784,7 @@ def list_skus( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.VirtualMachineScaleSetListSkusResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12883,7 +12868,7 @@ def get_os_upgrade_history( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.VirtualMachineScaleSetListOSUpgradeHistory] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12954,7 +12939,7 @@ def _power_off_initial( skip_shutdown: bool = False, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13167,7 +13152,7 @@ def _restart_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13356,7 +13341,7 @@ def _start_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13545,7 +13530,7 @@ def _redeploy_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13737,7 +13722,7 @@ def _perform_maintenance_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13935,7 +13920,7 @@ def _update_instances_initial( vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14121,7 +14106,7 @@ def _reimage_initial( vm_scale_set_reimage_input: Optional[Union[_models.VirtualMachineScaleSetReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14314,7 +14299,7 @@ def _reimage_all_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14517,7 +14502,7 @@ def force_recovery_service_fabric_platform_update_domain_walk( # pylint: disabl :rtype: ~azure.mgmt.compute.v2019_03_01.models.RecoveryWalkResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14561,7 +14546,7 @@ def force_recovery_service_fabric_platform_update_domain_walk( # pylint: disabl return deserialized # type: ignore @overload - def convert_to_single_placement_group( # pylint: disable=inconsistent-return-statements + def convert_to_single_placement_group( self, resource_group_name: str, vm_scale_set_name: str, @@ -14589,7 +14574,7 @@ def convert_to_single_placement_group( # pylint: disable=inconsistent-return-st """ @overload - def convert_to_single_placement_group( # pylint: disable=inconsistent-return-statements + def convert_to_single_placement_group( self, resource_group_name: str, vm_scale_set_name: str, @@ -14639,7 +14624,7 @@ def convert_to_single_placement_group( # pylint: disable=inconsistent-return-st :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14718,7 +14703,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtension, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14924,7 +14909,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, vmss_extension_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15054,7 +15039,7 @@ def get( :rtype: ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15120,7 +15105,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.VirtualMachineScaleSetExtensionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15204,7 +15189,7 @@ def __init__(self, *args, **kwargs): self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") def _cancel_initial(self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15306,7 +15291,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_os_upgrade_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15412,7 +15397,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_extension_upgrade_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15529,7 +15514,7 @@ def get_latest( :rtype: ~azure.mgmt.compute.v2019_03_01.models.RollingUpgradeStatusInfo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15602,7 +15587,7 @@ def _reimage_initial( ] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15801,7 +15786,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _reimage_all_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15910,7 +15895,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _deallocate_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16025,7 +16010,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineScaleSetVM, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16229,7 +16214,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16359,7 +16344,7 @@ def get( :rtype: ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetVM :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16419,7 +16404,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2019_03_01.models.VirtualMachineScaleSetVMInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16501,7 +16486,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.VirtualMachineScaleSetVMListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16575,7 +16560,7 @@ def _power_off_initial( skip_shutdown: bool = False, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16697,7 +16682,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _restart_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16805,7 +16790,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16913,7 +16898,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _redeploy_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17022,7 +17007,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _perform_maintenance_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17135,7 +17120,7 @@ def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17354,7 +17339,7 @@ def __init__(self, *args, **kwargs): def _export_request_rate_by_interval_initial( self, location: str, parameters: Union[_models.RequestRateByIntervalInput, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17531,7 +17516,7 @@ def get_long_running_output(pipeline_response): def _export_throttled_requests_initial( self, location: str, parameters: Union[_models.ThrottledRequestsInput, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17741,7 +17726,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.RunCommandDocu api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.RunCommandListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17814,7 +17799,7 @@ def get(self, location: str, command_id: str, **kwargs: Any) -> _models.RunComma :rtype: ~azure.mgmt.compute.v2019_03_01.models.RunCommandDocument :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17880,7 +17865,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, gallery_name: str, gallery: Union[_models.Gallery, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18075,7 +18060,7 @@ def get(self, resource_group_name: str, gallery_name: str, **kwargs: Any) -> _mo :rtype: ~azure.mgmt.compute.v2019_03_01.models.Gallery :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18118,7 +18103,7 @@ def get(self, resource_group_name: str, gallery_name: str, **kwargs: Any) -> _mo return deserialized # type: ignore def _delete_initial(self, resource_group_name: str, gallery_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18233,7 +18218,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.GalleryList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18308,7 +18293,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Gallery"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.GalleryList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18397,7 +18382,7 @@ def _create_or_update_initial( gallery_image: Union[_models.GalleryImage, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18618,7 +18603,7 @@ def get( :rtype: ~azure.mgmt.compute.v2019_03_01.models.GalleryImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18664,7 +18649,7 @@ def get( def _delete_initial( self, resource_group_name: str, gallery_name: str, gallery_image_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18791,7 +18776,7 @@ def list_by_gallery( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.GalleryImageList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18883,7 +18868,7 @@ def _create_or_update_initial( gallery_image_version: Union[_models.GalleryImageVersion, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19139,7 +19124,7 @@ def get( :rtype: ~azure.mgmt.compute.v2019_03_01.models.GalleryImageVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19192,7 +19177,7 @@ def _delete_initial( gallery_image_version_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19334,7 +19319,7 @@ def list_by_gallery_image( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.GalleryImageVersionList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19426,7 +19411,7 @@ def _create_or_update_initial( gallery_application: Union[_models.GalleryApplication, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19652,7 +19637,7 @@ def get( :rtype: ~azure.mgmt.compute.v2019_03_01.models.GalleryApplication :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19698,7 +19683,7 @@ def get( def _delete_initial( self, resource_group_name: str, gallery_name: str, gallery_application_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19826,7 +19811,7 @@ def list_by_gallery( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.GalleryApplicationList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19918,7 +19903,7 @@ def _create_or_update_initial( gallery_application_version: Union[_models.GalleryApplicationVersion, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20176,7 +20161,7 @@ def get( :rtype: ~azure.mgmt.compute.v2019_03_01.models.GalleryApplicationVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20229,7 +20214,7 @@ def _delete_initial( gallery_application_version_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20372,7 +20357,7 @@ def list_by_gallery_application( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.GalleryApplicationVersionList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20459,7 +20444,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.Disk, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20643,7 +20628,7 @@ def get_long_running_output(pipeline_response): def _update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.DiskUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20838,7 +20823,7 @@ def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> _model :rtype: ~azure.mgmt.compute.v2019_03_01.models.Disk :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20881,7 +20866,7 @@ def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> _model return deserialized # type: ignore def _delete_initial(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20998,7 +20983,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21073,7 +21058,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Disk"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21140,7 +21125,7 @@ def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21330,7 +21315,7 @@ def get_long_running_output(pipeline_response): ) def _revoke_access_initial(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21457,7 +21442,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, snapshot_name: str, snapshot: Union[_models.Snapshot, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21645,7 +21630,7 @@ def _update_initial( snapshot: Union[_models.SnapshotUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21846,7 +21831,7 @@ def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> _m :rtype: ~azure.mgmt.compute.v2019_03_01.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21889,7 +21874,7 @@ def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> _m return deserialized # type: ignore def _delete_initial(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22006,7 +21991,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22081,7 +22066,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Snapshot"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-03-01")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22148,7 +22133,7 @@ def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22338,7 +22323,7 @@ def get_long_running_output(pipeline_response): ) def _revoke_access_initial(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/__init__.py index 3b1b6244b2375..ab7c46e8991db 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/__init__.py @@ -5,15 +5,21 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._compute_management_client import ComputeManagementClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._compute_management_client import ComputeManagementClient # 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__ = [ "ComputeManagementClient", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/_compute_management_client.py index 3d76eab66fdfb..d4ca74ee6d8ee 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/_compute_management_client.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/_compute_management_client.py @@ -21,11 +21,10 @@ from .operations import ResourceSkusOperations if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class ComputeManagementClient: # pylint: disable=client-accepts-api-version-keyword +class ComputeManagementClient: """Compute Client. :ivar resource_skus: ResourceSkusOperations operations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/_configuration.py index 0d4d2b2b11128..e705886c15993 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/_configuration.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/_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 ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ComputeManagementClient. Note that all parameters used to create this instance are saved as instance diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/_version.py index d79b2760319c5..e5754a47ce68f 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "33.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/aio/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/aio/__init__.py index 0715f50185586..d3fd1ba93379a 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/aio/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/aio/__init__.py @@ -5,12 +5,18 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._compute_management_client import ComputeManagementClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._compute_management_client import ComputeManagementClient # 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__ = [ "ComputeManagementClient", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/aio/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/aio/_compute_management_client.py index 4aa027a27e954..1b38605de5e98 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/aio/_compute_management_client.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/aio/_compute_management_client.py @@ -21,11 +21,10 @@ from .operations import ResourceSkusOperations if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class ComputeManagementClient: # pylint: disable=client-accepts-api-version-keyword +class ComputeManagementClient: """Compute Client. :ivar resource_skus: ResourceSkusOperations operations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/aio/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/aio/_configuration.py index 97b9385ea917c..98926aa32b5f4 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/aio/_configuration.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/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 ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ComputeManagementClient. Note that all parameters used to create this instance are saved as instance diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/aio/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/aio/operations/__init__.py index eb88a2c4a8601..a17cbc8abb0eb 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/aio/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/aio/operations/__init__.py @@ -5,15 +5,21 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._operations import ResourceSkusOperations +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._operations import ResourceSkusOperations # 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__ = [ "ResourceSkusOperations", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/aio/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/aio/operations/_operations.py index 9e443eabb9469..bd01f2163fa4d 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/aio/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/aio/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, AsyncIterable, Callable, Dict, Optional, Type, TypeVar +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -31,7 +30,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]] @@ -74,7 +73,7 @@ def list(self, *, filter: Optional[str] = None, **kwargs: Any) -> AsyncIterable[ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-04-01")) cls: ClsType[_models.ResourceSkusResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/__init__.py index 8555ccfb4b503..e91e0a1233835 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/__init__.py @@ -5,22 +5,33 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._models_py3 import ResourceSku -from ._models_py3 import ResourceSkuCapabilities -from ._models_py3 import ResourceSkuCapacity -from ._models_py3 import ResourceSkuCosts -from ._models_py3 import ResourceSkuLocationInfo -from ._models_py3 import ResourceSkuRestrictionInfo -from ._models_py3 import ResourceSkuRestrictions -from ._models_py3 import ResourceSkuZoneDetails -from ._models_py3 import ResourceSkusResult +from typing import TYPE_CHECKING -from ._compute_management_client_enums import ResourceSkuCapacityScaleType -from ._compute_management_client_enums import ResourceSkuRestrictionsReasonCode -from ._compute_management_client_enums import ResourceSkuRestrictionsType +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + + +from ._models_py3 import ( # type: ignore + ResourceSku, + ResourceSkuCapabilities, + ResourceSkuCapacity, + ResourceSkuCosts, + ResourceSkuLocationInfo, + ResourceSkuRestrictionInfo, + ResourceSkuRestrictions, + ResourceSkuZoneDetails, + ResourceSkusResult, +) + +from ._compute_management_client_enums import ( # type: ignore + ResourceSkuCapacityScaleType, + ResourceSkuRestrictionsReasonCode, + ResourceSkuRestrictionsType, +) 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__ = [ @@ -37,5 +48,5 @@ "ResourceSkuRestrictionsReasonCode", "ResourceSkuRestrictionsType", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/_models_py3.py index 652796fc11817..787f698848afc 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/_models_py3.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/_models_py3.py @@ -1,5 +1,4 @@ # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. @@ -12,11 +11,10 @@ from ... import _serialization if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models -class ResourceSku(_serialization.Model): # pylint: disable=too-many-instance-attributes +class ResourceSku(_serialization.Model): """Describes an available Compute SKU. Variables are only populated by the server, and will be ignored when sending a request. diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/operations/__init__.py index eb88a2c4a8601..a17cbc8abb0eb 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/operations/__init__.py @@ -5,15 +5,21 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._operations import ResourceSkusOperations +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._operations import ResourceSkusOperations # 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__ = [ "ResourceSkusOperations", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/operations/_operations.py index 459079ef2a002..ec2f1dff90bb9 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import sys -from typing import Any, Callable, Dict, Iterable, Optional, Type, TypeVar +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar import urllib.parse from azure.core.exceptions import ( @@ -31,7 +30,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, HttpResponse], T, Dict[str, Any]], Any]] @@ -104,7 +103,7 @@ def list(self, *, filter: Optional[str] = None, **kwargs: Any) -> Iterable["_mod api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-04-01")) cls: ClsType[_models.ResourceSkusResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/__init__.py index 3b1b6244b2375..ab7c46e8991db 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/__init__.py @@ -5,15 +5,21 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._compute_management_client import ComputeManagementClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._compute_management_client import ComputeManagementClient # 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__ = [ "ComputeManagementClient", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/_compute_management_client.py index 5a9d3a595f15b..aa1b57cf537db 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/_compute_management_client.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/_compute_management_client.py @@ -49,11 +49,10 @@ ) if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class ComputeManagementClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes +class ComputeManagementClient: # pylint: disable=too-many-instance-attributes """Compute Client. :ivar operations: Operations operations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/_configuration.py index a3aa7b78671bc..bfd6b1b88df0c 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/_configuration.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/_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 ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ComputeManagementClient. Note that all parameters used to create this instance are saved as instance diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/_version.py index d79b2760319c5..e5754a47ce68f 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "33.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/aio/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/aio/__init__.py index 0715f50185586..d3fd1ba93379a 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/aio/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/aio/__init__.py @@ -5,12 +5,18 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._compute_management_client import ComputeManagementClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._compute_management_client import ComputeManagementClient # 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__ = [ "ComputeManagementClient", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/aio/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/aio/_compute_management_client.py index fba8f119e223d..7ddcdb37c384b 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/aio/_compute_management_client.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/aio/_compute_management_client.py @@ -49,11 +49,10 @@ ) if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class ComputeManagementClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes +class ComputeManagementClient: # pylint: disable=too-many-instance-attributes """Compute Client. :ivar operations: Operations operations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/aio/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/aio/_configuration.py index 2061af3684927..a6bfda1ba4dd1 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/aio/_configuration.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/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 ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ComputeManagementClient. Note that all parameters used to create this instance are saved as instance diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/aio/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/aio/operations/__init__.py index a08a79ce1ee6d..8dd8f5ede493c 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/aio/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/aio/operations/__init__.py @@ -5,37 +5,43 @@ # Code generated by Microsoft (R) AutoRest 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 AvailabilitySetsOperations -from ._operations import ProximityPlacementGroupsOperations -from ._operations import DedicatedHostGroupsOperations -from ._operations import DedicatedHostsOperations -from ._operations import VirtualMachineExtensionImagesOperations -from ._operations import VirtualMachineExtensionsOperations -from ._operations import VirtualMachineImagesOperations -from ._operations import UsageOperations -from ._operations import VirtualMachinesOperations -from ._operations import VirtualMachineSizesOperations -from ._operations import ImagesOperations -from ._operations import VirtualMachineScaleSetsOperations -from ._operations import VirtualMachineScaleSetExtensionsOperations -from ._operations import VirtualMachineScaleSetRollingUpgradesOperations -from ._operations import VirtualMachineScaleSetVMExtensionsOperations -from ._operations import VirtualMachineScaleSetVMsOperations -from ._operations import LogAnalyticsOperations -from ._operations import DisksOperations -from ._operations import SnapshotsOperations -from ._operations import DiskEncryptionSetsOperations -from ._operations import GalleriesOperations -from ._operations import GalleryImagesOperations -from ._operations import GalleryImageVersionsOperations -from ._operations import GalleryApplicationsOperations -from ._operations import GalleryApplicationVersionsOperations -from ._operations import VirtualMachineRunCommandsOperations +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 AvailabilitySetsOperations # type: ignore +from ._operations import ProximityPlacementGroupsOperations # type: ignore +from ._operations import DedicatedHostGroupsOperations # type: ignore +from ._operations import DedicatedHostsOperations # type: ignore +from ._operations import VirtualMachineExtensionImagesOperations # type: ignore +from ._operations import VirtualMachineExtensionsOperations # type: ignore +from ._operations import VirtualMachineImagesOperations # type: ignore +from ._operations import UsageOperations # type: ignore +from ._operations import VirtualMachinesOperations # type: ignore +from ._operations import VirtualMachineSizesOperations # type: ignore +from ._operations import ImagesOperations # type: ignore +from ._operations import VirtualMachineScaleSetsOperations # type: ignore +from ._operations import VirtualMachineScaleSetExtensionsOperations # type: ignore +from ._operations import VirtualMachineScaleSetRollingUpgradesOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMExtensionsOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMsOperations # type: ignore +from ._operations import LogAnalyticsOperations # type: ignore +from ._operations import DisksOperations # type: ignore +from ._operations import SnapshotsOperations # type: ignore +from ._operations import DiskEncryptionSetsOperations # type: ignore +from ._operations import GalleriesOperations # type: ignore +from ._operations import GalleryImagesOperations # type: ignore +from ._operations import GalleryImageVersionsOperations # type: ignore +from ._operations import GalleryApplicationsOperations # type: ignore +from ._operations import GalleryApplicationVersionsOperations # type: ignore +from ._operations import VirtualMachineRunCommandsOperations # 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__ = [ @@ -67,5 +73,5 @@ "GalleryApplicationVersionsOperations", "VirtualMachineRunCommandsOperations", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/aio/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/aio/operations/_operations.py index 1b2efd4ad5298..626d07cfb9950 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/aio/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/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. @@ -18,7 +18,6 @@ List, Literal, Optional, - Type, TypeVar, Union, cast, @@ -221,7 +220,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]] @@ -262,7 +261,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.ComputeOperationValue"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.ComputeOperationListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -415,7 +414,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2019_07_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -542,7 +541,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2019_07_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -597,9 +596,7 @@ async def update( return deserialized # type: ignore @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, availability_set_name: str, **kwargs: Any - ) -> None: + async def delete(self, resource_group_name: str, availability_set_name: str, **kwargs: Any) -> None: """Delete an availability set. :param resource_group_name: The name of the resource group. Required. @@ -610,7 +607,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -660,7 +657,7 @@ async def get(self, resource_group_name: str, availability_set_name: str, **kwar :rtype: ~azure.mgmt.compute.v2019_07_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -722,7 +719,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -800,7 +797,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -883,7 +880,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1041,7 +1038,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2019_07_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1171,7 +1168,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2019_07_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1226,9 +1223,7 @@ async def update( return deserialized # type: ignore @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, proximity_placement_group_name: str, **kwargs: Any - ) -> None: + async def delete(self, resource_group_name: str, proximity_placement_group_name: str, **kwargs: Any) -> None: """Delete a proximity placement group. :param resource_group_name: The name of the resource group. Required. @@ -1239,7 +1234,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1299,7 +1294,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2019_07_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1358,7 +1353,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Proximit api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1438,7 +1433,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1599,7 +1594,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2019_07_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1726,7 +1721,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2019_07_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1781,9 +1776,7 @@ async def update( return deserialized # type: ignore @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, host_group_name: str, **kwargs: Any - ) -> None: + async def delete(self, resource_group_name: str, host_group_name: str, **kwargs: Any) -> None: """Delete a dedicated host group. :param resource_group_name: The name of the resource group. Required. @@ -1794,7 +1787,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1844,7 +1837,7 @@ async def get(self, resource_group_name: str, host_group_name: str, **kwargs: An :rtype: ~azure.mgmt.compute.v2019_07_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1906,7 +1899,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1983,7 +1976,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Dedicate api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2072,7 +2065,7 @@ async def _create_or_update_initial( parameters: Union[_models.DedicatedHost, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2276,7 +2269,7 @@ async def _update_initial( parameters: Union[_models.DedicatedHostUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2475,7 +2468,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2605,7 +2598,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2019_07_01.models.DedicatedHost :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2671,7 +2664,7 @@ def list_by_host_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.DedicatedHostListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2772,7 +2765,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2019_07_01.models.VirtualMachineExtensionImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2830,7 +2823,7 @@ async def list_types( :rtype: list[~azure.mgmt.compute.v2019_07_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2902,7 +2895,7 @@ async def list_versions( :rtype: list[~azure.mgmt.compute.v2019_07_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2977,7 +2970,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineExtension, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3187,7 +3180,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineExtensionUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3393,7 +3386,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_name: str, vm_extension_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3523,7 +3516,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2019_07_01.models.VirtualMachineExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3583,7 +3576,7 @@ async def list( :rtype: ~azure.mgmt.compute.v2019_07_01.models.VirtualMachineExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3667,7 +3660,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2019_07_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3746,7 +3739,7 @@ async def list( :rtype: list[~azure.mgmt.compute.v2019_07_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3807,7 +3800,7 @@ async def list_offers( :rtype: list[~azure.mgmt.compute.v2019_07_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3859,7 +3852,7 @@ async def list_publishers(self, location: str, **kwargs: Any) -> List[_models.Vi :rtype: list[~azure.mgmt.compute.v2019_07_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3916,7 +3909,7 @@ async def list_skus( :rtype: list[~azure.mgmt.compute.v2019_07_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3997,7 +3990,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.Usage"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.ListUsagesResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4097,7 +4090,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> AsyncIterable["_mode api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4165,7 +4158,7 @@ async def _capture_initial( parameters: Union[_models.VirtualMachineCaptureParameters, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4363,7 +4356,7 @@ async def _create_or_update_initial( parameters: Union[_models.VirtualMachine, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4558,7 +4551,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4744,7 +4737,7 @@ def get_long_running_output(pipeline_response): ) async def _delete_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4860,7 +4853,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2019_07_01.models.VirtualMachine :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4917,7 +4910,7 @@ async def instance_view( :rtype: ~azure.mgmt.compute.v2019_07_01.models.VirtualMachineInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4962,7 +4955,7 @@ async def instance_view( async def _convert_to_managed_disks_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5069,7 +5062,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _deallocate_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5170,9 +5163,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace_async - async def generalize( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, vm_name: str, **kwargs: Any - ) -> None: + async def generalize(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> None: """Sets the OS state of the virtual machine to generalized. It is recommended to sysprep the virtual machine before performing this operation. :code:`
`For Windows, please refer to `Create a managed image of a generalized VM in Azure @@ -5188,7 +5179,7 @@ async def generalize( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5244,7 +5235,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5324,7 +5315,7 @@ def list_all(self, *, status_only: Optional[str] = None, **kwargs: Any) -> Async api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5407,7 +5398,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5472,7 +5463,7 @@ async def get_next(next_link=None): async def _power_off_initial( self, resource_group_name: str, vm_name: str, *, skip_shutdown: bool = False, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5581,7 +5572,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _reapply_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5681,7 +5672,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _restart_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5781,7 +5772,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _start_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5881,7 +5872,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _redeploy_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5987,7 +5978,7 @@ async def _reimage_initial( parameters: Optional[Union[_models.VirtualMachineReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6171,7 +6162,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _perform_maintenance_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6280,7 +6271,7 @@ async def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6506,7 +6497,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.VirtualMa api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6591,7 +6582,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, image_name: str, parameters: Union[_models.Image, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6773,7 +6764,7 @@ async def _update_initial( parameters: Union[_models.ImageUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6953,7 +6944,7 @@ def get_long_running_output(pipeline_response): ) async def _delete_initial(self, resource_group_name: str, image_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7068,7 +7059,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2019_07_01.models.Image :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7127,7 +7118,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7203,7 +7194,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Image"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7291,7 +7282,7 @@ async def _create_or_update_initial( parameters: Union[_models.VirtualMachineScaleSet, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7483,7 +7474,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineScaleSetUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7672,7 +7663,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7787,7 +7778,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2019_07_01.models.VirtualMachineScaleSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7836,7 +7827,7 @@ async def _deallocate_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8031,7 +8022,7 @@ async def _delete_instances_initial( vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8224,7 +8215,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2019_07_01.models.VirtualMachineScaleSetInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8284,7 +8275,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8363,7 +8354,7 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.VirtualMachineScaleS api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.VirtualMachineScaleSetListWithLinkResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8446,7 +8437,7 @@ def list_skus( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.VirtualMachineScaleSetListSkusResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8512,6 +8503,7 @@ async def get_next(next_link=None): def get_os_upgrade_history( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> AsyncIterable["_models.UpgradeOperationHistoricalStatusInfo"]: + # pylint: disable=line-too-long """Gets list of OS upgrades on a VM scale set instance. :param resource_group_name: The name of the resource group. Required. @@ -8530,7 +8522,7 @@ def get_os_upgrade_history( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.VirtualMachineScaleSetListOSUpgradeHistory] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8601,7 +8593,7 @@ async def _power_off_initial( skip_shutdown: bool = False, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8814,7 +8806,7 @@ async def _restart_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9003,7 +8995,7 @@ async def _start_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9192,7 +9184,7 @@ async def _redeploy_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9384,7 +9376,7 @@ async def _perform_maintenance_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9582,7 +9574,7 @@ async def _update_instances_initial( vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9768,7 +9760,7 @@ async def _reimage_initial( vm_scale_set_reimage_input: Optional[Union[_models.VirtualMachineScaleSetReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9961,7 +9953,7 @@ async def _reimage_all_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10164,7 +10156,7 @@ async def force_recovery_service_fabric_platform_update_domain_walk( # pylint: :rtype: ~azure.mgmt.compute.v2019_07_01.models.RecoveryWalkResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10208,7 +10200,7 @@ async def force_recovery_service_fabric_platform_update_domain_walk( # pylint: return deserialized # type: ignore @overload - async def convert_to_single_placement_group( # pylint: disable=inconsistent-return-statements + async def convert_to_single_placement_group( self, resource_group_name: str, vm_scale_set_name: str, @@ -10236,7 +10228,7 @@ async def convert_to_single_placement_group( # pylint: disable=inconsistent-ret """ @overload - async def convert_to_single_placement_group( # pylint: disable=inconsistent-return-statements + async def convert_to_single_placement_group( self, resource_group_name: str, vm_scale_set_name: str, @@ -10263,7 +10255,7 @@ async def convert_to_single_placement_group( # pylint: disable=inconsistent-ret """ @distributed_trace_async - async def convert_to_single_placement_group( # pylint: disable=inconsistent-return-statements + async def convert_to_single_placement_group( self, resource_group_name: str, vm_scale_set_name: str, @@ -10286,7 +10278,7 @@ async def convert_to_single_placement_group( # pylint: disable=inconsistent-ret :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10365,7 +10357,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtension, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10576,7 +10568,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtensionUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10783,7 +10775,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, vmss_extension_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10913,7 +10905,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2019_07_01.models.VirtualMachineScaleSetExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10979,7 +10971,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.VirtualMachineScaleSetExtensionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11065,7 +11057,7 @@ def __init__(self, *args, **kwargs) -> None: async def _cancel_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11169,7 +11161,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_os_upgrade_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11275,7 +11267,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_extension_upgrade_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11392,7 +11384,7 @@ async def get_latest( :rtype: ~azure.mgmt.compute.v2019_07_01.models.RollingUpgradeStatusInfo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11464,7 +11456,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineExtension, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11683,7 +11675,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineExtensionUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11897,7 +11889,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, vm_extension_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12033,7 +12025,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2019_07_01.models.VirtualMachineExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12102,7 +12094,7 @@ async def list( :rtype: ~azure.mgmt.compute.v2019_07_01.models.VirtualMachineExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12177,7 +12169,7 @@ async def _reimage_initial( ] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12376,7 +12368,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _reimage_all_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12485,7 +12477,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _deallocate_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12600,7 +12592,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineScaleSetVM, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12804,7 +12796,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12934,7 +12926,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2019_07_01.models.VirtualMachineScaleSetVM :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12994,7 +12986,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2019_07_01.models.VirtualMachineScaleSetVMInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13076,7 +13068,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.VirtualMachineScaleSetVMListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13150,7 +13142,7 @@ async def _power_off_initial( skip_shutdown: bool = False, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13272,7 +13264,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _restart_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13380,7 +13372,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13488,7 +13480,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _redeploy_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13597,7 +13589,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _perform_maintenance_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13711,7 +13703,7 @@ async def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13933,7 +13925,7 @@ def __init__(self, *args, **kwargs) -> None: async def _export_request_rate_by_interval_initial( self, location: str, parameters: Union[_models.RequestRateByIntervalInput, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14111,7 +14103,7 @@ def get_long_running_output(pipeline_response): async def _export_throttled_requests_initial( self, location: str, parameters: Union[_models.ThrottledRequestsInput, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14307,7 +14299,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.Disk, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14491,7 +14483,7 @@ def get_long_running_output(pipeline_response): async def _update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.DiskUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14686,7 +14678,7 @@ async def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.compute.v2019_07_01.models.Disk :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14729,7 +14721,7 @@ async def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> return deserialized # type: ignore async def _delete_initial(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14846,7 +14838,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14921,7 +14913,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Disk"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14988,7 +14980,7 @@ async def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15183,7 +15175,7 @@ def get_long_running_output(pipeline_response): async def _revoke_access_initial( self, resource_group_name: str, disk_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15312,7 +15304,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, snapshot_name: str, snapshot: Union[_models.Snapshot, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15503,7 +15495,7 @@ async def _update_initial( snapshot: Union[_models.SnapshotUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15707,7 +15699,7 @@ async def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) :rtype: ~azure.mgmt.compute.v2019_07_01.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15752,7 +15744,7 @@ async def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) async def _delete_initial( self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15870,7 +15862,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15946,7 +15938,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Snapshot"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16013,7 +16005,7 @@ async def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16208,7 +16200,7 @@ def get_long_running_output(pipeline_response): async def _revoke_access_initial( self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16341,7 +16333,7 @@ async def _create_or_update_initial( disk_encryption_set: Union[_models.DiskEncryptionSet, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16542,7 +16534,7 @@ async def _update_initial( disk_encryption_set: Union[_models.DiskEncryptionSetUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16753,7 +16745,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2019_07_01.models.DiskEncryptionSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16798,7 +16790,7 @@ async def get( async def _delete_initial( self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16920,7 +16912,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16996,7 +16988,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.DiskEncryptionSet"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17080,7 +17072,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, gallery_name: str, gallery: Union[_models.Gallery, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17273,7 +17265,7 @@ async def _update_initial( gallery: Union[_models.GalleryUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17473,7 +17465,7 @@ async def get(self, resource_group_name: str, gallery_name: str, **kwargs: Any) :rtype: ~azure.mgmt.compute.v2019_07_01.models.Gallery :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17516,7 +17508,7 @@ async def get(self, resource_group_name: str, gallery_name: str, **kwargs: Any) return deserialized # type: ignore async def _delete_initial(self, resource_group_name: str, gallery_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17631,7 +17623,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.GalleryList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17706,7 +17698,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Gallery"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.GalleryList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17795,7 +17787,7 @@ async def _create_or_update_initial( gallery_image: Union[_models.GalleryImage, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18007,7 +17999,7 @@ async def _update_initial( gallery_image: Union[_models.GalleryImageUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18226,7 +18218,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2019_07_01.models.GalleryImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18272,7 +18264,7 @@ async def get( async def _delete_initial( self, resource_group_name: str, gallery_name: str, gallery_image_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18400,7 +18392,7 @@ def list_by_gallery( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.GalleryImageList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18492,7 +18484,7 @@ async def _create_or_update_initial( gallery_image_version: Union[_models.GalleryImageVersion, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18726,7 +18718,7 @@ async def _update_initial( gallery_image_version: Union[_models.GalleryImageVersionUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18982,7 +18974,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2019_07_01.models.GalleryImageVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19035,7 +19027,7 @@ async def _delete_initial( gallery_image_version_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19177,7 +19169,7 @@ def list_by_gallery_image( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.GalleryImageVersionList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19269,7 +19261,7 @@ async def _create_or_update_initial( gallery_application: Union[_models.GalleryApplication, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19485,7 +19477,7 @@ async def _update_initial( gallery_application: Union[_models.GalleryApplicationUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19711,7 +19703,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2019_07_01.models.GalleryApplication :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19757,7 +19749,7 @@ async def get( async def _delete_initial( self, resource_group_name: str, gallery_name: str, gallery_application_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19886,7 +19878,7 @@ def list_by_gallery( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.GalleryApplicationList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19978,7 +19970,7 @@ async def _create_or_update_initial( gallery_application_version: Union[_models.GalleryApplicationVersion, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20214,7 +20206,7 @@ async def _update_initial( gallery_application_version: Union[_models.GalleryApplicationVersionUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20472,7 +20464,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2019_07_01.models.GalleryApplicationVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20525,7 +20517,7 @@ async def _delete_initial( gallery_application_version_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20668,7 +20660,7 @@ def list_by_gallery_application( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.GalleryApplicationVersionList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20770,7 +20762,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.RunComman api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.RunCommandListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20843,7 +20835,7 @@ async def get(self, location: str, command_id: str, **kwargs: Any) -> _models.Ru :rtype: ~azure.mgmt.compute.v2019_07_01.models.RunCommandDocument :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/models/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/models/__init__.py index aeccb5abff545..58007a409a76d 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/models/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/models/__init__.py @@ -5,284 +5,295 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._models_py3 import AccessUri -from ._models_py3 import AdditionalCapabilities -from ._models_py3 import AdditionalUnattendContent -from ._models_py3 import ApiEntityReference -from ._models_py3 import ApiError -from ._models_py3 import ApiErrorBase -from ._models_py3 import AutomaticOSUpgradePolicy -from ._models_py3 import AutomaticOSUpgradeProperties -from ._models_py3 import AutomaticRepairsPolicy -from ._models_py3 import AvailabilitySet -from ._models_py3 import AvailabilitySetListResult -from ._models_py3 import AvailabilitySetUpdate -from ._models_py3 import BillingProfile -from ._models_py3 import BootDiagnostics -from ._models_py3 import BootDiagnosticsInstanceView -from ._models_py3 import ComputeOperationListResult -from ._models_py3 import ComputeOperationValue -from ._models_py3 import CreationData -from ._models_py3 import DataDisk -from ._models_py3 import DataDiskImage -from ._models_py3 import DedicatedHost -from ._models_py3 import DedicatedHostAllocatableVM -from ._models_py3 import DedicatedHostAvailableCapacity -from ._models_py3 import DedicatedHostGroup -from ._models_py3 import DedicatedHostGroupListResult -from ._models_py3 import DedicatedHostGroupUpdate -from ._models_py3 import DedicatedHostInstanceView -from ._models_py3 import DedicatedHostListResult -from ._models_py3 import DedicatedHostUpdate -from ._models_py3 import DiagnosticsProfile -from ._models_py3 import DiffDiskSettings -from ._models_py3 import Disallowed -from ._models_py3 import Disk -from ._models_py3 import DiskEncryptionSet -from ._models_py3 import DiskEncryptionSetList -from ._models_py3 import DiskEncryptionSetParameters -from ._models_py3 import DiskEncryptionSetUpdate -from ._models_py3 import DiskEncryptionSettings -from ._models_py3 import DiskInstanceView -from ._models_py3 import DiskList -from ._models_py3 import DiskSku -from ._models_py3 import DiskUpdate -from ._models_py3 import Encryption -from ._models_py3 import EncryptionSetIdentity -from ._models_py3 import EncryptionSettingsCollection -from ._models_py3 import EncryptionSettingsElement -from ._models_py3 import Gallery -from ._models_py3 import GalleryApplication -from ._models_py3 import GalleryApplicationList -from ._models_py3 import GalleryApplicationUpdate -from ._models_py3 import GalleryApplicationVersion -from ._models_py3 import GalleryApplicationVersionList -from ._models_py3 import GalleryApplicationVersionPublishingProfile -from ._models_py3 import GalleryApplicationVersionUpdate -from ._models_py3 import GalleryArtifactPublishingProfileBase -from ._models_py3 import GalleryArtifactSource -from ._models_py3 import GalleryArtifactVersionSource -from ._models_py3 import GalleryDataDiskImage -from ._models_py3 import GalleryDiskImage -from ._models_py3 import GalleryIdentifier -from ._models_py3 import GalleryImage -from ._models_py3 import GalleryImageIdentifier -from ._models_py3 import GalleryImageList -from ._models_py3 import GalleryImageUpdate -from ._models_py3 import GalleryImageVersion -from ._models_py3 import GalleryImageVersionList -from ._models_py3 import GalleryImageVersionPublishingProfile -from ._models_py3 import GalleryImageVersionStorageProfile -from ._models_py3 import GalleryImageVersionUpdate -from ._models_py3 import GalleryList -from ._models_py3 import GalleryOSDiskImage -from ._models_py3 import GalleryUpdate -from ._models_py3 import GrantAccessData -from ._models_py3 import HardwareProfile -from ._models_py3 import Image -from ._models_py3 import ImageDataDisk -from ._models_py3 import ImageDisk -from ._models_py3 import ImageDiskReference -from ._models_py3 import ImageListResult -from ._models_py3 import ImageOSDisk -from ._models_py3 import ImagePurchasePlan -from ._models_py3 import ImageReference -from ._models_py3 import ImageStorageProfile -from ._models_py3 import ImageUpdate -from ._models_py3 import InnerError -from ._models_py3 import InstanceViewStatus -from ._models_py3 import KeyVaultAndKeyReference -from ._models_py3 import KeyVaultAndSecretReference -from ._models_py3 import KeyVaultKeyReference -from ._models_py3 import KeyVaultSecretReference -from ._models_py3 import LinuxConfiguration -from ._models_py3 import ListUsagesResult -from ._models_py3 import LogAnalyticsInputBase -from ._models_py3 import LogAnalyticsOperationResult -from ._models_py3 import LogAnalyticsOutput -from ._models_py3 import MaintenanceRedeployStatus -from ._models_py3 import ManagedArtifact -from ._models_py3 import ManagedDiskParameters -from ._models_py3 import NetworkInterfaceReference -from ._models_py3 import NetworkProfile -from ._models_py3 import OSDisk -from ._models_py3 import OSDiskImage -from ._models_py3 import OSProfile -from ._models_py3 import Plan -from ._models_py3 import ProximityPlacementGroup -from ._models_py3 import ProximityPlacementGroupListResult -from ._models_py3 import ProximityPlacementGroupUpdate -from ._models_py3 import PurchasePlan -from ._models_py3 import RecommendedMachineConfiguration -from ._models_py3 import RecoveryWalkResponse -from ._models_py3 import RegionalReplicationStatus -from ._models_py3 import ReplicationStatus -from ._models_py3 import RequestRateByIntervalInput -from ._models_py3 import Resource -from ._models_py3 import ResourceRange -from ._models_py3 import RollbackStatusInfo -from ._models_py3 import RollingUpgradePolicy -from ._models_py3 import RollingUpgradeProgressInfo -from ._models_py3 import RollingUpgradeRunningStatus -from ._models_py3 import RollingUpgradeStatusInfo -from ._models_py3 import RunCommandDocument -from ._models_py3 import RunCommandDocumentBase -from ._models_py3 import RunCommandInput -from ._models_py3 import RunCommandInputParameter -from ._models_py3 import RunCommandListResult -from ._models_py3 import RunCommandParameterDefinition -from ._models_py3 import RunCommandResult -from ._models_py3 import ScaleInPolicy -from ._models_py3 import ScheduledEventsProfile -from ._models_py3 import Sku -from ._models_py3 import Snapshot -from ._models_py3 import SnapshotList -from ._models_py3 import SnapshotSku -from ._models_py3 import SnapshotUpdate -from ._models_py3 import SourceVault -from ._models_py3 import SshConfiguration -from ._models_py3 import SshPublicKey -from ._models_py3 import StorageProfile -from ._models_py3 import SubResource -from ._models_py3 import SubResourceReadOnly -from ._models_py3 import SubResourceWithColocationStatus -from ._models_py3 import TargetRegion -from ._models_py3 import TerminateNotificationProfile -from ._models_py3 import ThrottledRequestsInput -from ._models_py3 import UpdateResource -from ._models_py3 import UpgradeOperationHistoricalStatusInfo -from ._models_py3 import UpgradeOperationHistoricalStatusInfoProperties -from ._models_py3 import UpgradeOperationHistoryStatus -from ._models_py3 import UpgradePolicy -from ._models_py3 import Usage -from ._models_py3 import UsageName -from ._models_py3 import UserArtifactManage -from ._models_py3 import UserArtifactSource -from ._models_py3 import UserAssignedIdentitiesValue -from ._models_py3 import VMScaleSetConvertToSinglePlacementGroupInput -from ._models_py3 import VaultCertificate -from ._models_py3 import VaultSecretGroup -from ._models_py3 import VirtualHardDisk -from ._models_py3 import VirtualMachine -from ._models_py3 import VirtualMachineAgentInstanceView -from ._models_py3 import VirtualMachineCaptureParameters -from ._models_py3 import VirtualMachineCaptureResult -from ._models_py3 import VirtualMachineExtension -from ._models_py3 import VirtualMachineExtensionHandlerInstanceView -from ._models_py3 import VirtualMachineExtensionImage -from ._models_py3 import VirtualMachineExtensionInstanceView -from ._models_py3 import VirtualMachineExtensionUpdate -from ._models_py3 import VirtualMachineExtensionsListResult -from ._models_py3 import VirtualMachineHealthStatus -from ._models_py3 import VirtualMachineIdentity -from ._models_py3 import VirtualMachineImage -from ._models_py3 import VirtualMachineImageResource -from ._models_py3 import VirtualMachineInstanceView -from ._models_py3 import VirtualMachineListResult -from ._models_py3 import VirtualMachineReimageParameters -from ._models_py3 import VirtualMachineScaleSet -from ._models_py3 import VirtualMachineScaleSetDataDisk -from ._models_py3 import VirtualMachineScaleSetExtension -from ._models_py3 import VirtualMachineScaleSetExtensionListResult -from ._models_py3 import VirtualMachineScaleSetExtensionProfile -from ._models_py3 import VirtualMachineScaleSetExtensionUpdate -from ._models_py3 import VirtualMachineScaleSetIPConfiguration -from ._models_py3 import VirtualMachineScaleSetIdentity -from ._models_py3 import VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue -from ._models_py3 import VirtualMachineScaleSetInstanceView -from ._models_py3 import VirtualMachineScaleSetInstanceViewStatusesSummary -from ._models_py3 import VirtualMachineScaleSetIpTag -from ._models_py3 import VirtualMachineScaleSetListOSUpgradeHistory -from ._models_py3 import VirtualMachineScaleSetListResult -from ._models_py3 import VirtualMachineScaleSetListSkusResult -from ._models_py3 import VirtualMachineScaleSetListWithLinkResult -from ._models_py3 import VirtualMachineScaleSetManagedDiskParameters -from ._models_py3 import VirtualMachineScaleSetNetworkConfiguration -from ._models_py3 import VirtualMachineScaleSetNetworkConfigurationDnsSettings -from ._models_py3 import VirtualMachineScaleSetNetworkProfile -from ._models_py3 import VirtualMachineScaleSetOSDisk -from ._models_py3 import VirtualMachineScaleSetOSProfile -from ._models_py3 import VirtualMachineScaleSetPublicIPAddressConfiguration -from ._models_py3 import VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings -from ._models_py3 import VirtualMachineScaleSetReimageParameters -from ._models_py3 import VirtualMachineScaleSetSku -from ._models_py3 import VirtualMachineScaleSetSkuCapacity -from ._models_py3 import VirtualMachineScaleSetStorageProfile -from ._models_py3 import VirtualMachineScaleSetUpdate -from ._models_py3 import VirtualMachineScaleSetUpdateIPConfiguration -from ._models_py3 import VirtualMachineScaleSetUpdateNetworkConfiguration -from ._models_py3 import VirtualMachineScaleSetUpdateNetworkProfile -from ._models_py3 import VirtualMachineScaleSetUpdateOSDisk -from ._models_py3 import VirtualMachineScaleSetUpdateOSProfile -from ._models_py3 import VirtualMachineScaleSetUpdatePublicIPAddressConfiguration -from ._models_py3 import VirtualMachineScaleSetUpdateStorageProfile -from ._models_py3 import VirtualMachineScaleSetUpdateVMProfile -from ._models_py3 import VirtualMachineScaleSetVM -from ._models_py3 import VirtualMachineScaleSetVMExtensionsSummary -from ._models_py3 import VirtualMachineScaleSetVMInstanceIDs -from ._models_py3 import VirtualMachineScaleSetVMInstanceRequiredIDs -from ._models_py3 import VirtualMachineScaleSetVMInstanceView -from ._models_py3 import VirtualMachineScaleSetVMListResult -from ._models_py3 import VirtualMachineScaleSetVMNetworkProfileConfiguration -from ._models_py3 import VirtualMachineScaleSetVMProfile -from ._models_py3 import VirtualMachineScaleSetVMProtectionPolicy -from ._models_py3 import VirtualMachineScaleSetVMReimageParameters -from ._models_py3 import VirtualMachineSize -from ._models_py3 import VirtualMachineSizeListResult -from ._models_py3 import VirtualMachineStatusCodeCount -from ._models_py3 import VirtualMachineUpdate -from ._models_py3 import WinRMConfiguration -from ._models_py3 import WinRMListener -from ._models_py3 import WindowsConfiguration +from typing import TYPE_CHECKING -from ._compute_management_client_enums import AccessLevel -from ._compute_management_client_enums import AggregatedReplicationState -from ._compute_management_client_enums import AvailabilitySetSkuTypes -from ._compute_management_client_enums import CachingTypes -from ._compute_management_client_enums import DedicatedHostLicenseTypes -from ._compute_management_client_enums import DiffDiskOptions -from ._compute_management_client_enums import DiskCreateOption -from ._compute_management_client_enums import DiskCreateOptionTypes -from ._compute_management_client_enums import DiskEncryptionSetIdentityType -from ._compute_management_client_enums import DiskState -from ._compute_management_client_enums import DiskStorageAccountTypes -from ._compute_management_client_enums import EncryptionType -from ._compute_management_client_enums import GalleryApplicationVersionPropertiesProvisioningState -from ._compute_management_client_enums import GalleryImagePropertiesProvisioningState -from ._compute_management_client_enums import GalleryImageVersionPropertiesProvisioningState -from ._compute_management_client_enums import GalleryPropertiesProvisioningState -from ._compute_management_client_enums import HostCaching -from ._compute_management_client_enums import HyperVGeneration -from ._compute_management_client_enums import HyperVGenerationType -from ._compute_management_client_enums import HyperVGenerationTypes -from ._compute_management_client_enums import IPVersion -from ._compute_management_client_enums import IntervalInMins -from ._compute_management_client_enums import MaintenanceOperationResultCodeTypes -from ._compute_management_client_enums import OperatingSystemStateTypes -from ._compute_management_client_enums import OperatingSystemTypes -from ._compute_management_client_enums import ProtocolTypes -from ._compute_management_client_enums import ProximityPlacementGroupType -from ._compute_management_client_enums import ReplicationState -from ._compute_management_client_enums import ReplicationStatusTypes -from ._compute_management_client_enums import ResourceIdentityType -from ._compute_management_client_enums import RollingUpgradeActionType -from ._compute_management_client_enums import RollingUpgradeStatusCode -from ._compute_management_client_enums import SettingNames -from ._compute_management_client_enums import SnapshotStorageAccountTypes -from ._compute_management_client_enums import StatusLevelTypes -from ._compute_management_client_enums import StorageAccountType -from ._compute_management_client_enums import StorageAccountTypes -from ._compute_management_client_enums import UpgradeMode -from ._compute_management_client_enums import UpgradeOperationInvoker -from ._compute_management_client_enums import UpgradeState -from ._compute_management_client_enums import VirtualMachineEvictionPolicyTypes -from ._compute_management_client_enums import VirtualMachinePriorityTypes -from ._compute_management_client_enums import VirtualMachineScaleSetScaleInRules -from ._compute_management_client_enums import VirtualMachineScaleSetSkuScaleType -from ._compute_management_client_enums import VirtualMachineSizeTypes +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + + +from ._models_py3 import ( # type: ignore + AccessUri, + AdditionalCapabilities, + AdditionalUnattendContent, + ApiEntityReference, + ApiError, + ApiErrorBase, + AutomaticOSUpgradePolicy, + AutomaticOSUpgradeProperties, + AutomaticRepairsPolicy, + AvailabilitySet, + AvailabilitySetListResult, + AvailabilitySetUpdate, + BillingProfile, + BootDiagnostics, + BootDiagnosticsInstanceView, + ComputeOperationListResult, + ComputeOperationValue, + CreationData, + DataDisk, + DataDiskImage, + DedicatedHost, + DedicatedHostAllocatableVM, + DedicatedHostAvailableCapacity, + DedicatedHostGroup, + DedicatedHostGroupListResult, + DedicatedHostGroupUpdate, + DedicatedHostInstanceView, + DedicatedHostListResult, + DedicatedHostUpdate, + DiagnosticsProfile, + DiffDiskSettings, + Disallowed, + Disk, + DiskEncryptionSet, + DiskEncryptionSetList, + DiskEncryptionSetParameters, + DiskEncryptionSetUpdate, + DiskEncryptionSettings, + DiskInstanceView, + DiskList, + DiskSku, + DiskUpdate, + Encryption, + EncryptionSetIdentity, + EncryptionSettingsCollection, + EncryptionSettingsElement, + Gallery, + GalleryApplication, + GalleryApplicationList, + GalleryApplicationUpdate, + GalleryApplicationVersion, + GalleryApplicationVersionList, + GalleryApplicationVersionPublishingProfile, + GalleryApplicationVersionUpdate, + GalleryArtifactPublishingProfileBase, + GalleryArtifactSource, + GalleryArtifactVersionSource, + GalleryDataDiskImage, + GalleryDiskImage, + GalleryIdentifier, + GalleryImage, + GalleryImageIdentifier, + GalleryImageList, + GalleryImageUpdate, + GalleryImageVersion, + GalleryImageVersionList, + GalleryImageVersionPublishingProfile, + GalleryImageVersionStorageProfile, + GalleryImageVersionUpdate, + GalleryList, + GalleryOSDiskImage, + GalleryUpdate, + GrantAccessData, + HardwareProfile, + Image, + ImageDataDisk, + ImageDisk, + ImageDiskReference, + ImageListResult, + ImageOSDisk, + ImagePurchasePlan, + ImageReference, + ImageStorageProfile, + ImageUpdate, + InnerError, + InstanceViewStatus, + KeyVaultAndKeyReference, + KeyVaultAndSecretReference, + KeyVaultKeyReference, + KeyVaultSecretReference, + LinuxConfiguration, + ListUsagesResult, + LogAnalyticsInputBase, + LogAnalyticsOperationResult, + LogAnalyticsOutput, + MaintenanceRedeployStatus, + ManagedArtifact, + ManagedDiskParameters, + NetworkInterfaceReference, + NetworkProfile, + OSDisk, + OSDiskImage, + OSProfile, + Plan, + ProximityPlacementGroup, + ProximityPlacementGroupListResult, + ProximityPlacementGroupUpdate, + PurchasePlan, + RecommendedMachineConfiguration, + RecoveryWalkResponse, + RegionalReplicationStatus, + ReplicationStatus, + RequestRateByIntervalInput, + Resource, + ResourceRange, + RollbackStatusInfo, + RollingUpgradePolicy, + RollingUpgradeProgressInfo, + RollingUpgradeRunningStatus, + RollingUpgradeStatusInfo, + RunCommandDocument, + RunCommandDocumentBase, + RunCommandInput, + RunCommandInputParameter, + RunCommandListResult, + RunCommandParameterDefinition, + RunCommandResult, + ScaleInPolicy, + ScheduledEventsProfile, + Sku, + Snapshot, + SnapshotList, + SnapshotSku, + SnapshotUpdate, + SourceVault, + SshConfiguration, + SshPublicKey, + StorageProfile, + SubResource, + SubResourceReadOnly, + SubResourceWithColocationStatus, + TargetRegion, + TerminateNotificationProfile, + ThrottledRequestsInput, + UpdateResource, + UpgradeOperationHistoricalStatusInfo, + UpgradeOperationHistoricalStatusInfoProperties, + UpgradeOperationHistoryStatus, + UpgradePolicy, + Usage, + UsageName, + UserArtifactManage, + UserArtifactSource, + UserAssignedIdentitiesValue, + VMScaleSetConvertToSinglePlacementGroupInput, + VaultCertificate, + VaultSecretGroup, + VirtualHardDisk, + VirtualMachine, + VirtualMachineAgentInstanceView, + VirtualMachineCaptureParameters, + VirtualMachineCaptureResult, + VirtualMachineExtension, + VirtualMachineExtensionHandlerInstanceView, + VirtualMachineExtensionImage, + VirtualMachineExtensionInstanceView, + VirtualMachineExtensionUpdate, + VirtualMachineExtensionsListResult, + VirtualMachineHealthStatus, + VirtualMachineIdentity, + VirtualMachineImage, + VirtualMachineImageResource, + VirtualMachineInstanceView, + VirtualMachineListResult, + VirtualMachineReimageParameters, + VirtualMachineScaleSet, + VirtualMachineScaleSetDataDisk, + VirtualMachineScaleSetExtension, + VirtualMachineScaleSetExtensionListResult, + VirtualMachineScaleSetExtensionProfile, + VirtualMachineScaleSetExtensionUpdate, + VirtualMachineScaleSetIPConfiguration, + VirtualMachineScaleSetIdentity, + VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue, + VirtualMachineScaleSetInstanceView, + VirtualMachineScaleSetInstanceViewStatusesSummary, + VirtualMachineScaleSetIpTag, + VirtualMachineScaleSetListOSUpgradeHistory, + VirtualMachineScaleSetListResult, + VirtualMachineScaleSetListSkusResult, + VirtualMachineScaleSetListWithLinkResult, + VirtualMachineScaleSetManagedDiskParameters, + VirtualMachineScaleSetNetworkConfiguration, + VirtualMachineScaleSetNetworkConfigurationDnsSettings, + VirtualMachineScaleSetNetworkProfile, + VirtualMachineScaleSetOSDisk, + VirtualMachineScaleSetOSProfile, + VirtualMachineScaleSetPublicIPAddressConfiguration, + VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings, + VirtualMachineScaleSetReimageParameters, + VirtualMachineScaleSetSku, + VirtualMachineScaleSetSkuCapacity, + VirtualMachineScaleSetStorageProfile, + VirtualMachineScaleSetUpdate, + VirtualMachineScaleSetUpdateIPConfiguration, + VirtualMachineScaleSetUpdateNetworkConfiguration, + VirtualMachineScaleSetUpdateNetworkProfile, + VirtualMachineScaleSetUpdateOSDisk, + VirtualMachineScaleSetUpdateOSProfile, + VirtualMachineScaleSetUpdatePublicIPAddressConfiguration, + VirtualMachineScaleSetUpdateStorageProfile, + VirtualMachineScaleSetUpdateVMProfile, + VirtualMachineScaleSetVM, + VirtualMachineScaleSetVMExtensionsSummary, + VirtualMachineScaleSetVMInstanceIDs, + VirtualMachineScaleSetVMInstanceRequiredIDs, + VirtualMachineScaleSetVMInstanceView, + VirtualMachineScaleSetVMListResult, + VirtualMachineScaleSetVMNetworkProfileConfiguration, + VirtualMachineScaleSetVMProfile, + VirtualMachineScaleSetVMProtectionPolicy, + VirtualMachineScaleSetVMReimageParameters, + VirtualMachineSize, + VirtualMachineSizeListResult, + VirtualMachineStatusCodeCount, + VirtualMachineUpdate, + WinRMConfiguration, + WinRMListener, + WindowsConfiguration, +) + +from ._compute_management_client_enums import ( # type: ignore + AccessLevel, + AggregatedReplicationState, + AvailabilitySetSkuTypes, + CachingTypes, + DedicatedHostLicenseTypes, + DiffDiskOptions, + DiskCreateOption, + DiskCreateOptionTypes, + DiskEncryptionSetIdentityType, + DiskState, + DiskStorageAccountTypes, + EncryptionType, + GalleryApplicationVersionPropertiesProvisioningState, + GalleryImagePropertiesProvisioningState, + GalleryImageVersionPropertiesProvisioningState, + GalleryPropertiesProvisioningState, + HostCaching, + HyperVGeneration, + HyperVGenerationType, + HyperVGenerationTypes, + IPVersion, + IntervalInMins, + MaintenanceOperationResultCodeTypes, + OperatingSystemStateTypes, + OperatingSystemTypes, + ProtocolTypes, + ProximityPlacementGroupType, + ReplicationState, + ReplicationStatusTypes, + ResourceIdentityType, + RollingUpgradeActionType, + RollingUpgradeStatusCode, + SettingNames, + SnapshotStorageAccountTypes, + StatusLevelTypes, + StorageAccountType, + StorageAccountTypes, + UpgradeMode, + UpgradeOperationInvoker, + UpgradeState, + VirtualMachineEvictionPolicyTypes, + VirtualMachinePriorityTypes, + VirtualMachineScaleSetScaleInRules, + VirtualMachineScaleSetSkuScaleType, + VirtualMachineSizeTypes, +) 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__ = [ @@ -561,5 +572,5 @@ "VirtualMachineScaleSetSkuScaleType", "VirtualMachineSizeTypes", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/models/_models_py3.py index 26b115a483235..59b0998a9017e 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/models/_models_py3.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/models/_models_py3.py @@ -1,5 +1,5 @@ -# 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. @@ -16,10 +16,9 @@ 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 if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object @@ -399,7 +398,7 @@ def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kw self.tags = tags -class AvailabilitySet(Resource): # pylint: disable=too-many-instance-attributes +class AvailabilitySet(Resource): """Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see `Manage the @@ -907,7 +906,7 @@ def __init__( self.upload_size_bytes = upload_size_bytes -class DataDisk(_serialization.Model): # pylint: disable=too-many-instance-attributes +class DataDisk(_serialization.Model): """Describes a data disk. Variables are only populated by the server, and will be ignored when sending a request. @@ -1078,7 +1077,7 @@ def __init__(self, **kwargs: Any) -> None: self.lun = None -class DedicatedHost(Resource): # pylint: disable=too-many-instance-attributes +class DedicatedHost(Resource): """Specifies information about the Dedicated host. Variables are only populated by the server, and will be ignored when sending a request. @@ -1657,7 +1656,7 @@ def __init__(self, *, disk_types: Optional[List[str]] = None, **kwargs: Any) -> self.disk_types = disk_types -class Disk(Resource): # pylint: disable=too-many-instance-attributes +class Disk(Resource): """Disk resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -2508,7 +2507,7 @@ def __init__( self.provisioning_state = None -class GalleryApplication(Resource): # pylint: disable=too-many-instance-attributes +class GalleryApplication(Resource): """Specifies information about the gallery Application Definition that you want to create or update. @@ -3238,7 +3237,7 @@ def __init__(self, **kwargs: Any) -> None: self.unique_name = None -class GalleryImage(Resource): # pylint: disable=too-many-instance-attributes +class GalleryImage(Resource): """Specifies information about the gallery Image Definition that you want to create or update. Variables are only populated by the server, and will be ignored when sending a request. @@ -3473,7 +3472,7 @@ def __init__(self, *, value: List["_models.GalleryImage"], next_link: Optional[s self.next_link = next_link -class GalleryImageUpdate(UpdateResource): # pylint: disable=too-many-instance-attributes +class GalleryImageUpdate(UpdateResource): """Specifies information about the gallery Image Definition that you want to update. Variables are only populated by the server, and will be ignored when sending a request. @@ -5414,7 +5413,7 @@ def __init__( self.network_interfaces = network_interfaces -class OSDisk(_serialization.Model): # pylint: disable=too-many-instance-attributes +class OSDisk(_serialization.Model): """Specifies information about the operating system disk used by the virtual machine. :code:`
`:code:`
` For more information about disks, see `About disks and VHDs for Azure virtual machines @@ -6942,7 +6941,7 @@ def __init__( self.capacity = capacity -class Snapshot(Resource): # pylint: disable=too-many-instance-attributes +class Snapshot(Resource): """Snapshot resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -7997,7 +7996,7 @@ def __init__(self, *, uri: Optional[str] = None, **kwargs: Any) -> None: self.uri = uri -class VirtualMachine(Resource): # pylint: disable=too-many-instance-attributes +class VirtualMachine(Resource): """Describes a Virtual Machine. Variables are only populated by the server, and will be ignored when sending a request. @@ -8402,7 +8401,7 @@ def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylin self.resources = None -class VirtualMachineExtension(Resource): # pylint: disable=too-many-instance-attributes +class VirtualMachineExtension(Resource): """Describes a Virtual Machine Extension. Variables are only populated by the server, and will be ignored when sending a request. @@ -9048,7 +9047,7 @@ def __init__( self.hyper_v_generation = hyper_v_generation -class VirtualMachineInstanceView(_serialization.Model): # pylint: disable=too-many-instance-attributes +class VirtualMachineInstanceView(_serialization.Model): """The instance view of a virtual machine. :ivar platform_update_domain: Specifies the update domain of the virtual machine. @@ -9229,7 +9228,7 @@ def __init__(self, *, temp_disk: Optional[bool] = None, **kwargs: Any) -> None: self.temp_disk = temp_disk -class VirtualMachineScaleSet(Resource): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSet(Resource): """Describes a Virtual Machine Scale Set. Variables are only populated by the server, and will be ignored when sending a request. @@ -9552,7 +9551,7 @@ def __init__( self.disk_m_bps_read_write = disk_m_bps_read_write -class VirtualMachineScaleSetExtension(SubResourceReadOnly): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetExtension(SubResourceReadOnly): """Describes a Virtual Machine Scale Set Extension. Variables are only populated by the server, and will be ignored when sending a request. @@ -9724,7 +9723,7 @@ def __init__( self.extensions = extensions -class VirtualMachineScaleSetExtensionUpdate(SubResourceReadOnly): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetExtensionUpdate(SubResourceReadOnly): """Describes a Virtual Machine Scale Set Extension. Variables are only populated by the server, and will be ignored when sending a request. @@ -11049,7 +11048,7 @@ def __init__( self.data_disks = data_disks -class VirtualMachineScaleSetUpdate(UpdateResource): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetUpdate(UpdateResource): """Describes a Virtual Machine Scale Set. :ivar tags: Resource tags. @@ -11725,7 +11724,7 @@ def __init__( self.scheduled_events_profile = scheduled_events_profile -class VirtualMachineScaleSetVM(Resource): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetVM(Resource): """Describes a virtual machine scale set virtual machine. Variables are only populated by the server, and will be ignored when sending a request. @@ -12035,7 +12034,7 @@ def __init__(self, *, instance_ids: List[str], **kwargs: Any) -> None: self.instance_ids = instance_ids -class VirtualMachineScaleSetVMInstanceView(_serialization.Model): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetVMInstanceView(_serialization.Model): """The instance view of a virtual machine scale set VM. Variables are only populated by the server, and will be ignored when sending a request. @@ -12495,7 +12494,7 @@ def __init__(self, **kwargs: Any) -> None: self.count = None -class VirtualMachineUpdate(UpdateResource): # pylint: disable=too-many-instance-attributes +class VirtualMachineUpdate(UpdateResource): """Describes a Virtual Machine Update. Variables are only populated by the server, and will be ignored when sending a request. diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/operations/__init__.py index a08a79ce1ee6d..8dd8f5ede493c 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/operations/__init__.py @@ -5,37 +5,43 @@ # Code generated by Microsoft (R) AutoRest 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 AvailabilitySetsOperations -from ._operations import ProximityPlacementGroupsOperations -from ._operations import DedicatedHostGroupsOperations -from ._operations import DedicatedHostsOperations -from ._operations import VirtualMachineExtensionImagesOperations -from ._operations import VirtualMachineExtensionsOperations -from ._operations import VirtualMachineImagesOperations -from ._operations import UsageOperations -from ._operations import VirtualMachinesOperations -from ._operations import VirtualMachineSizesOperations -from ._operations import ImagesOperations -from ._operations import VirtualMachineScaleSetsOperations -from ._operations import VirtualMachineScaleSetExtensionsOperations -from ._operations import VirtualMachineScaleSetRollingUpgradesOperations -from ._operations import VirtualMachineScaleSetVMExtensionsOperations -from ._operations import VirtualMachineScaleSetVMsOperations -from ._operations import LogAnalyticsOperations -from ._operations import DisksOperations -from ._operations import SnapshotsOperations -from ._operations import DiskEncryptionSetsOperations -from ._operations import GalleriesOperations -from ._operations import GalleryImagesOperations -from ._operations import GalleryImageVersionsOperations -from ._operations import GalleryApplicationsOperations -from ._operations import GalleryApplicationVersionsOperations -from ._operations import VirtualMachineRunCommandsOperations +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 AvailabilitySetsOperations # type: ignore +from ._operations import ProximityPlacementGroupsOperations # type: ignore +from ._operations import DedicatedHostGroupsOperations # type: ignore +from ._operations import DedicatedHostsOperations # type: ignore +from ._operations import VirtualMachineExtensionImagesOperations # type: ignore +from ._operations import VirtualMachineExtensionsOperations # type: ignore +from ._operations import VirtualMachineImagesOperations # type: ignore +from ._operations import UsageOperations # type: ignore +from ._operations import VirtualMachinesOperations # type: ignore +from ._operations import VirtualMachineSizesOperations # type: ignore +from ._operations import ImagesOperations # type: ignore +from ._operations import VirtualMachineScaleSetsOperations # type: ignore +from ._operations import VirtualMachineScaleSetExtensionsOperations # type: ignore +from ._operations import VirtualMachineScaleSetRollingUpgradesOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMExtensionsOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMsOperations # type: ignore +from ._operations import LogAnalyticsOperations # type: ignore +from ._operations import DisksOperations # type: ignore +from ._operations import SnapshotsOperations # type: ignore +from ._operations import DiskEncryptionSetsOperations # type: ignore +from ._operations import GalleriesOperations # type: ignore +from ._operations import GalleryImagesOperations # type: ignore +from ._operations import GalleryImageVersionsOperations # type: ignore +from ._operations import GalleryApplicationsOperations # type: ignore +from ._operations import GalleryApplicationVersionsOperations # type: ignore +from ._operations import VirtualMachineRunCommandsOperations # 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__ = [ @@ -67,5 +73,5 @@ "GalleryApplicationVersionsOperations", "VirtualMachineRunCommandsOperations", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/operations/_operations.py index fa54f4f6c6070..95fc4a7b07580 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/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. @@ -8,22 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import ( - Any, - Callable, - Dict, - IO, - Iterable, - Iterator, - List, - Literal, - Optional, - Type, - TypeVar, - Union, - cast, - overload, -) +from typing import Any, Callable, Dict, IO, Iterable, Iterator, List, Literal, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -51,7 +36,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, HttpResponse], T, Dict[str, Any]], Any]] @@ -5434,7 +5419,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.ComputeOperationValue"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.ComputeOperationListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5587,7 +5572,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2019_07_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5714,7 +5699,7 @@ def update( :rtype: ~azure.mgmt.compute.v2019_07_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5782,7 +5767,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5832,7 +5817,7 @@ def get(self, resource_group_name: str, availability_set_name: str, **kwargs: An :rtype: ~azure.mgmt.compute.v2019_07_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5893,7 +5878,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5970,7 +5955,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Ava api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6052,7 +6037,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6210,7 +6195,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2019_07_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6340,7 +6325,7 @@ def update( :rtype: ~azure.mgmt.compute.v2019_07_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6408,7 +6393,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6468,7 +6453,7 @@ def get( :rtype: ~azure.mgmt.compute.v2019_07_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6527,7 +6512,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.ProximityPlac api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6607,7 +6592,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6768,7 +6753,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2019_07_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6895,7 +6880,7 @@ def update( :rtype: ~azure.mgmt.compute.v2019_07_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6963,7 +6948,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7013,7 +6998,7 @@ def get(self, resource_group_name: str, host_group_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.compute.v2019_07_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7072,7 +7057,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7148,7 +7133,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.DedicatedHost api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7237,7 +7222,7 @@ def _create_or_update_initial( parameters: Union[_models.DedicatedHost, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7438,7 +7423,7 @@ def _update_initial( parameters: Union[_models.DedicatedHostUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7634,7 +7619,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7764,7 +7749,7 @@ def get( :rtype: ~azure.mgmt.compute.v2019_07_01.models.DedicatedHost :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7829,7 +7814,7 @@ def list_by_host_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.DedicatedHostListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7930,7 +7915,7 @@ def get( :rtype: ~azure.mgmt.compute.v2019_07_01.models.VirtualMachineExtensionImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7988,7 +7973,7 @@ def list_types( :rtype: list[~azure.mgmt.compute.v2019_07_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8060,7 +8045,7 @@ def list_versions( :rtype: list[~azure.mgmt.compute.v2019_07_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8135,7 +8120,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineExtension, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8345,7 +8330,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineExtensionUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8551,7 +8536,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_name: str, vm_extension_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8681,7 +8666,7 @@ def get( :rtype: ~azure.mgmt.compute.v2019_07_01.models.VirtualMachineExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8741,7 +8726,7 @@ def list( :rtype: ~azure.mgmt.compute.v2019_07_01.models.VirtualMachineExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8825,7 +8810,7 @@ def get( :rtype: ~azure.mgmt.compute.v2019_07_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8904,7 +8889,7 @@ def list( :rtype: list[~azure.mgmt.compute.v2019_07_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8965,7 +8950,7 @@ def list_offers( :rtype: list[~azure.mgmt.compute.v2019_07_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9017,7 +9002,7 @@ def list_publishers(self, location: str, **kwargs: Any) -> List[_models.VirtualM :rtype: list[~azure.mgmt.compute.v2019_07_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9074,7 +9059,7 @@ def list_skus( :rtype: list[~azure.mgmt.compute.v2019_07_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9155,7 +9140,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.Usage"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.ListUsagesResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9254,7 +9239,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> Iterable["_models.Vi api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9322,7 +9307,7 @@ def _capture_initial( parameters: Union[_models.VirtualMachineCaptureParameters, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9520,7 +9505,7 @@ def _create_or_update_initial( parameters: Union[_models.VirtualMachine, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9712,7 +9697,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9895,7 +9880,7 @@ def get_long_running_output(pipeline_response): ) def _delete_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10011,7 +9996,7 @@ def get( :rtype: ~azure.mgmt.compute.v2019_07_01.models.VirtualMachine :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10068,7 +10053,7 @@ def instance_view( :rtype: ~azure.mgmt.compute.v2019_07_01.models.VirtualMachineInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10113,7 +10098,7 @@ def instance_view( def _convert_to_managed_disks_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10218,7 +10203,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _deallocate_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10337,7 +10322,7 @@ def generalize( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10392,7 +10377,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Vir api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10471,7 +10456,7 @@ def list_all(self, *, status_only: Optional[str] = None, **kwargs: Any) -> Itera api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10553,7 +10538,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10618,7 +10603,7 @@ def get_next(next_link=None): def _power_off_initial( self, resource_group_name: str, vm_name: str, *, skip_shutdown: bool = False, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10727,7 +10712,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _reapply_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10827,7 +10812,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _restart_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10927,7 +10912,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _start_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11027,7 +11012,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _redeploy_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11133,7 +11118,7 @@ def _reimage_initial( parameters: Optional[Union[_models.VirtualMachineReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11315,7 +11300,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _perform_maintenance_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11422,7 +11407,7 @@ def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11644,7 +11629,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.VirtualMachine api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11729,7 +11714,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, image_name: str, parameters: Union[_models.Image, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11911,7 +11896,7 @@ def _update_initial( parameters: Union[_models.ImageUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12091,7 +12076,7 @@ def get_long_running_output(pipeline_response): ) def _delete_initial(self, resource_group_name: str, image_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12206,7 +12191,7 @@ def get( :rtype: ~azure.mgmt.compute.v2019_07_01.models.Image :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12265,7 +12250,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12341,7 +12326,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Image"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12429,7 +12414,7 @@ def _create_or_update_initial( parameters: Union[_models.VirtualMachineScaleSet, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12621,7 +12606,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineScaleSetUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12808,7 +12793,7 @@ def get_long_running_output(pipeline_response): ) def _delete_initial(self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12919,7 +12904,7 @@ def get(self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) - :rtype: ~azure.mgmt.compute.v2019_07_01.models.VirtualMachineScaleSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12968,7 +12953,7 @@ def _deallocate_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13163,7 +13148,7 @@ def _delete_instances_initial( vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13356,7 +13341,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2019_07_01.models.VirtualMachineScaleSetInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13416,7 +13401,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Vir api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13495,7 +13480,7 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.VirtualMachineScaleSet"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.VirtualMachineScaleSetListWithLinkResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13578,7 +13563,7 @@ def list_skus( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.VirtualMachineScaleSetListSkusResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13662,7 +13647,7 @@ def get_os_upgrade_history( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.VirtualMachineScaleSetListOSUpgradeHistory] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13733,7 +13718,7 @@ def _power_off_initial( skip_shutdown: bool = False, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13946,7 +13931,7 @@ def _restart_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14135,7 +14120,7 @@ def _start_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14324,7 +14309,7 @@ def _redeploy_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14516,7 +14501,7 @@ def _perform_maintenance_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14714,7 +14699,7 @@ def _update_instances_initial( vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14900,7 +14885,7 @@ def _reimage_initial( vm_scale_set_reimage_input: Optional[Union[_models.VirtualMachineScaleSetReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15093,7 +15078,7 @@ def _reimage_all_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15296,7 +15281,7 @@ def force_recovery_service_fabric_platform_update_domain_walk( # pylint: disabl :rtype: ~azure.mgmt.compute.v2019_07_01.models.RecoveryWalkResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15340,7 +15325,7 @@ def force_recovery_service_fabric_platform_update_domain_walk( # pylint: disabl return deserialized # type: ignore @overload - def convert_to_single_placement_group( # pylint: disable=inconsistent-return-statements + def convert_to_single_placement_group( self, resource_group_name: str, vm_scale_set_name: str, @@ -15368,7 +15353,7 @@ def convert_to_single_placement_group( # pylint: disable=inconsistent-return-st """ @overload - def convert_to_single_placement_group( # pylint: disable=inconsistent-return-statements + def convert_to_single_placement_group( self, resource_group_name: str, vm_scale_set_name: str, @@ -15418,7 +15403,7 @@ def convert_to_single_placement_group( # pylint: disable=inconsistent-return-st :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15497,7 +15482,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtension, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15708,7 +15693,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtensionUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15915,7 +15900,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, vmss_extension_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16045,7 +16030,7 @@ def get( :rtype: ~azure.mgmt.compute.v2019_07_01.models.VirtualMachineScaleSetExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16111,7 +16096,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.VirtualMachineScaleSetExtensionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16195,7 +16180,7 @@ def __init__(self, *args, **kwargs): self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") def _cancel_initial(self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16297,7 +16282,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_os_upgrade_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16403,7 +16388,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_extension_upgrade_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16520,7 +16505,7 @@ def get_latest( :rtype: ~azure.mgmt.compute.v2019_07_01.models.RollingUpgradeStatusInfo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16592,7 +16577,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineExtension, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16811,7 +16796,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineExtensionUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17025,7 +17010,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, vm_extension_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17161,7 +17146,7 @@ def get( :rtype: ~azure.mgmt.compute.v2019_07_01.models.VirtualMachineExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17230,7 +17215,7 @@ def list( :rtype: ~azure.mgmt.compute.v2019_07_01.models.VirtualMachineExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17305,7 +17290,7 @@ def _reimage_initial( ] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17504,7 +17489,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _reimage_all_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17613,7 +17598,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _deallocate_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17728,7 +17713,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineScaleSetVM, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17932,7 +17917,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18062,7 +18047,7 @@ def get( :rtype: ~azure.mgmt.compute.v2019_07_01.models.VirtualMachineScaleSetVM :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18122,7 +18107,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2019_07_01.models.VirtualMachineScaleSetVMInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18204,7 +18189,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.VirtualMachineScaleSetVMListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18278,7 +18263,7 @@ def _power_off_initial( skip_shutdown: bool = False, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18400,7 +18385,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _restart_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18508,7 +18493,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18616,7 +18601,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _redeploy_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18725,7 +18710,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _perform_maintenance_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18839,7 +18824,7 @@ def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19058,7 +19043,7 @@ def __init__(self, *args, **kwargs): def _export_request_rate_by_interval_initial( self, location: str, parameters: Union[_models.RequestRateByIntervalInput, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19235,7 +19220,7 @@ def get_long_running_output(pipeline_response): def _export_throttled_requests_initial( self, location: str, parameters: Union[_models.ThrottledRequestsInput, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19430,7 +19415,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.Disk, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19614,7 +19599,7 @@ def get_long_running_output(pipeline_response): def _update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.DiskUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19809,7 +19794,7 @@ def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> _model :rtype: ~azure.mgmt.compute.v2019_07_01.models.Disk :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19852,7 +19837,7 @@ def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> _model return deserialized # type: ignore def _delete_initial(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19969,7 +19954,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20044,7 +20029,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Disk"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20111,7 +20096,7 @@ def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20301,7 +20286,7 @@ def get_long_running_output(pipeline_response): ) def _revoke_access_initial(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20428,7 +20413,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, snapshot_name: str, snapshot: Union[_models.Snapshot, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20616,7 +20601,7 @@ def _update_initial( snapshot: Union[_models.SnapshotUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20817,7 +20802,7 @@ def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> _m :rtype: ~azure.mgmt.compute.v2019_07_01.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20860,7 +20845,7 @@ def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> _m return deserialized # type: ignore def _delete_initial(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20977,7 +20962,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21052,7 +21037,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Snapshot"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21119,7 +21104,7 @@ def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21309,7 +21294,7 @@ def get_long_running_output(pipeline_response): ) def _revoke_access_initial(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21440,7 +21425,7 @@ def _create_or_update_initial( disk_encryption_set: Union[_models.DiskEncryptionSet, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21638,7 +21623,7 @@ def _update_initial( disk_encryption_set: Union[_models.DiskEncryptionSetUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21844,7 +21829,7 @@ def get(self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: :rtype: ~azure.mgmt.compute.v2019_07_01.models.DiskEncryptionSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21889,7 +21874,7 @@ def get(self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: def _delete_initial( self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22006,7 +21991,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22081,7 +22066,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.DiskEncryptionSet"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22165,7 +22150,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, gallery_name: str, gallery: Union[_models.Gallery, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22355,7 +22340,7 @@ def _update_initial( gallery: Union[_models.GalleryUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22552,7 +22537,7 @@ def get(self, resource_group_name: str, gallery_name: str, **kwargs: Any) -> _mo :rtype: ~azure.mgmt.compute.v2019_07_01.models.Gallery :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22595,7 +22580,7 @@ def get(self, resource_group_name: str, gallery_name: str, **kwargs: Any) -> _mo return deserialized # type: ignore def _delete_initial(self, resource_group_name: str, gallery_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22710,7 +22695,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.GalleryList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22785,7 +22770,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Gallery"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.GalleryList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22874,7 +22859,7 @@ def _create_or_update_initial( gallery_image: Union[_models.GalleryImage, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23086,7 +23071,7 @@ def _update_initial( gallery_image: Union[_models.GalleryImageUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23305,7 +23290,7 @@ def get( :rtype: ~azure.mgmt.compute.v2019_07_01.models.GalleryImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23351,7 +23336,7 @@ def get( def _delete_initial( self, resource_group_name: str, gallery_name: str, gallery_image_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23478,7 +23463,7 @@ def list_by_gallery( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.GalleryImageList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23570,7 +23555,7 @@ def _create_or_update_initial( gallery_image_version: Union[_models.GalleryImageVersion, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23804,7 +23789,7 @@ def _update_initial( gallery_image_version: Union[_models.GalleryImageVersionUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24060,7 +24045,7 @@ def get( :rtype: ~azure.mgmt.compute.v2019_07_01.models.GalleryImageVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24113,7 +24098,7 @@ def _delete_initial( gallery_image_version_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24255,7 +24240,7 @@ def list_by_gallery_image( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.GalleryImageVersionList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24347,7 +24332,7 @@ def _create_or_update_initial( gallery_application: Union[_models.GalleryApplication, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24563,7 +24548,7 @@ def _update_initial( gallery_application: Union[_models.GalleryApplicationUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24789,7 +24774,7 @@ def get( :rtype: ~azure.mgmt.compute.v2019_07_01.models.GalleryApplication :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24835,7 +24820,7 @@ def get( def _delete_initial( self, resource_group_name: str, gallery_name: str, gallery_application_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24963,7 +24948,7 @@ def list_by_gallery( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.GalleryApplicationList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25055,7 +25040,7 @@ def _create_or_update_initial( gallery_application_version: Union[_models.GalleryApplicationVersion, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25291,7 +25276,7 @@ def _update_initial( gallery_application_version: Union[_models.GalleryApplicationVersionUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25549,7 +25534,7 @@ def get( :rtype: ~azure.mgmt.compute.v2019_07_01.models.GalleryApplicationVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25602,7 +25587,7 @@ def _delete_initial( gallery_application_version_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25745,7 +25730,7 @@ def list_by_gallery_application( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.GalleryApplicationVersionList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25847,7 +25832,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.RunCommandDocu api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-07-01")) cls: ClsType[_models.RunCommandListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25920,7 +25905,7 @@ def get(self, location: str, command_id: str, **kwargs: Any) -> _models.RunComma :rtype: ~azure.mgmt.compute.v2019_07_01.models.RunCommandDocument :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_11_01/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_11_01/__init__.py index 3b1b6244b2375..ab7c46e8991db 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_11_01/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_11_01/__init__.py @@ -5,15 +5,21 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._compute_management_client import ComputeManagementClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._compute_management_client import ComputeManagementClient # 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__ = [ "ComputeManagementClient", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_11_01/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_11_01/_compute_management_client.py index fb27616a1e7f3..4479a66dc990a 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_11_01/_compute_management_client.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_11_01/_compute_management_client.py @@ -21,11 +21,10 @@ from .operations import DiskEncryptionSetsOperations, DisksOperations, SnapshotsOperations if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class ComputeManagementClient: # pylint: disable=client-accepts-api-version-keyword +class ComputeManagementClient: """Compute Client. :ivar disks: DisksOperations operations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_11_01/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_11_01/_configuration.py index c582a6b0af526..1c3d28fee247f 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_11_01/_configuration.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_11_01/_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 ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ComputeManagementClient. Note that all parameters used to create this instance are saved as instance diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_11_01/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_11_01/_version.py index d79b2760319c5..e5754a47ce68f 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_11_01/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_11_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "33.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_11_01/aio/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_11_01/aio/__init__.py index 0715f50185586..d3fd1ba93379a 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_11_01/aio/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_11_01/aio/__init__.py @@ -5,12 +5,18 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._compute_management_client import ComputeManagementClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._compute_management_client import ComputeManagementClient # 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__ = [ "ComputeManagementClient", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_11_01/aio/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_11_01/aio/_compute_management_client.py index aa343e47f4b30..130d2fe1ade11 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_11_01/aio/_compute_management_client.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_11_01/aio/_compute_management_client.py @@ -21,11 +21,10 @@ from .operations import DiskEncryptionSetsOperations, DisksOperations, SnapshotsOperations if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class ComputeManagementClient: # pylint: disable=client-accepts-api-version-keyword +class ComputeManagementClient: """Compute Client. :ivar disks: DisksOperations operations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_11_01/aio/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_11_01/aio/_configuration.py index e21bd1d299066..97e6f8408faf9 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_11_01/aio/_configuration.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_11_01/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 ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ComputeManagementClient. Note that all parameters used to create this instance are saved as instance diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_11_01/aio/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_11_01/aio/operations/__init__.py index 7e3803ff661ca..d699ade8731bb 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_11_01/aio/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_11_01/aio/operations/__init__.py @@ -5,13 +5,19 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._operations import DisksOperations -from ._operations import SnapshotsOperations -from ._operations import DiskEncryptionSetsOperations +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._operations import DisksOperations # type: ignore +from ._operations import SnapshotsOperations # type: ignore +from ._operations import DiskEncryptionSetsOperations # 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__ = [ @@ -19,5 +25,5 @@ "SnapshotsOperations", "DiskEncryptionSetsOperations", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_11_01/aio/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_11_01/aio/operations/_operations.py index 1636ed5b5bcb8..049af07364eb9 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_11_01/aio/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_11_01/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. @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -60,7 +60,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]] @@ -88,7 +88,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.Disk, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -272,7 +272,7 @@ def get_long_running_output(pipeline_response): async def _update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.DiskUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -467,7 +467,7 @@ async def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.compute.v2019_11_01.models.Disk :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -510,7 +510,7 @@ async def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> return deserialized # type: ignore async def _delete_initial(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -627,7 +627,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-11-01")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -702,7 +702,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Disk"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-11-01")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -769,7 +769,7 @@ async def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -964,7 +964,7 @@ def get_long_running_output(pipeline_response): async def _revoke_access_initial( self, resource_group_name: str, disk_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1093,7 +1093,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, snapshot_name: str, snapshot: Union[_models.Snapshot, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1284,7 +1284,7 @@ async def _update_initial( snapshot: Union[_models.SnapshotUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1488,7 +1488,7 @@ async def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) :rtype: ~azure.mgmt.compute.v2019_11_01.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1533,7 +1533,7 @@ async def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) async def _delete_initial( self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1651,7 +1651,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-11-01")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1727,7 +1727,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Snapshot"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-11-01")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1794,7 +1794,7 @@ async def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1989,7 +1989,7 @@ def get_long_running_output(pipeline_response): async def _revoke_access_initial( self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2122,7 +2122,7 @@ async def _create_or_update_initial( disk_encryption_set: Union[_models.DiskEncryptionSet, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2323,7 +2323,7 @@ async def _update_initial( disk_encryption_set: Union[_models.DiskEncryptionSetUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2534,7 +2534,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2019_11_01.models.DiskEncryptionSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2579,7 +2579,7 @@ async def get( async def _delete_initial( self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2701,7 +2701,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-11-01")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2777,7 +2777,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.DiskEncryptionSet"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-11-01")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_11_01/models/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_11_01/models/__init__.py index 3d3c0895519db..e09cc1acf0879 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_11_01/models/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_11_01/models/__init__.py @@ -5,46 +5,57 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._models_py3 import AccessUri -from ._models_py3 import ApiError -from ._models_py3 import ApiErrorBase -from ._models_py3 import CreationData -from ._models_py3 import Disk -from ._models_py3 import DiskEncryptionSet -from ._models_py3 import DiskEncryptionSetList -from ._models_py3 import DiskEncryptionSetUpdate -from ._models_py3 import DiskList -from ._models_py3 import DiskSku -from ._models_py3 import DiskUpdate -from ._models_py3 import Encryption -from ._models_py3 import EncryptionSetIdentity -from ._models_py3 import EncryptionSettingsCollection -from ._models_py3 import EncryptionSettingsElement -from ._models_py3 import GrantAccessData -from ._models_py3 import ImageDiskReference -from ._models_py3 import InnerError -from ._models_py3 import KeyVaultAndKeyReference -from ._models_py3 import KeyVaultAndSecretReference -from ._models_py3 import Resource -from ._models_py3 import ShareInfoElement -from ._models_py3 import Snapshot -from ._models_py3 import SnapshotList -from ._models_py3 import SnapshotSku -from ._models_py3 import SnapshotUpdate -from ._models_py3 import SourceVault +from typing import TYPE_CHECKING -from ._compute_management_client_enums import AccessLevel -from ._compute_management_client_enums import DiskCreateOption -from ._compute_management_client_enums import DiskEncryptionSetIdentityType -from ._compute_management_client_enums import DiskState -from ._compute_management_client_enums import DiskStorageAccountTypes -from ._compute_management_client_enums import EncryptionType -from ._compute_management_client_enums import HyperVGeneration -from ._compute_management_client_enums import OperatingSystemTypes -from ._compute_management_client_enums import SnapshotStorageAccountTypes +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + + +from ._models_py3 import ( # type: ignore + AccessUri, + ApiError, + ApiErrorBase, + CreationData, + Disk, + DiskEncryptionSet, + DiskEncryptionSetList, + DiskEncryptionSetUpdate, + DiskList, + DiskSku, + DiskUpdate, + Encryption, + EncryptionSetIdentity, + EncryptionSettingsCollection, + EncryptionSettingsElement, + GrantAccessData, + ImageDiskReference, + InnerError, + KeyVaultAndKeyReference, + KeyVaultAndSecretReference, + Resource, + ShareInfoElement, + Snapshot, + SnapshotList, + SnapshotSku, + SnapshotUpdate, + SourceVault, +) + +from ._compute_management_client_enums import ( # type: ignore + AccessLevel, + DiskCreateOption, + DiskEncryptionSetIdentityType, + DiskState, + DiskStorageAccountTypes, + EncryptionType, + HyperVGeneration, + OperatingSystemTypes, + SnapshotStorageAccountTypes, +) 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__ = [ @@ -85,5 +96,5 @@ "OperatingSystemTypes", "SnapshotStorageAccountTypes", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_11_01/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_11_01/models/_models_py3.py index 6b0f31ae3e376..5747a609c5d35 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_11_01/models/_models_py3.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_11_01/models/_models_py3.py @@ -1,5 +1,5 @@ -# 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. @@ -12,7 +12,6 @@ from ... import _serialization if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models @@ -274,7 +273,7 @@ def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kw self.tags = tags -class Disk(Resource): # pylint: disable=too-many-instance-attributes +class Disk(Resource): """Disk resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -708,7 +707,7 @@ def __init__(self, *, name: Optional[Union[str, "_models.DiskStorageAccountTypes self.tier = None -class DiskUpdate(_serialization.Model): # pylint: disable=too-many-instance-attributes +class DiskUpdate(_serialization.Model): """Disk update resource. :ivar tags: Resource tags. @@ -1195,7 +1194,7 @@ def __init__(self, **kwargs: Any) -> None: self.vm_uri = None -class Snapshot(Resource): # pylint: disable=too-many-instance-attributes +class Snapshot(Resource): """Snapshot resource. Variables are only populated by the server, and will be ignored when sending a request. diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_11_01/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_11_01/operations/__init__.py index 7e3803ff661ca..d699ade8731bb 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_11_01/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_11_01/operations/__init__.py @@ -5,13 +5,19 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._operations import DisksOperations -from ._operations import SnapshotsOperations -from ._operations import DiskEncryptionSetsOperations +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._operations import DisksOperations # type: ignore +from ._operations import SnapshotsOperations # type: ignore +from ._operations import DiskEncryptionSetsOperations # 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__ = [ @@ -19,5 +25,5 @@ "SnapshotsOperations", "DiskEncryptionSetsOperations", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_11_01/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_11_01/operations/_operations.py index 214ff1f13aded..899a6c753d1e0 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_11_01/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_11_01/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. @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -36,7 +36,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, HttpResponse], T, Dict[str, Any]], Any]] @@ -725,7 +725,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.Disk, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -909,7 +909,7 @@ def get_long_running_output(pipeline_response): def _update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.DiskUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1104,7 +1104,7 @@ def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> _model :rtype: ~azure.mgmt.compute.v2019_11_01.models.Disk :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1147,7 +1147,7 @@ def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> _model return deserialized # type: ignore def _delete_initial(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1264,7 +1264,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-11-01")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1339,7 +1339,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Disk"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-11-01")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1406,7 +1406,7 @@ def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1596,7 +1596,7 @@ def get_long_running_output(pipeline_response): ) def _revoke_access_initial(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1723,7 +1723,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, snapshot_name: str, snapshot: Union[_models.Snapshot, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1911,7 +1911,7 @@ def _update_initial( snapshot: Union[_models.SnapshotUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2112,7 +2112,7 @@ def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> _m :rtype: ~azure.mgmt.compute.v2019_11_01.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2155,7 +2155,7 @@ def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> _m return deserialized # type: ignore def _delete_initial(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2272,7 +2272,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-11-01")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2347,7 +2347,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Snapshot"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-11-01")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2414,7 +2414,7 @@ def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2604,7 +2604,7 @@ def get_long_running_output(pipeline_response): ) def _revoke_access_initial(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2735,7 +2735,7 @@ def _create_or_update_initial( disk_encryption_set: Union[_models.DiskEncryptionSet, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2933,7 +2933,7 @@ def _update_initial( disk_encryption_set: Union[_models.DiskEncryptionSetUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3139,7 +3139,7 @@ def get(self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: :rtype: ~azure.mgmt.compute.v2019_11_01.models.DiskEncryptionSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3184,7 +3184,7 @@ def get(self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: def _delete_initial( self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3301,7 +3301,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-11-01")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3376,7 +3376,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.DiskEncryptionSet"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-11-01")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_12_01/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_12_01/__init__.py index 3b1b6244b2375..ab7c46e8991db 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_12_01/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_12_01/__init__.py @@ -5,15 +5,21 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._compute_management_client import ComputeManagementClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._compute_management_client import ComputeManagementClient # 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__ = [ "ComputeManagementClient", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_12_01/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_12_01/_compute_management_client.py index 78d14a98e61d7..33b3e2e11be73 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_12_01/_compute_management_client.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_12_01/_compute_management_client.py @@ -47,11 +47,10 @@ ) if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class ComputeManagementClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes +class ComputeManagementClient: # pylint: disable=too-many-instance-attributes """Compute Client. :ivar operations: Operations operations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_12_01/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_12_01/_configuration.py index ba9c2d0736b8b..79ff481ff18a2 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_12_01/_configuration.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_12_01/_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 ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ComputeManagementClient. Note that all parameters used to create this instance are saved as instance diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_12_01/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_12_01/_version.py index d79b2760319c5..e5754a47ce68f 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_12_01/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_12_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "33.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_12_01/aio/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_12_01/aio/__init__.py index 0715f50185586..d3fd1ba93379a 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_12_01/aio/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_12_01/aio/__init__.py @@ -5,12 +5,18 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._compute_management_client import ComputeManagementClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._compute_management_client import ComputeManagementClient # 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__ = [ "ComputeManagementClient", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_12_01/aio/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_12_01/aio/_compute_management_client.py index 2192452557423..53acd83300e4e 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_12_01/aio/_compute_management_client.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_12_01/aio/_compute_management_client.py @@ -47,11 +47,10 @@ ) if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class ComputeManagementClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes +class ComputeManagementClient: # pylint: disable=too-many-instance-attributes """Compute Client. :ivar operations: Operations operations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_12_01/aio/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_12_01/aio/_configuration.py index be4ddefc1a5c9..4e590f8abf0e8 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_12_01/aio/_configuration.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_12_01/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 ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ComputeManagementClient. Note that all parameters used to create this instance are saved as instance diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_12_01/aio/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_12_01/aio/operations/__init__.py index e4e93e2f77344..b79bc7bf31046 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_12_01/aio/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_12_01/aio/operations/__init__.py @@ -5,35 +5,41 @@ # Code generated by Microsoft (R) AutoRest 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 AvailabilitySetsOperations -from ._operations import ProximityPlacementGroupsOperations -from ._operations import DedicatedHostGroupsOperations -from ._operations import DedicatedHostsOperations -from ._operations import SshPublicKeysOperations -from ._operations import VirtualMachineExtensionImagesOperations -from ._operations import VirtualMachineExtensionsOperations -from ._operations import VirtualMachineImagesOperations -from ._operations import UsageOperations -from ._operations import VirtualMachinesOperations -from ._operations import VirtualMachineSizesOperations -from ._operations import ImagesOperations -from ._operations import VirtualMachineScaleSetsOperations -from ._operations import VirtualMachineScaleSetExtensionsOperations -from ._operations import VirtualMachineScaleSetRollingUpgradesOperations -from ._operations import VirtualMachineScaleSetVMExtensionsOperations -from ._operations import VirtualMachineScaleSetVMsOperations -from ._operations import LogAnalyticsOperations -from ._operations import VirtualMachineRunCommandsOperations -from ._operations import GalleriesOperations -from ._operations import GalleryImagesOperations -from ._operations import GalleryImageVersionsOperations -from ._operations import GalleryApplicationsOperations -from ._operations import GalleryApplicationVersionsOperations +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 AvailabilitySetsOperations # type: ignore +from ._operations import ProximityPlacementGroupsOperations # type: ignore +from ._operations import DedicatedHostGroupsOperations # type: ignore +from ._operations import DedicatedHostsOperations # type: ignore +from ._operations import SshPublicKeysOperations # type: ignore +from ._operations import VirtualMachineExtensionImagesOperations # type: ignore +from ._operations import VirtualMachineExtensionsOperations # type: ignore +from ._operations import VirtualMachineImagesOperations # type: ignore +from ._operations import UsageOperations # type: ignore +from ._operations import VirtualMachinesOperations # type: ignore +from ._operations import VirtualMachineSizesOperations # type: ignore +from ._operations import ImagesOperations # type: ignore +from ._operations import VirtualMachineScaleSetsOperations # type: ignore +from ._operations import VirtualMachineScaleSetExtensionsOperations # type: ignore +from ._operations import VirtualMachineScaleSetRollingUpgradesOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMExtensionsOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMsOperations # type: ignore +from ._operations import LogAnalyticsOperations # type: ignore +from ._operations import VirtualMachineRunCommandsOperations # type: ignore +from ._operations import GalleriesOperations # type: ignore +from ._operations import GalleryImagesOperations # type: ignore +from ._operations import GalleryImageVersionsOperations # type: ignore +from ._operations import GalleryApplicationsOperations # type: ignore +from ._operations import GalleryApplicationVersionsOperations # 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__ = [ @@ -63,5 +69,5 @@ "GalleryApplicationsOperations", "GalleryApplicationVersionsOperations", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_12_01/aio/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_12_01/aio/operations/_operations.py index 38c5bff092ba9..bb3d277ba2dca 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_12_01/aio/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_12_01/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. @@ -18,7 +18,6 @@ List, Literal, Optional, - Type, TypeVar, Union, cast, @@ -209,7 +208,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]] @@ -250,7 +249,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.ComputeOperationValue"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.ComputeOperationListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -403,7 +402,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2019_12_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -530,7 +529,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2019_12_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -585,9 +584,7 @@ async def update( return deserialized # type: ignore @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, availability_set_name: str, **kwargs: Any - ) -> None: + async def delete(self, resource_group_name: str, availability_set_name: str, **kwargs: Any) -> None: """Delete an availability set. :param resource_group_name: The name of the resource group. Required. @@ -598,7 +595,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -648,7 +645,7 @@ async def get(self, resource_group_name: str, availability_set_name: str, **kwar :rtype: ~azure.mgmt.compute.v2019_12_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -710,7 +707,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -788,7 +785,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -871,7 +868,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1029,7 +1026,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2019_12_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1159,7 +1156,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2019_12_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1214,9 +1211,7 @@ async def update( return deserialized # type: ignore @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, proximity_placement_group_name: str, **kwargs: Any - ) -> None: + async def delete(self, resource_group_name: str, proximity_placement_group_name: str, **kwargs: Any) -> None: """Delete a proximity placement group. :param resource_group_name: The name of the resource group. Required. @@ -1227,7 +1222,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1287,7 +1282,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2019_12_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1346,7 +1341,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Proximit api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1426,7 +1421,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1587,7 +1582,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2019_12_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1714,7 +1709,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2019_12_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1769,9 +1764,7 @@ async def update( return deserialized # type: ignore @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, host_group_name: str, **kwargs: Any - ) -> None: + async def delete(self, resource_group_name: str, host_group_name: str, **kwargs: Any) -> None: """Delete a dedicated host group. :param resource_group_name: The name of the resource group. Required. @@ -1782,7 +1775,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1832,7 +1825,7 @@ async def get(self, resource_group_name: str, host_group_name: str, **kwargs: An :rtype: ~azure.mgmt.compute.v2019_12_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1894,7 +1887,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1971,7 +1964,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Dedicate api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2060,7 +2053,7 @@ async def _create_or_update_initial( parameters: Union[_models.DedicatedHost, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2264,7 +2257,7 @@ async def _update_initial( parameters: Union[_models.DedicatedHostUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2463,7 +2456,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2593,7 +2586,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2019_12_01.models.DedicatedHost :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2659,7 +2652,7 @@ def list_by_host_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.DedicatedHostListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2759,7 +2752,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.SshPubli api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2840,7 +2833,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2974,7 +2967,7 @@ async def create( :rtype: ~azure.mgmt.compute.v2019_12_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3102,7 +3095,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2019_12_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3157,9 +3150,7 @@ async def update( return deserialized # type: ignore @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, ssh_public_key_name: str, **kwargs: Any - ) -> None: + async def delete(self, resource_group_name: str, ssh_public_key_name: str, **kwargs: Any) -> None: """Delete an SSH public key. :param resource_group_name: The name of the resource group. Required. @@ -3170,7 +3161,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3222,7 +3213,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2019_12_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3280,7 +3271,7 @@ async def generate_key_pair( :rtype: ~azure.mgmt.compute.v2019_12_01.models.SshPublicKeyGenerateKeyPairResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3361,7 +3352,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2019_12_01.models.VirtualMachineExtensionImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3419,7 +3410,7 @@ async def list_types( :rtype: list[~azure.mgmt.compute.v2019_12_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3491,7 +3482,7 @@ async def list_versions( :rtype: list[~azure.mgmt.compute.v2019_12_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3566,7 +3557,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineExtension, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3776,7 +3767,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineExtensionUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3982,7 +3973,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_name: str, vm_extension_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4112,7 +4103,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2019_12_01.models.VirtualMachineExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4172,7 +4163,7 @@ async def list( :rtype: ~azure.mgmt.compute.v2019_12_01.models.VirtualMachineExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4256,7 +4247,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2019_12_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4335,7 +4326,7 @@ async def list( :rtype: list[~azure.mgmt.compute.v2019_12_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4396,7 +4387,7 @@ async def list_offers( :rtype: list[~azure.mgmt.compute.v2019_12_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4448,7 +4439,7 @@ async def list_publishers(self, location: str, **kwargs: Any) -> List[_models.Vi :rtype: list[~azure.mgmt.compute.v2019_12_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4505,7 +4496,7 @@ async def list_skus( :rtype: list[~azure.mgmt.compute.v2019_12_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4586,7 +4577,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.Usage"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.ListUsagesResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4686,7 +4677,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> AsyncIterable["_mode api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4754,7 +4745,7 @@ async def _capture_initial( parameters: Union[_models.VirtualMachineCaptureParameters, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4952,7 +4943,7 @@ async def _create_or_update_initial( parameters: Union[_models.VirtualMachine, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5147,7 +5138,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5333,7 +5324,7 @@ def get_long_running_output(pipeline_response): ) async def _delete_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5449,7 +5440,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2019_12_01.models.VirtualMachine :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5506,7 +5497,7 @@ async def instance_view( :rtype: ~azure.mgmt.compute.v2019_12_01.models.VirtualMachineInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5551,7 +5542,7 @@ async def instance_view( async def _convert_to_managed_disks_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5658,7 +5649,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _deallocate_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5759,9 +5750,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace_async - async def generalize( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, vm_name: str, **kwargs: Any - ) -> None: + async def generalize(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> None: """Sets the OS state of the virtual machine to generalized. It is recommended to sysprep the virtual machine before performing this operation. :code:`
`For Windows, please refer to `Create a managed image of a generalized VM in Azure @@ -5777,7 +5766,7 @@ async def generalize( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5833,7 +5822,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5913,7 +5902,7 @@ def list_all(self, *, status_only: Optional[str] = None, **kwargs: Any) -> Async api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5996,7 +5985,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6061,7 +6050,7 @@ async def get_next(next_link=None): async def _power_off_initial( self, resource_group_name: str, vm_name: str, *, skip_shutdown: bool = False, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6170,7 +6159,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _reapply_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6270,7 +6259,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _restart_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6370,7 +6359,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _start_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6470,7 +6459,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _redeploy_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6576,7 +6565,7 @@ async def _reimage_initial( parameters: Optional[Union[_models.VirtualMachineReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6760,7 +6749,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _perform_maintenance_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6863,9 +6852,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace_async - async def simulate_eviction( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, vm_name: str, **kwargs: Any - ) -> None: + async def simulate_eviction(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> None: """The operation to simulate the eviction of spot virtual machine. The eviction will occur within 30 minutes of calling the API. @@ -6877,7 +6864,7 @@ async def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6922,7 +6909,7 @@ async def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7148,7 +7135,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.VirtualMa api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7233,7 +7220,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, image_name: str, parameters: Union[_models.Image, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7415,7 +7402,7 @@ async def _update_initial( parameters: Union[_models.ImageUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7595,7 +7582,7 @@ def get_long_running_output(pipeline_response): ) async def _delete_initial(self, resource_group_name: str, image_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7710,7 +7697,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2019_12_01.models.Image :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7769,7 +7756,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7845,7 +7832,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Image"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7933,7 +7920,7 @@ async def _create_or_update_initial( parameters: Union[_models.VirtualMachineScaleSet, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8125,7 +8112,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineScaleSetUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8314,7 +8301,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8429,7 +8416,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2019_12_01.models.VirtualMachineScaleSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8478,7 +8465,7 @@ async def _deallocate_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8673,7 +8660,7 @@ async def _delete_instances_initial( vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8866,7 +8853,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2019_12_01.models.VirtualMachineScaleSetInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8926,7 +8913,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9005,7 +8992,7 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.VirtualMachineScaleS api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.VirtualMachineScaleSetListWithLinkResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9088,7 +9075,7 @@ def list_skus( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.VirtualMachineScaleSetListSkusResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9154,6 +9141,7 @@ async def get_next(next_link=None): def get_os_upgrade_history( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> AsyncIterable["_models.UpgradeOperationHistoricalStatusInfo"]: + # pylint: disable=line-too-long """Gets list of OS upgrades on a VM scale set instance. :param resource_group_name: The name of the resource group. Required. @@ -9172,7 +9160,7 @@ def get_os_upgrade_history( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.VirtualMachineScaleSetListOSUpgradeHistory] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9243,7 +9231,7 @@ async def _power_off_initial( skip_shutdown: bool = False, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9456,7 +9444,7 @@ async def _restart_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9645,7 +9633,7 @@ async def _start_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9834,7 +9822,7 @@ async def _redeploy_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10026,7 +10014,7 @@ async def _perform_maintenance_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10224,7 +10212,7 @@ async def _update_instances_initial( vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10410,7 +10398,7 @@ async def _reimage_initial( vm_scale_set_reimage_input: Optional[Union[_models.VirtualMachineScaleSetReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10603,7 +10591,7 @@ async def _reimage_all_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10806,7 +10794,7 @@ async def force_recovery_service_fabric_platform_update_domain_walk( # pylint: :rtype: ~azure.mgmt.compute.v2019_12_01.models.RecoveryWalkResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10850,7 +10838,7 @@ async def force_recovery_service_fabric_platform_update_domain_walk( # pylint: return deserialized # type: ignore @overload - async def convert_to_single_placement_group( # pylint: disable=inconsistent-return-statements + async def convert_to_single_placement_group( self, resource_group_name: str, vm_scale_set_name: str, @@ -10878,7 +10866,7 @@ async def convert_to_single_placement_group( # pylint: disable=inconsistent-ret """ @overload - async def convert_to_single_placement_group( # pylint: disable=inconsistent-return-statements + async def convert_to_single_placement_group( self, resource_group_name: str, vm_scale_set_name: str, @@ -10905,7 +10893,7 @@ async def convert_to_single_placement_group( # pylint: disable=inconsistent-ret """ @distributed_trace_async - async def convert_to_single_placement_group( # pylint: disable=inconsistent-return-statements + async def convert_to_single_placement_group( self, resource_group_name: str, vm_scale_set_name: str, @@ -10928,7 +10916,7 @@ async def convert_to_single_placement_group( # pylint: disable=inconsistent-ret :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10985,7 +10973,7 @@ async def _set_orchestration_service_state_initial( parameters: Union[_models.OrchestrationServiceStateInput, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11193,7 +11181,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtension, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11404,7 +11392,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtensionUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11611,7 +11599,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, vmss_extension_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11741,7 +11729,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2019_12_01.models.VirtualMachineScaleSetExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11807,7 +11795,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.VirtualMachineScaleSetExtensionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11893,7 +11881,7 @@ def __init__(self, *args, **kwargs) -> None: async def _cancel_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11997,7 +11985,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_os_upgrade_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12103,7 +12091,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_extension_upgrade_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12220,7 +12208,7 @@ async def get_latest( :rtype: ~azure.mgmt.compute.v2019_12_01.models.RollingUpgradeStatusInfo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12292,7 +12280,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineExtension, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12511,7 +12499,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineExtensionUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12725,7 +12713,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, vm_extension_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12861,7 +12849,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2019_12_01.models.VirtualMachineExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12930,7 +12918,7 @@ async def list( :rtype: ~azure.mgmt.compute.v2019_12_01.models.VirtualMachineExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13005,7 +12993,7 @@ async def _reimage_initial( ] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13204,7 +13192,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _reimage_all_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13313,7 +13301,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _deallocate_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13428,7 +13416,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineScaleSetVM, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13632,7 +13620,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13762,7 +13750,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2019_12_01.models.VirtualMachineScaleSetVM :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13822,7 +13810,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2019_12_01.models.VirtualMachineScaleSetVMInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13904,7 +13892,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.VirtualMachineScaleSetVMListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13978,7 +13966,7 @@ async def _power_off_initial( skip_shutdown: bool = False, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14100,7 +14088,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _restart_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14208,7 +14196,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14316,7 +14304,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _redeploy_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14425,7 +14413,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _perform_maintenance_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14532,7 +14520,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace_async - async def simulate_eviction( # pylint: disable=inconsistent-return-statements + async def simulate_eviction( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: """The operation to simulate the eviction of spot virtual machine in a VM scale set. The eviction @@ -14548,7 +14536,7 @@ async def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14595,7 +14583,7 @@ async def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14817,7 +14805,7 @@ def __init__(self, *args, **kwargs) -> None: async def _export_request_rate_by_interval_initial( self, location: str, parameters: Union[_models.RequestRateByIntervalInput, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14995,7 +14983,7 @@ def get_long_running_output(pipeline_response): async def _export_throttled_requests_initial( self, location: str, parameters: Union[_models.ThrottledRequestsInput, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15206,7 +15194,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.RunComman api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.RunCommandListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15279,7 +15267,7 @@ async def get(self, location: str, command_id: str, **kwargs: Any) -> _models.Ru :rtype: ~azure.mgmt.compute.v2019_12_01.models.RunCommandDocument :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15345,7 +15333,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, gallery_name: str, gallery: Union[_models.Gallery, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15538,7 +15526,7 @@ async def _update_initial( gallery: Union[_models.GalleryUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15738,7 +15726,7 @@ async def get(self, resource_group_name: str, gallery_name: str, **kwargs: Any) :rtype: ~azure.mgmt.compute.v2019_12_01.models.Gallery :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15781,7 +15769,7 @@ async def get(self, resource_group_name: str, gallery_name: str, **kwargs: Any) return deserialized # type: ignore async def _delete_initial(self, resource_group_name: str, gallery_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15896,7 +15884,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.GalleryList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15971,7 +15959,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Gallery"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.GalleryList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16060,7 +16048,7 @@ async def _create_or_update_initial( gallery_image: Union[_models.GalleryImage, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16272,7 +16260,7 @@ async def _update_initial( gallery_image: Union[_models.GalleryImageUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16491,7 +16479,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2019_12_01.models.GalleryImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16537,7 +16525,7 @@ async def get( async def _delete_initial( self, resource_group_name: str, gallery_name: str, gallery_image_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16665,7 +16653,7 @@ def list_by_gallery( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.GalleryImageList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16757,7 +16745,7 @@ async def _create_or_update_initial( gallery_image_version: Union[_models.GalleryImageVersion, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16991,7 +16979,7 @@ async def _update_initial( gallery_image_version: Union[_models.GalleryImageVersionUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17247,7 +17235,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2019_12_01.models.GalleryImageVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17300,7 +17288,7 @@ async def _delete_initial( gallery_image_version_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17442,7 +17430,7 @@ def list_by_gallery_image( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.GalleryImageVersionList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17534,7 +17522,7 @@ async def _create_or_update_initial( gallery_application: Union[_models.GalleryApplication, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17750,7 +17738,7 @@ async def _update_initial( gallery_application: Union[_models.GalleryApplicationUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17976,7 +17964,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2019_12_01.models.GalleryApplication :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18022,7 +18010,7 @@ async def get( async def _delete_initial( self, resource_group_name: str, gallery_name: str, gallery_application_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18151,7 +18139,7 @@ def list_by_gallery( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.GalleryApplicationList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18243,7 +18231,7 @@ async def _create_or_update_initial( gallery_application_version: Union[_models.GalleryApplicationVersion, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18479,7 +18467,7 @@ async def _update_initial( gallery_application_version: Union[_models.GalleryApplicationVersionUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18737,7 +18725,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2019_12_01.models.GalleryApplicationVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18790,7 +18778,7 @@ async def _delete_initial( gallery_application_version_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18933,7 +18921,7 @@ def list_by_gallery_application( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.GalleryApplicationVersionList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_12_01/models/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_12_01/models/__init__.py index 2d5be0ca02d17..4a81e1c71bab9 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_12_01/models/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_12_01/models/__init__.py @@ -5,270 +5,281 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._models_py3 import AdditionalCapabilities -from ._models_py3 import AdditionalUnattendContent -from ._models_py3 import ApiEntityReference -from ._models_py3 import ApiError -from ._models_py3 import ApiErrorBase -from ._models_py3 import AutomaticOSUpgradePolicy -from ._models_py3 import AutomaticOSUpgradeProperties -from ._models_py3 import AutomaticRepairsPolicy -from ._models_py3 import AvailabilitySet -from ._models_py3 import AvailabilitySetListResult -from ._models_py3 import AvailabilitySetUpdate -from ._models_py3 import BillingProfile -from ._models_py3 import BootDiagnostics -from ._models_py3 import BootDiagnosticsInstanceView -from ._models_py3 import ComputeOperationListResult -from ._models_py3 import ComputeOperationValue -from ._models_py3 import DataDisk -from ._models_py3 import DataDiskImage -from ._models_py3 import DataDiskImageEncryption -from ._models_py3 import DedicatedHost -from ._models_py3 import DedicatedHostAllocatableVM -from ._models_py3 import DedicatedHostAvailableCapacity -from ._models_py3 import DedicatedHostGroup -from ._models_py3 import DedicatedHostGroupListResult -from ._models_py3 import DedicatedHostGroupUpdate -from ._models_py3 import DedicatedHostInstanceView -from ._models_py3 import DedicatedHostListResult -from ._models_py3 import DedicatedHostUpdate -from ._models_py3 import DiagnosticsProfile -from ._models_py3 import DiffDiskSettings -from ._models_py3 import Disallowed -from ._models_py3 import DiskEncryptionSetParameters -from ._models_py3 import DiskEncryptionSettings -from ._models_py3 import DiskImageEncryption -from ._models_py3 import DiskInstanceView -from ._models_py3 import EncryptionImages -from ._models_py3 import Gallery -from ._models_py3 import GalleryApplication -from ._models_py3 import GalleryApplicationList -from ._models_py3 import GalleryApplicationUpdate -from ._models_py3 import GalleryApplicationVersion -from ._models_py3 import GalleryApplicationVersionList -from ._models_py3 import GalleryApplicationVersionPublishingProfile -from ._models_py3 import GalleryApplicationVersionUpdate -from ._models_py3 import GalleryArtifactPublishingProfileBase -from ._models_py3 import GalleryArtifactSource -from ._models_py3 import GalleryArtifactVersionSource -from ._models_py3 import GalleryDataDiskImage -from ._models_py3 import GalleryDiskImage -from ._models_py3 import GalleryIdentifier -from ._models_py3 import GalleryImage -from ._models_py3 import GalleryImageIdentifier -from ._models_py3 import GalleryImageList -from ._models_py3 import GalleryImageUpdate -from ._models_py3 import GalleryImageVersion -from ._models_py3 import GalleryImageVersionList -from ._models_py3 import GalleryImageVersionPublishingProfile -from ._models_py3 import GalleryImageVersionStorageProfile -from ._models_py3 import GalleryImageVersionUpdate -from ._models_py3 import GalleryList -from ._models_py3 import GalleryOSDiskImage -from ._models_py3 import GalleryUpdate -from ._models_py3 import HardwareProfile -from ._models_py3 import Image -from ._models_py3 import ImageDataDisk -from ._models_py3 import ImageDisk -from ._models_py3 import ImageListResult -from ._models_py3 import ImageOSDisk -from ._models_py3 import ImagePurchasePlan -from ._models_py3 import ImageReference -from ._models_py3 import ImageStorageProfile -from ._models_py3 import ImageUpdate -from ._models_py3 import InnerError -from ._models_py3 import InstanceViewStatus -from ._models_py3 import KeyVaultKeyReference -from ._models_py3 import KeyVaultSecretReference -from ._models_py3 import LinuxConfiguration -from ._models_py3 import ListUsagesResult -from ._models_py3 import LogAnalyticsInputBase -from ._models_py3 import LogAnalyticsOperationResult -from ._models_py3 import LogAnalyticsOutput -from ._models_py3 import MaintenanceRedeployStatus -from ._models_py3 import ManagedArtifact -from ._models_py3 import ManagedDiskParameters -from ._models_py3 import NetworkInterfaceReference -from ._models_py3 import NetworkProfile -from ._models_py3 import OSDisk -from ._models_py3 import OSDiskImage -from ._models_py3 import OSDiskImageEncryption -from ._models_py3 import OSProfile -from ._models_py3 import OrchestrationServiceStateInput -from ._models_py3 import OrchestrationServiceSummary -from ._models_py3 import Plan -from ._models_py3 import ProximityPlacementGroup -from ._models_py3 import ProximityPlacementGroupListResult -from ._models_py3 import ProximityPlacementGroupUpdate -from ._models_py3 import PurchasePlan -from ._models_py3 import RecommendedMachineConfiguration -from ._models_py3 import RecoveryWalkResponse -from ._models_py3 import RegionalReplicationStatus -from ._models_py3 import ReplicationStatus -from ._models_py3 import RequestRateByIntervalInput -from ._models_py3 import Resource -from ._models_py3 import ResourceRange -from ._models_py3 import RollbackStatusInfo -from ._models_py3 import RollingUpgradePolicy -from ._models_py3 import RollingUpgradeProgressInfo -from ._models_py3 import RollingUpgradeRunningStatus -from ._models_py3 import RollingUpgradeStatusInfo -from ._models_py3 import RunCommandDocument -from ._models_py3 import RunCommandDocumentBase -from ._models_py3 import RunCommandInput -from ._models_py3 import RunCommandInputParameter -from ._models_py3 import RunCommandListResult -from ._models_py3 import RunCommandParameterDefinition -from ._models_py3 import RunCommandResult -from ._models_py3 import ScaleInPolicy -from ._models_py3 import ScheduledEventsProfile -from ._models_py3 import Sku -from ._models_py3 import SshConfiguration -from ._models_py3 import SshPublicKey -from ._models_py3 import SshPublicKeyGenerateKeyPairResult -from ._models_py3 import SshPublicKeyResource -from ._models_py3 import SshPublicKeyUpdateResource -from ._models_py3 import SshPublicKeysGroupListResult -from ._models_py3 import StorageProfile -from ._models_py3 import SubResource -from ._models_py3 import SubResourceReadOnly -from ._models_py3 import SubResourceWithColocationStatus -from ._models_py3 import TargetRegion -from ._models_py3 import TerminateNotificationProfile -from ._models_py3 import ThrottledRequestsInput -from ._models_py3 import UpdateResource -from ._models_py3 import UpdateResourceDefinition -from ._models_py3 import UpgradeOperationHistoricalStatusInfo -from ._models_py3 import UpgradeOperationHistoricalStatusInfoProperties -from ._models_py3 import UpgradeOperationHistoryStatus -from ._models_py3 import UpgradePolicy -from ._models_py3 import Usage -from ._models_py3 import UsageName -from ._models_py3 import UserArtifactManage -from ._models_py3 import UserArtifactSource -from ._models_py3 import UserAssignedIdentitiesValue -from ._models_py3 import VMScaleSetConvertToSinglePlacementGroupInput -from ._models_py3 import VaultCertificate -from ._models_py3 import VaultSecretGroup -from ._models_py3 import VirtualHardDisk -from ._models_py3 import VirtualMachine -from ._models_py3 import VirtualMachineAgentInstanceView -from ._models_py3 import VirtualMachineCaptureParameters -from ._models_py3 import VirtualMachineCaptureResult -from ._models_py3 import VirtualMachineExtension -from ._models_py3 import VirtualMachineExtensionHandlerInstanceView -from ._models_py3 import VirtualMachineExtensionImage -from ._models_py3 import VirtualMachineExtensionInstanceView -from ._models_py3 import VirtualMachineExtensionUpdate -from ._models_py3 import VirtualMachineExtensionsListResult -from ._models_py3 import VirtualMachineHealthStatus -from ._models_py3 import VirtualMachineIdentity -from ._models_py3 import VirtualMachineImage -from ._models_py3 import VirtualMachineImageResource -from ._models_py3 import VirtualMachineInstanceView -from ._models_py3 import VirtualMachineListResult -from ._models_py3 import VirtualMachineReimageParameters -from ._models_py3 import VirtualMachineScaleSet -from ._models_py3 import VirtualMachineScaleSetDataDisk -from ._models_py3 import VirtualMachineScaleSetExtension -from ._models_py3 import VirtualMachineScaleSetExtensionListResult -from ._models_py3 import VirtualMachineScaleSetExtensionProfile -from ._models_py3 import VirtualMachineScaleSetExtensionUpdate -from ._models_py3 import VirtualMachineScaleSetIPConfiguration -from ._models_py3 import VirtualMachineScaleSetIdentity -from ._models_py3 import VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue -from ._models_py3 import VirtualMachineScaleSetInstanceView -from ._models_py3 import VirtualMachineScaleSetInstanceViewStatusesSummary -from ._models_py3 import VirtualMachineScaleSetIpTag -from ._models_py3 import VirtualMachineScaleSetListOSUpgradeHistory -from ._models_py3 import VirtualMachineScaleSetListResult -from ._models_py3 import VirtualMachineScaleSetListSkusResult -from ._models_py3 import VirtualMachineScaleSetListWithLinkResult -from ._models_py3 import VirtualMachineScaleSetManagedDiskParameters -from ._models_py3 import VirtualMachineScaleSetNetworkConfiguration -from ._models_py3 import VirtualMachineScaleSetNetworkConfigurationDnsSettings -from ._models_py3 import VirtualMachineScaleSetNetworkProfile -from ._models_py3 import VirtualMachineScaleSetOSDisk -from ._models_py3 import VirtualMachineScaleSetOSProfile -from ._models_py3 import VirtualMachineScaleSetPublicIPAddressConfiguration -from ._models_py3 import VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings -from ._models_py3 import VirtualMachineScaleSetReimageParameters -from ._models_py3 import VirtualMachineScaleSetSku -from ._models_py3 import VirtualMachineScaleSetSkuCapacity -from ._models_py3 import VirtualMachineScaleSetStorageProfile -from ._models_py3 import VirtualMachineScaleSetUpdate -from ._models_py3 import VirtualMachineScaleSetUpdateIPConfiguration -from ._models_py3 import VirtualMachineScaleSetUpdateNetworkConfiguration -from ._models_py3 import VirtualMachineScaleSetUpdateNetworkProfile -from ._models_py3 import VirtualMachineScaleSetUpdateOSDisk -from ._models_py3 import VirtualMachineScaleSetUpdateOSProfile -from ._models_py3 import VirtualMachineScaleSetUpdatePublicIPAddressConfiguration -from ._models_py3 import VirtualMachineScaleSetUpdateStorageProfile -from ._models_py3 import VirtualMachineScaleSetUpdateVMProfile -from ._models_py3 import VirtualMachineScaleSetVM -from ._models_py3 import VirtualMachineScaleSetVMExtensionsSummary -from ._models_py3 import VirtualMachineScaleSetVMInstanceIDs -from ._models_py3 import VirtualMachineScaleSetVMInstanceRequiredIDs -from ._models_py3 import VirtualMachineScaleSetVMInstanceView -from ._models_py3 import VirtualMachineScaleSetVMListResult -from ._models_py3 import VirtualMachineScaleSetVMNetworkProfileConfiguration -from ._models_py3 import VirtualMachineScaleSetVMProfile -from ._models_py3 import VirtualMachineScaleSetVMProtectionPolicy -from ._models_py3 import VirtualMachineScaleSetVMReimageParameters -from ._models_py3 import VirtualMachineSize -from ._models_py3 import VirtualMachineSizeListResult -from ._models_py3 import VirtualMachineStatusCodeCount -from ._models_py3 import VirtualMachineUpdate -from ._models_py3 import WinRMConfiguration -from ._models_py3 import WinRMListener -from ._models_py3 import WindowsConfiguration +from typing import TYPE_CHECKING -from ._compute_management_client_enums import AggregatedReplicationState -from ._compute_management_client_enums import AvailabilitySetSkuTypes -from ._compute_management_client_enums import CachingTypes -from ._compute_management_client_enums import DedicatedHostLicenseTypes -from ._compute_management_client_enums import DiffDiskOptions -from ._compute_management_client_enums import DiffDiskPlacement -from ._compute_management_client_enums import DiskCreateOptionTypes -from ._compute_management_client_enums import GalleryApplicationVersionPropertiesProvisioningState -from ._compute_management_client_enums import GalleryImagePropertiesProvisioningState -from ._compute_management_client_enums import GalleryImageVersionPropertiesProvisioningState -from ._compute_management_client_enums import GalleryPropertiesProvisioningState -from ._compute_management_client_enums import HostCaching -from ._compute_management_client_enums import HyperVGeneration -from ._compute_management_client_enums import HyperVGenerationType -from ._compute_management_client_enums import HyperVGenerationTypes -from ._compute_management_client_enums import IPVersion -from ._compute_management_client_enums import IntervalInMins -from ._compute_management_client_enums import MaintenanceOperationResultCodeTypes -from ._compute_management_client_enums import OperatingSystemStateTypes -from ._compute_management_client_enums import OperatingSystemTypes -from ._compute_management_client_enums import OrchestrationServiceNames -from ._compute_management_client_enums import OrchestrationServiceState -from ._compute_management_client_enums import OrchestrationServiceStateAction -from ._compute_management_client_enums import ProtocolTypes -from ._compute_management_client_enums import ProximityPlacementGroupType -from ._compute_management_client_enums import ReplicationState -from ._compute_management_client_enums import ReplicationStatusTypes -from ._compute_management_client_enums import ResourceIdentityType -from ._compute_management_client_enums import RollingUpgradeActionType -from ._compute_management_client_enums import RollingUpgradeStatusCode -from ._compute_management_client_enums import SettingNames -from ._compute_management_client_enums import StatusLevelTypes -from ._compute_management_client_enums import StorageAccountType -from ._compute_management_client_enums import StorageAccountTypes -from ._compute_management_client_enums import UpgradeMode -from ._compute_management_client_enums import UpgradeOperationInvoker -from ._compute_management_client_enums import UpgradeState -from ._compute_management_client_enums import VirtualMachineEvictionPolicyTypes -from ._compute_management_client_enums import VirtualMachinePriorityTypes -from ._compute_management_client_enums import VirtualMachineScaleSetScaleInRules -from ._compute_management_client_enums import VirtualMachineScaleSetSkuScaleType -from ._compute_management_client_enums import VirtualMachineSizeTypes +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + + +from ._models_py3 import ( # type: ignore + AdditionalCapabilities, + AdditionalUnattendContent, + ApiEntityReference, + ApiError, + ApiErrorBase, + AutomaticOSUpgradePolicy, + AutomaticOSUpgradeProperties, + AutomaticRepairsPolicy, + AvailabilitySet, + AvailabilitySetListResult, + AvailabilitySetUpdate, + BillingProfile, + BootDiagnostics, + BootDiagnosticsInstanceView, + ComputeOperationListResult, + ComputeOperationValue, + DataDisk, + DataDiskImage, + DataDiskImageEncryption, + DedicatedHost, + DedicatedHostAllocatableVM, + DedicatedHostAvailableCapacity, + DedicatedHostGroup, + DedicatedHostGroupListResult, + DedicatedHostGroupUpdate, + DedicatedHostInstanceView, + DedicatedHostListResult, + DedicatedHostUpdate, + DiagnosticsProfile, + DiffDiskSettings, + Disallowed, + DiskEncryptionSetParameters, + DiskEncryptionSettings, + DiskImageEncryption, + DiskInstanceView, + EncryptionImages, + Gallery, + GalleryApplication, + GalleryApplicationList, + GalleryApplicationUpdate, + GalleryApplicationVersion, + GalleryApplicationVersionList, + GalleryApplicationVersionPublishingProfile, + GalleryApplicationVersionUpdate, + GalleryArtifactPublishingProfileBase, + GalleryArtifactSource, + GalleryArtifactVersionSource, + GalleryDataDiskImage, + GalleryDiskImage, + GalleryIdentifier, + GalleryImage, + GalleryImageIdentifier, + GalleryImageList, + GalleryImageUpdate, + GalleryImageVersion, + GalleryImageVersionList, + GalleryImageVersionPublishingProfile, + GalleryImageVersionStorageProfile, + GalleryImageVersionUpdate, + GalleryList, + GalleryOSDiskImage, + GalleryUpdate, + HardwareProfile, + Image, + ImageDataDisk, + ImageDisk, + ImageListResult, + ImageOSDisk, + ImagePurchasePlan, + ImageReference, + ImageStorageProfile, + ImageUpdate, + InnerError, + InstanceViewStatus, + KeyVaultKeyReference, + KeyVaultSecretReference, + LinuxConfiguration, + ListUsagesResult, + LogAnalyticsInputBase, + LogAnalyticsOperationResult, + LogAnalyticsOutput, + MaintenanceRedeployStatus, + ManagedArtifact, + ManagedDiskParameters, + NetworkInterfaceReference, + NetworkProfile, + OSDisk, + OSDiskImage, + OSDiskImageEncryption, + OSProfile, + OrchestrationServiceStateInput, + OrchestrationServiceSummary, + Plan, + ProximityPlacementGroup, + ProximityPlacementGroupListResult, + ProximityPlacementGroupUpdate, + PurchasePlan, + RecommendedMachineConfiguration, + RecoveryWalkResponse, + RegionalReplicationStatus, + ReplicationStatus, + RequestRateByIntervalInput, + Resource, + ResourceRange, + RollbackStatusInfo, + RollingUpgradePolicy, + RollingUpgradeProgressInfo, + RollingUpgradeRunningStatus, + RollingUpgradeStatusInfo, + RunCommandDocument, + RunCommandDocumentBase, + RunCommandInput, + RunCommandInputParameter, + RunCommandListResult, + RunCommandParameterDefinition, + RunCommandResult, + ScaleInPolicy, + ScheduledEventsProfile, + Sku, + SshConfiguration, + SshPublicKey, + SshPublicKeyGenerateKeyPairResult, + SshPublicKeyResource, + SshPublicKeyUpdateResource, + SshPublicKeysGroupListResult, + StorageProfile, + SubResource, + SubResourceReadOnly, + SubResourceWithColocationStatus, + TargetRegion, + TerminateNotificationProfile, + ThrottledRequestsInput, + UpdateResource, + UpdateResourceDefinition, + UpgradeOperationHistoricalStatusInfo, + UpgradeOperationHistoricalStatusInfoProperties, + UpgradeOperationHistoryStatus, + UpgradePolicy, + Usage, + UsageName, + UserArtifactManage, + UserArtifactSource, + UserAssignedIdentitiesValue, + VMScaleSetConvertToSinglePlacementGroupInput, + VaultCertificate, + VaultSecretGroup, + VirtualHardDisk, + VirtualMachine, + VirtualMachineAgentInstanceView, + VirtualMachineCaptureParameters, + VirtualMachineCaptureResult, + VirtualMachineExtension, + VirtualMachineExtensionHandlerInstanceView, + VirtualMachineExtensionImage, + VirtualMachineExtensionInstanceView, + VirtualMachineExtensionUpdate, + VirtualMachineExtensionsListResult, + VirtualMachineHealthStatus, + VirtualMachineIdentity, + VirtualMachineImage, + VirtualMachineImageResource, + VirtualMachineInstanceView, + VirtualMachineListResult, + VirtualMachineReimageParameters, + VirtualMachineScaleSet, + VirtualMachineScaleSetDataDisk, + VirtualMachineScaleSetExtension, + VirtualMachineScaleSetExtensionListResult, + VirtualMachineScaleSetExtensionProfile, + VirtualMachineScaleSetExtensionUpdate, + VirtualMachineScaleSetIPConfiguration, + VirtualMachineScaleSetIdentity, + VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue, + VirtualMachineScaleSetInstanceView, + VirtualMachineScaleSetInstanceViewStatusesSummary, + VirtualMachineScaleSetIpTag, + VirtualMachineScaleSetListOSUpgradeHistory, + VirtualMachineScaleSetListResult, + VirtualMachineScaleSetListSkusResult, + VirtualMachineScaleSetListWithLinkResult, + VirtualMachineScaleSetManagedDiskParameters, + VirtualMachineScaleSetNetworkConfiguration, + VirtualMachineScaleSetNetworkConfigurationDnsSettings, + VirtualMachineScaleSetNetworkProfile, + VirtualMachineScaleSetOSDisk, + VirtualMachineScaleSetOSProfile, + VirtualMachineScaleSetPublicIPAddressConfiguration, + VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings, + VirtualMachineScaleSetReimageParameters, + VirtualMachineScaleSetSku, + VirtualMachineScaleSetSkuCapacity, + VirtualMachineScaleSetStorageProfile, + VirtualMachineScaleSetUpdate, + VirtualMachineScaleSetUpdateIPConfiguration, + VirtualMachineScaleSetUpdateNetworkConfiguration, + VirtualMachineScaleSetUpdateNetworkProfile, + VirtualMachineScaleSetUpdateOSDisk, + VirtualMachineScaleSetUpdateOSProfile, + VirtualMachineScaleSetUpdatePublicIPAddressConfiguration, + VirtualMachineScaleSetUpdateStorageProfile, + VirtualMachineScaleSetUpdateVMProfile, + VirtualMachineScaleSetVM, + VirtualMachineScaleSetVMExtensionsSummary, + VirtualMachineScaleSetVMInstanceIDs, + VirtualMachineScaleSetVMInstanceRequiredIDs, + VirtualMachineScaleSetVMInstanceView, + VirtualMachineScaleSetVMListResult, + VirtualMachineScaleSetVMNetworkProfileConfiguration, + VirtualMachineScaleSetVMProfile, + VirtualMachineScaleSetVMProtectionPolicy, + VirtualMachineScaleSetVMReimageParameters, + VirtualMachineSize, + VirtualMachineSizeListResult, + VirtualMachineStatusCodeCount, + VirtualMachineUpdate, + WinRMConfiguration, + WinRMListener, + WindowsConfiguration, +) + +from ._compute_management_client_enums import ( # type: ignore + AggregatedReplicationState, + AvailabilitySetSkuTypes, + CachingTypes, + DedicatedHostLicenseTypes, + DiffDiskOptions, + DiffDiskPlacement, + DiskCreateOptionTypes, + GalleryApplicationVersionPropertiesProvisioningState, + GalleryImagePropertiesProvisioningState, + GalleryImageVersionPropertiesProvisioningState, + GalleryPropertiesProvisioningState, + HostCaching, + HyperVGeneration, + HyperVGenerationType, + HyperVGenerationTypes, + IPVersion, + IntervalInMins, + MaintenanceOperationResultCodeTypes, + OperatingSystemStateTypes, + OperatingSystemTypes, + OrchestrationServiceNames, + OrchestrationServiceState, + OrchestrationServiceStateAction, + ProtocolTypes, + ProximityPlacementGroupType, + ReplicationState, + ReplicationStatusTypes, + ResourceIdentityType, + RollingUpgradeActionType, + RollingUpgradeStatusCode, + SettingNames, + StatusLevelTypes, + StorageAccountType, + StorageAccountTypes, + UpgradeMode, + UpgradeOperationInvoker, + UpgradeState, + VirtualMachineEvictionPolicyTypes, + VirtualMachinePriorityTypes, + VirtualMachineScaleSetScaleInRules, + VirtualMachineScaleSetSkuScaleType, + VirtualMachineSizeTypes, +) 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__ = [ @@ -533,5 +544,5 @@ "VirtualMachineScaleSetSkuScaleType", "VirtualMachineSizeTypes", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_12_01/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_12_01/models/_models_py3.py index a4dd253d7e604..02915bbe33ac8 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_12_01/models/_models_py3.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_12_01/models/_models_py3.py @@ -1,5 +1,5 @@ -# 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. @@ -16,10 +16,9 @@ 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 if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object @@ -376,7 +375,7 @@ def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kw self.tags = tags -class AvailabilitySet(Resource): # pylint: disable=too-many-instance-attributes +class AvailabilitySet(Resource): """Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see `Manage the @@ -796,7 +795,7 @@ def __init__(self, **kwargs: Any) -> None: self.provider = None -class DataDisk(_serialization.Model): # pylint: disable=too-many-instance-attributes +class DataDisk(_serialization.Model): """Describes a data disk. Variables are only populated by the server, and will be ignored when sending a request. @@ -1026,7 +1025,7 @@ def __init__(self, *, lun: int, disk_encryption_set_id: Optional[str] = None, ** self.lun = lun -class DedicatedHost(Resource): # pylint: disable=too-many-instance-attributes +class DedicatedHost(Resource): """Specifies information about the Dedicated host. Variables are only populated by the server, and will be ignored when sending a request. @@ -1853,7 +1852,7 @@ def __init__( self.provisioning_state = None -class GalleryApplication(Resource): # pylint: disable=too-many-instance-attributes +class GalleryApplication(Resource): """Specifies information about the gallery Application Definition that you want to create or update. @@ -2656,7 +2655,7 @@ def __init__(self, **kwargs: Any) -> None: self.unique_name = None -class GalleryImage(Resource): # pylint: disable=too-many-instance-attributes +class GalleryImage(Resource): """Specifies information about the gallery Image Definition that you want to create or update. Variables are only populated by the server, and will be ignored when sending a request. @@ -2891,7 +2890,7 @@ def __init__(self, *, value: List["_models.GalleryImage"], next_link: Optional[s self.next_link = next_link -class GalleryImageUpdate(UpdateResourceDefinition): # pylint: disable=too-many-instance-attributes +class GalleryImageUpdate(UpdateResourceDefinition): """Specifies information about the gallery Image Definition that you want to update. Variables are only populated by the server, and will be ignored when sending a request. @@ -4802,7 +4801,7 @@ def __init__(self, **kwargs: Any) -> None: self.service_state = None -class OSDisk(_serialization.Model): # pylint: disable=too-many-instance-attributes +class OSDisk(_serialization.Model): """Specifies information about the operating system disk used by the virtual machine. :code:`
`:code:`
` For more information about disks, see `About disks and VHDs for Azure virtual machines @@ -7271,7 +7270,7 @@ def __init__(self, *, uri: Optional[str] = None, **kwargs: Any) -> None: self.uri = uri -class VirtualMachine(Resource): # pylint: disable=too-many-instance-attributes +class VirtualMachine(Resource): """Describes a Virtual Machine. Variables are only populated by the server, and will be ignored when sending a request. @@ -7676,7 +7675,7 @@ def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylin self.resources = None -class VirtualMachineExtension(Resource): # pylint: disable=too-many-instance-attributes +class VirtualMachineExtension(Resource): """Describes a Virtual Machine Extension. Variables are only populated by the server, and will be ignored when sending a request. @@ -8322,7 +8321,7 @@ def __init__( self.hyper_v_generation = hyper_v_generation -class VirtualMachineInstanceView(_serialization.Model): # pylint: disable=too-many-instance-attributes +class VirtualMachineInstanceView(_serialization.Model): """The instance view of a virtual machine. :ivar platform_update_domain: Specifies the update domain of the virtual machine. @@ -8503,7 +8502,7 @@ def __init__(self, *, temp_disk: Optional[bool] = None, **kwargs: Any) -> None: self.temp_disk = temp_disk -class VirtualMachineScaleSet(Resource): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSet(Resource): """Describes a Virtual Machine Scale Set. Variables are only populated by the server, and will be ignored when sending a request. @@ -8828,7 +8827,7 @@ def __init__( self.disk_m_bps_read_write = disk_m_bps_read_write -class VirtualMachineScaleSetExtension(SubResourceReadOnly): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetExtension(SubResourceReadOnly): """Describes a Virtual Machine Scale Set Extension. Variables are only populated by the server, and will be ignored when sending a request. @@ -9000,7 +8999,7 @@ def __init__( self.extensions = extensions -class VirtualMachineScaleSetExtensionUpdate(SubResourceReadOnly): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetExtensionUpdate(SubResourceReadOnly): """Describes a Virtual Machine Scale Set Extension. Variables are only populated by the server, and will be ignored when sending a request. @@ -10332,7 +10331,7 @@ def __init__( self.data_disks = data_disks -class VirtualMachineScaleSetUpdate(UpdateResource): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetUpdate(UpdateResource): """Describes a Virtual Machine Scale Set. :ivar tags: Resource tags. @@ -11010,7 +11009,7 @@ def __init__( self.scheduled_events_profile = scheduled_events_profile -class VirtualMachineScaleSetVM(Resource): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetVM(Resource): """Describes a virtual machine scale set virtual machine. Variables are only populated by the server, and will be ignored when sending a request. @@ -11320,7 +11319,7 @@ def __init__(self, *, instance_ids: List[str], **kwargs: Any) -> None: self.instance_ids = instance_ids -class VirtualMachineScaleSetVMInstanceView(_serialization.Model): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetVMInstanceView(_serialization.Model): """The instance view of a virtual machine scale set VM. Variables are only populated by the server, and will be ignored when sending a request. @@ -11780,7 +11779,7 @@ def __init__(self, **kwargs: Any) -> None: self.count = None -class VirtualMachineUpdate(UpdateResource): # pylint: disable=too-many-instance-attributes +class VirtualMachineUpdate(UpdateResource): """Describes a Virtual Machine Update. Variables are only populated by the server, and will be ignored when sending a request. diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_12_01/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_12_01/operations/__init__.py index e4e93e2f77344..b79bc7bf31046 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_12_01/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_12_01/operations/__init__.py @@ -5,35 +5,41 @@ # Code generated by Microsoft (R) AutoRest 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 AvailabilitySetsOperations -from ._operations import ProximityPlacementGroupsOperations -from ._operations import DedicatedHostGroupsOperations -from ._operations import DedicatedHostsOperations -from ._operations import SshPublicKeysOperations -from ._operations import VirtualMachineExtensionImagesOperations -from ._operations import VirtualMachineExtensionsOperations -from ._operations import VirtualMachineImagesOperations -from ._operations import UsageOperations -from ._operations import VirtualMachinesOperations -from ._operations import VirtualMachineSizesOperations -from ._operations import ImagesOperations -from ._operations import VirtualMachineScaleSetsOperations -from ._operations import VirtualMachineScaleSetExtensionsOperations -from ._operations import VirtualMachineScaleSetRollingUpgradesOperations -from ._operations import VirtualMachineScaleSetVMExtensionsOperations -from ._operations import VirtualMachineScaleSetVMsOperations -from ._operations import LogAnalyticsOperations -from ._operations import VirtualMachineRunCommandsOperations -from ._operations import GalleriesOperations -from ._operations import GalleryImagesOperations -from ._operations import GalleryImageVersionsOperations -from ._operations import GalleryApplicationsOperations -from ._operations import GalleryApplicationVersionsOperations +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 AvailabilitySetsOperations # type: ignore +from ._operations import ProximityPlacementGroupsOperations # type: ignore +from ._operations import DedicatedHostGroupsOperations # type: ignore +from ._operations import DedicatedHostsOperations # type: ignore +from ._operations import SshPublicKeysOperations # type: ignore +from ._operations import VirtualMachineExtensionImagesOperations # type: ignore +from ._operations import VirtualMachineExtensionsOperations # type: ignore +from ._operations import VirtualMachineImagesOperations # type: ignore +from ._operations import UsageOperations # type: ignore +from ._operations import VirtualMachinesOperations # type: ignore +from ._operations import VirtualMachineSizesOperations # type: ignore +from ._operations import ImagesOperations # type: ignore +from ._operations import VirtualMachineScaleSetsOperations # type: ignore +from ._operations import VirtualMachineScaleSetExtensionsOperations # type: ignore +from ._operations import VirtualMachineScaleSetRollingUpgradesOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMExtensionsOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMsOperations # type: ignore +from ._operations import LogAnalyticsOperations # type: ignore +from ._operations import VirtualMachineRunCommandsOperations # type: ignore +from ._operations import GalleriesOperations # type: ignore +from ._operations import GalleryImagesOperations # type: ignore +from ._operations import GalleryImageVersionsOperations # type: ignore +from ._operations import GalleryApplicationsOperations # type: ignore +from ._operations import GalleryApplicationVersionsOperations # 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__ = [ @@ -63,5 +69,5 @@ "GalleryApplicationsOperations", "GalleryApplicationVersionsOperations", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_12_01/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_12_01/operations/_operations.py index 8a996bfa14a17..250d805b7151f 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_12_01/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_12_01/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. @@ -8,22 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import ( - Any, - Callable, - Dict, - IO, - Iterable, - Iterator, - List, - Literal, - Optional, - Type, - TypeVar, - Union, - cast, - overload, -) +from typing import Any, Callable, Dict, IO, Iterable, Iterator, List, Literal, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -51,7 +36,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, HttpResponse], T, Dict[str, Any]], Any]] @@ -5069,7 +5054,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.ComputeOperationValue"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.ComputeOperationListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5222,7 +5207,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2019_12_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5349,7 +5334,7 @@ def update( :rtype: ~azure.mgmt.compute.v2019_12_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5417,7 +5402,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5467,7 +5452,7 @@ def get(self, resource_group_name: str, availability_set_name: str, **kwargs: An :rtype: ~azure.mgmt.compute.v2019_12_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5528,7 +5513,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5605,7 +5590,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Ava api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5687,7 +5672,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5845,7 +5830,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2019_12_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5975,7 +5960,7 @@ def update( :rtype: ~azure.mgmt.compute.v2019_12_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6043,7 +6028,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6103,7 +6088,7 @@ def get( :rtype: ~azure.mgmt.compute.v2019_12_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6162,7 +6147,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.ProximityPlac api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6242,7 +6227,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6403,7 +6388,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2019_12_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6530,7 +6515,7 @@ def update( :rtype: ~azure.mgmt.compute.v2019_12_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6598,7 +6583,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6648,7 +6633,7 @@ def get(self, resource_group_name: str, host_group_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.compute.v2019_12_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6707,7 +6692,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6783,7 +6768,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.DedicatedHost api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6872,7 +6857,7 @@ def _create_or_update_initial( parameters: Union[_models.DedicatedHost, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7073,7 +7058,7 @@ def _update_initial( parameters: Union[_models.DedicatedHostUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7269,7 +7254,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7399,7 +7384,7 @@ def get( :rtype: ~azure.mgmt.compute.v2019_12_01.models.DedicatedHost :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7464,7 +7449,7 @@ def list_by_host_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.DedicatedHostListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7564,7 +7549,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.SshPublicKeyR api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7645,7 +7630,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7779,7 +7764,7 @@ def create( :rtype: ~azure.mgmt.compute.v2019_12_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7907,7 +7892,7 @@ def update( :rtype: ~azure.mgmt.compute.v2019_12_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7975,7 +7960,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8025,7 +8010,7 @@ def get(self, resource_group_name: str, ssh_public_key_name: str, **kwargs: Any) :rtype: ~azure.mgmt.compute.v2019_12_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8083,7 +8068,7 @@ def generate_key_pair( :rtype: ~azure.mgmt.compute.v2019_12_01.models.SshPublicKeyGenerateKeyPairResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8164,7 +8149,7 @@ def get( :rtype: ~azure.mgmt.compute.v2019_12_01.models.VirtualMachineExtensionImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8222,7 +8207,7 @@ def list_types( :rtype: list[~azure.mgmt.compute.v2019_12_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8294,7 +8279,7 @@ def list_versions( :rtype: list[~azure.mgmt.compute.v2019_12_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8369,7 +8354,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineExtension, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8579,7 +8564,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineExtensionUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8785,7 +8770,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_name: str, vm_extension_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8915,7 +8900,7 @@ def get( :rtype: ~azure.mgmt.compute.v2019_12_01.models.VirtualMachineExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8975,7 +8960,7 @@ def list( :rtype: ~azure.mgmt.compute.v2019_12_01.models.VirtualMachineExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9059,7 +9044,7 @@ def get( :rtype: ~azure.mgmt.compute.v2019_12_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9138,7 +9123,7 @@ def list( :rtype: list[~azure.mgmt.compute.v2019_12_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9199,7 +9184,7 @@ def list_offers( :rtype: list[~azure.mgmt.compute.v2019_12_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9251,7 +9236,7 @@ def list_publishers(self, location: str, **kwargs: Any) -> List[_models.VirtualM :rtype: list[~azure.mgmt.compute.v2019_12_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9308,7 +9293,7 @@ def list_skus( :rtype: list[~azure.mgmt.compute.v2019_12_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9389,7 +9374,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.Usage"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.ListUsagesResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9488,7 +9473,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> Iterable["_models.Vi api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9556,7 +9541,7 @@ def _capture_initial( parameters: Union[_models.VirtualMachineCaptureParameters, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9754,7 +9739,7 @@ def _create_or_update_initial( parameters: Union[_models.VirtualMachine, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9946,7 +9931,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10129,7 +10114,7 @@ def get_long_running_output(pipeline_response): ) def _delete_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10245,7 +10230,7 @@ def get( :rtype: ~azure.mgmt.compute.v2019_12_01.models.VirtualMachine :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10302,7 +10287,7 @@ def instance_view( :rtype: ~azure.mgmt.compute.v2019_12_01.models.VirtualMachineInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10347,7 +10332,7 @@ def instance_view( def _convert_to_managed_disks_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10452,7 +10437,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _deallocate_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10571,7 +10556,7 @@ def generalize( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10626,7 +10611,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Vir api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10705,7 +10690,7 @@ def list_all(self, *, status_only: Optional[str] = None, **kwargs: Any) -> Itera api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10787,7 +10772,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10852,7 +10837,7 @@ def get_next(next_link=None): def _power_off_initial( self, resource_group_name: str, vm_name: str, *, skip_shutdown: bool = False, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10961,7 +10946,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _reapply_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11061,7 +11046,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _restart_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11161,7 +11146,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _start_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11261,7 +11246,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _redeploy_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11367,7 +11352,7 @@ def _reimage_initial( parameters: Optional[Union[_models.VirtualMachineReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11549,7 +11534,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _perform_maintenance_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11664,7 +11649,7 @@ def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11709,7 +11694,7 @@ def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11931,7 +11916,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.VirtualMachine api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12016,7 +12001,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, image_name: str, parameters: Union[_models.Image, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12198,7 +12183,7 @@ def _update_initial( parameters: Union[_models.ImageUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12378,7 +12363,7 @@ def get_long_running_output(pipeline_response): ) def _delete_initial(self, resource_group_name: str, image_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12493,7 +12478,7 @@ def get( :rtype: ~azure.mgmt.compute.v2019_12_01.models.Image :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12552,7 +12537,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12628,7 +12613,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Image"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12716,7 +12701,7 @@ def _create_or_update_initial( parameters: Union[_models.VirtualMachineScaleSet, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12908,7 +12893,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineScaleSetUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13095,7 +13080,7 @@ def get_long_running_output(pipeline_response): ) def _delete_initial(self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13206,7 +13191,7 @@ def get(self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) - :rtype: ~azure.mgmt.compute.v2019_12_01.models.VirtualMachineScaleSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13255,7 +13240,7 @@ def _deallocate_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13450,7 +13435,7 @@ def _delete_instances_initial( vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13643,7 +13628,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2019_12_01.models.VirtualMachineScaleSetInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13703,7 +13688,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Vir api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13782,7 +13767,7 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.VirtualMachineScaleSet"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.VirtualMachineScaleSetListWithLinkResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13865,7 +13850,7 @@ def list_skus( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.VirtualMachineScaleSetListSkusResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13949,7 +13934,7 @@ def get_os_upgrade_history( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.VirtualMachineScaleSetListOSUpgradeHistory] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14020,7 +14005,7 @@ def _power_off_initial( skip_shutdown: bool = False, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14233,7 +14218,7 @@ def _restart_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14422,7 +14407,7 @@ def _start_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14611,7 +14596,7 @@ def _redeploy_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14803,7 +14788,7 @@ def _perform_maintenance_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15001,7 +14986,7 @@ def _update_instances_initial( vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15187,7 +15172,7 @@ def _reimage_initial( vm_scale_set_reimage_input: Optional[Union[_models.VirtualMachineScaleSetReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15380,7 +15365,7 @@ def _reimage_all_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15583,7 +15568,7 @@ def force_recovery_service_fabric_platform_update_domain_walk( # pylint: disabl :rtype: ~azure.mgmt.compute.v2019_12_01.models.RecoveryWalkResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15627,7 +15612,7 @@ def force_recovery_service_fabric_platform_update_domain_walk( # pylint: disabl return deserialized # type: ignore @overload - def convert_to_single_placement_group( # pylint: disable=inconsistent-return-statements + def convert_to_single_placement_group( self, resource_group_name: str, vm_scale_set_name: str, @@ -15655,7 +15640,7 @@ def convert_to_single_placement_group( # pylint: disable=inconsistent-return-st """ @overload - def convert_to_single_placement_group( # pylint: disable=inconsistent-return-statements + def convert_to_single_placement_group( self, resource_group_name: str, vm_scale_set_name: str, @@ -15705,7 +15690,7 @@ def convert_to_single_placement_group( # pylint: disable=inconsistent-return-st :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15762,7 +15747,7 @@ def _set_orchestration_service_state_initial( parameters: Union[_models.OrchestrationServiceStateInput, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15970,7 +15955,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtension, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16181,7 +16166,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtensionUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16388,7 +16373,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, vmss_extension_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16518,7 +16503,7 @@ def get( :rtype: ~azure.mgmt.compute.v2019_12_01.models.VirtualMachineScaleSetExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16584,7 +16569,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.VirtualMachineScaleSetExtensionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16668,7 +16653,7 @@ def __init__(self, *args, **kwargs): self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") def _cancel_initial(self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16770,7 +16755,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_os_upgrade_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16876,7 +16861,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_extension_upgrade_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16993,7 +16978,7 @@ def get_latest( :rtype: ~azure.mgmt.compute.v2019_12_01.models.RollingUpgradeStatusInfo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17065,7 +17050,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineExtension, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17284,7 +17269,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineExtensionUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17498,7 +17483,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, vm_extension_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17634,7 +17619,7 @@ def get( :rtype: ~azure.mgmt.compute.v2019_12_01.models.VirtualMachineExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17703,7 +17688,7 @@ def list( :rtype: ~azure.mgmt.compute.v2019_12_01.models.VirtualMachineExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17778,7 +17763,7 @@ def _reimage_initial( ] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17977,7 +17962,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _reimage_all_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18086,7 +18071,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _deallocate_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18201,7 +18186,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineScaleSetVM, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18405,7 +18390,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18535,7 +18520,7 @@ def get( :rtype: ~azure.mgmt.compute.v2019_12_01.models.VirtualMachineScaleSetVM :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18595,7 +18580,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2019_12_01.models.VirtualMachineScaleSetVMInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18677,7 +18662,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.VirtualMachineScaleSetVMListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18751,7 +18736,7 @@ def _power_off_initial( skip_shutdown: bool = False, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18873,7 +18858,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _restart_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18981,7 +18966,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19089,7 +19074,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _redeploy_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19198,7 +19183,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _perform_maintenance_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19321,7 +19306,7 @@ def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19368,7 +19353,7 @@ def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19587,7 +19572,7 @@ def __init__(self, *args, **kwargs): def _export_request_rate_by_interval_initial( self, location: str, parameters: Union[_models.RequestRateByIntervalInput, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19764,7 +19749,7 @@ def get_long_running_output(pipeline_response): def _export_throttled_requests_initial( self, location: str, parameters: Union[_models.ThrottledRequestsInput, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19974,7 +19959,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.RunCommandDocu api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.RunCommandListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20047,7 +20032,7 @@ def get(self, location: str, command_id: str, **kwargs: Any) -> _models.RunComma :rtype: ~azure.mgmt.compute.v2019_12_01.models.RunCommandDocument :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20113,7 +20098,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, gallery_name: str, gallery: Union[_models.Gallery, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20303,7 +20288,7 @@ def _update_initial( gallery: Union[_models.GalleryUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20500,7 +20485,7 @@ def get(self, resource_group_name: str, gallery_name: str, **kwargs: Any) -> _mo :rtype: ~azure.mgmt.compute.v2019_12_01.models.Gallery :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20543,7 +20528,7 @@ def get(self, resource_group_name: str, gallery_name: str, **kwargs: Any) -> _mo return deserialized # type: ignore def _delete_initial(self, resource_group_name: str, gallery_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20658,7 +20643,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.GalleryList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20733,7 +20718,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Gallery"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.GalleryList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20822,7 +20807,7 @@ def _create_or_update_initial( gallery_image: Union[_models.GalleryImage, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21034,7 +21019,7 @@ def _update_initial( gallery_image: Union[_models.GalleryImageUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21253,7 +21238,7 @@ def get( :rtype: ~azure.mgmt.compute.v2019_12_01.models.GalleryImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21299,7 +21284,7 @@ def get( def _delete_initial( self, resource_group_name: str, gallery_name: str, gallery_image_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21426,7 +21411,7 @@ def list_by_gallery( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.GalleryImageList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21518,7 +21503,7 @@ def _create_or_update_initial( gallery_image_version: Union[_models.GalleryImageVersion, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21752,7 +21737,7 @@ def _update_initial( gallery_image_version: Union[_models.GalleryImageVersionUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22008,7 +21993,7 @@ def get( :rtype: ~azure.mgmt.compute.v2019_12_01.models.GalleryImageVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22061,7 +22046,7 @@ def _delete_initial( gallery_image_version_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22203,7 +22188,7 @@ def list_by_gallery_image( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.GalleryImageVersionList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22295,7 +22280,7 @@ def _create_or_update_initial( gallery_application: Union[_models.GalleryApplication, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22511,7 +22496,7 @@ def _update_initial( gallery_application: Union[_models.GalleryApplicationUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22737,7 +22722,7 @@ def get( :rtype: ~azure.mgmt.compute.v2019_12_01.models.GalleryApplication :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22783,7 +22768,7 @@ def get( def _delete_initial( self, resource_group_name: str, gallery_name: str, gallery_application_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22911,7 +22896,7 @@ def list_by_gallery( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.GalleryApplicationList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23003,7 +22988,7 @@ def _create_or_update_initial( gallery_application_version: Union[_models.GalleryApplicationVersion, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23239,7 +23224,7 @@ def _update_initial( gallery_application_version: Union[_models.GalleryApplicationVersionUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23497,7 +23482,7 @@ def get( :rtype: ~azure.mgmt.compute.v2019_12_01.models.GalleryApplicationVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23550,7 +23535,7 @@ def _delete_initial( gallery_application_version_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23693,7 +23678,7 @@ def list_by_gallery_application( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-12-01")) cls: ClsType[_models.GalleryApplicationVersionList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_05_01/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_05_01/__init__.py index 3b1b6244b2375..ab7c46e8991db 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_05_01/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_05_01/__init__.py @@ -5,15 +5,21 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._compute_management_client import ComputeManagementClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._compute_management_client import ComputeManagementClient # 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__ = [ "ComputeManagementClient", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_05_01/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_05_01/_compute_management_client.py index 8e31e79d87e23..d917f96f37a41 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_05_01/_compute_management_client.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_05_01/_compute_management_client.py @@ -21,11 +21,10 @@ from .operations import DiskAccessesOperations, DiskEncryptionSetsOperations, DisksOperations, SnapshotsOperations if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class ComputeManagementClient: # pylint: disable=client-accepts-api-version-keyword +class ComputeManagementClient: """Compute Client. :ivar disks: DisksOperations operations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_05_01/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_05_01/_configuration.py index 05050d2d3b561..c593b74856c17 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_05_01/_configuration.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_05_01/_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 ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ComputeManagementClient. Note that all parameters used to create this instance are saved as instance diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_05_01/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_05_01/_version.py index d79b2760319c5..e5754a47ce68f 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_05_01/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_05_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "33.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_05_01/aio/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_05_01/aio/__init__.py index 0715f50185586..d3fd1ba93379a 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_05_01/aio/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_05_01/aio/__init__.py @@ -5,12 +5,18 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._compute_management_client import ComputeManagementClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._compute_management_client import ComputeManagementClient # 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__ = [ "ComputeManagementClient", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_05_01/aio/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_05_01/aio/_compute_management_client.py index 1ea38ac379a24..316f5a911c5f8 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_05_01/aio/_compute_management_client.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_05_01/aio/_compute_management_client.py @@ -21,11 +21,10 @@ from .operations import DiskAccessesOperations, DiskEncryptionSetsOperations, DisksOperations, SnapshotsOperations if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class ComputeManagementClient: # pylint: disable=client-accepts-api-version-keyword +class ComputeManagementClient: """Compute Client. :ivar disks: DisksOperations operations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_05_01/aio/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_05_01/aio/_configuration.py index 84c3a58290abf..95afb544c581a 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_05_01/aio/_configuration.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_05_01/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 ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ComputeManagementClient. Note that all parameters used to create this instance are saved as instance diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_05_01/aio/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_05_01/aio/operations/__init__.py index 23b64bb2c8e06..daa94a7f93b23 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_05_01/aio/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_05_01/aio/operations/__init__.py @@ -5,14 +5,20 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._operations import DisksOperations -from ._operations import SnapshotsOperations -from ._operations import DiskEncryptionSetsOperations -from ._operations import DiskAccessesOperations +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._operations import DisksOperations # type: ignore +from ._operations import SnapshotsOperations # type: ignore +from ._operations import DiskEncryptionSetsOperations # type: ignore +from ._operations import DiskAccessesOperations # 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__ = [ @@ -21,5 +27,5 @@ "DiskEncryptionSetsOperations", "DiskAccessesOperations", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_05_01/aio/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_05_01/aio/operations/_operations.py index 35be4b8438f37..c742c2ba1bacb 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_05_01/aio/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_05_01/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. @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -67,7 +67,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]] @@ -95,7 +95,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.Disk, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -279,7 +279,7 @@ def get_long_running_output(pipeline_response): async def _update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.DiskUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -474,7 +474,7 @@ async def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.compute.v2020_05_01.models.Disk :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -517,7 +517,7 @@ async def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> return deserialized # type: ignore async def _delete_initial(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -634,7 +634,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-05-01")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -709,7 +709,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Disk"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-05-01")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -776,7 +776,7 @@ async def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -971,7 +971,7 @@ def get_long_running_output(pipeline_response): async def _revoke_access_initial( self, resource_group_name: str, disk_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1100,7 +1100,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, snapshot_name: str, snapshot: Union[_models.Snapshot, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1291,7 +1291,7 @@ async def _update_initial( snapshot: Union[_models.SnapshotUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1495,7 +1495,7 @@ async def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) :rtype: ~azure.mgmt.compute.v2020_05_01.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1540,7 +1540,7 @@ async def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) async def _delete_initial( self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1658,7 +1658,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-05-01")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1734,7 +1734,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Snapshot"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-05-01")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1801,7 +1801,7 @@ async def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1996,7 +1996,7 @@ def get_long_running_output(pipeline_response): async def _revoke_access_initial( self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2129,7 +2129,7 @@ async def _create_or_update_initial( disk_encryption_set: Union[_models.DiskEncryptionSet, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2330,7 +2330,7 @@ async def _update_initial( disk_encryption_set: Union[_models.DiskEncryptionSetUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2541,7 +2541,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2020_05_01.models.DiskEncryptionSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2586,7 +2586,7 @@ async def get( async def _delete_initial( self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2708,7 +2708,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-05-01")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2784,7 +2784,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.DiskEncryptionSet"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-05-01")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2872,7 +2872,7 @@ async def _create_or_update_initial( disk_access: Union[_models.DiskAccess, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3069,7 +3069,7 @@ async def _update_initial( disk_access: Union[_models.DiskAccessUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3273,7 +3273,7 @@ async def get(self, resource_group_name: str, disk_access_name: str, **kwargs: A :rtype: ~azure.mgmt.compute.v2020_05_01.models.DiskAccess :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3318,7 +3318,7 @@ async def get(self, resource_group_name: str, disk_access_name: str, **kwargs: A async def _delete_initial( self, resource_group_name: str, disk_access_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3438,7 +3438,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-05-01")) cls: ClsType[_models.DiskAccessList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3514,7 +3514,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.DiskAccess"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-05-01")) cls: ClsType[_models.DiskAccessList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3590,7 +3590,7 @@ async def get_private_link_resources( :rtype: ~azure.mgmt.compute.v2020_05_01.models.PrivateLinkResourceListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_05_01/models/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_05_01/models/__init__.py index cffc973380311..73e346dc390cd 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_05_01/models/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_05_01/models/__init__.py @@ -5,57 +5,68 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._models_py3 import AccessUri -from ._models_py3 import ApiError -from ._models_py3 import ApiErrorBase -from ._models_py3 import CreationData -from ._models_py3 import Disk -from ._models_py3 import DiskAccess -from ._models_py3 import DiskAccessList -from ._models_py3 import DiskAccessUpdate -from ._models_py3 import DiskEncryptionSet -from ._models_py3 import DiskEncryptionSetList -from ._models_py3 import DiskEncryptionSetUpdate -from ._models_py3 import DiskList -from ._models_py3 import DiskSku -from ._models_py3 import DiskUpdate -from ._models_py3 import Encryption -from ._models_py3 import EncryptionSetIdentity -from ._models_py3 import EncryptionSettingsCollection -from ._models_py3 import EncryptionSettingsElement -from ._models_py3 import GrantAccessData -from ._models_py3 import ImageDiskReference -from ._models_py3 import InnerError -from ._models_py3 import KeyVaultAndKeyReference -from ._models_py3 import KeyVaultAndSecretReference -from ._models_py3 import PrivateEndpoint -from ._models_py3 import PrivateEndpointConnection -from ._models_py3 import PrivateLinkResource -from ._models_py3 import PrivateLinkResourceListResult -from ._models_py3 import PrivateLinkServiceConnectionState -from ._models_py3 import Resource -from ._models_py3 import ShareInfoElement -from ._models_py3 import Snapshot -from ._models_py3 import SnapshotList -from ._models_py3 import SnapshotSku -from ._models_py3 import SnapshotUpdate -from ._models_py3 import SourceVault +from typing import TYPE_CHECKING -from ._compute_management_client_enums import AccessLevel -from ._compute_management_client_enums import DiskCreateOption -from ._compute_management_client_enums import DiskEncryptionSetIdentityType -from ._compute_management_client_enums import DiskState -from ._compute_management_client_enums import DiskStorageAccountTypes -from ._compute_management_client_enums import EncryptionType -from ._compute_management_client_enums import HyperVGeneration -from ._compute_management_client_enums import NetworkAccessPolicy -from ._compute_management_client_enums import OperatingSystemTypes -from ._compute_management_client_enums import PrivateEndpointConnectionProvisioningState -from ._compute_management_client_enums import PrivateEndpointServiceConnectionStatus -from ._compute_management_client_enums import SnapshotStorageAccountTypes +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + + +from ._models_py3 import ( # type: ignore + AccessUri, + ApiError, + ApiErrorBase, + CreationData, + Disk, + DiskAccess, + DiskAccessList, + DiskAccessUpdate, + DiskEncryptionSet, + DiskEncryptionSetList, + DiskEncryptionSetUpdate, + DiskList, + DiskSku, + DiskUpdate, + Encryption, + EncryptionSetIdentity, + EncryptionSettingsCollection, + EncryptionSettingsElement, + GrantAccessData, + ImageDiskReference, + InnerError, + KeyVaultAndKeyReference, + KeyVaultAndSecretReference, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateLinkResource, + PrivateLinkResourceListResult, + PrivateLinkServiceConnectionState, + Resource, + ShareInfoElement, + Snapshot, + SnapshotList, + SnapshotSku, + SnapshotUpdate, + SourceVault, +) + +from ._compute_management_client_enums import ( # type: ignore + AccessLevel, + DiskCreateOption, + DiskEncryptionSetIdentityType, + DiskState, + DiskStorageAccountTypes, + EncryptionType, + HyperVGeneration, + NetworkAccessPolicy, + OperatingSystemTypes, + PrivateEndpointConnectionProvisioningState, + PrivateEndpointServiceConnectionStatus, + SnapshotStorageAccountTypes, +) 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__ = [ @@ -107,5 +118,5 @@ "PrivateEndpointServiceConnectionStatus", "SnapshotStorageAccountTypes", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_05_01/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_05_01/models/_models_py3.py index 7a51d9142779d..f6e5cf75345f4 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_05_01/models/_models_py3.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_05_01/models/_models_py3.py @@ -1,5 +1,5 @@ -# 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. @@ -12,7 +12,6 @@ from ... import _serialization if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models @@ -274,7 +273,7 @@ def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kw self.tags = tags -class Disk(Resource): # pylint: disable=too-many-instance-attributes +class Disk(Resource): """Disk resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -867,7 +866,7 @@ def __init__(self, *, name: Optional[Union[str, "_models.DiskStorageAccountTypes self.tier = None -class DiskUpdate(_serialization.Model): # pylint: disable=too-many-instance-attributes +class DiskUpdate(_serialization.Model): """Disk update resource. :ivar tags: Resource tags. @@ -1580,7 +1579,7 @@ def __init__(self, **kwargs: Any) -> None: self.vm_uri = None -class Snapshot(Resource): # pylint: disable=too-many-instance-attributes +class Snapshot(Resource): """Snapshot resource. Variables are only populated by the server, and will be ignored when sending a request. diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_05_01/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_05_01/operations/__init__.py index 23b64bb2c8e06..daa94a7f93b23 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_05_01/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_05_01/operations/__init__.py @@ -5,14 +5,20 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._operations import DisksOperations -from ._operations import SnapshotsOperations -from ._operations import DiskEncryptionSetsOperations -from ._operations import DiskAccessesOperations +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._operations import DisksOperations # type: ignore +from ._operations import SnapshotsOperations # type: ignore +from ._operations import DiskEncryptionSetsOperations # type: ignore +from ._operations import DiskAccessesOperations # 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__ = [ @@ -21,5 +27,5 @@ "DiskEncryptionSetsOperations", "DiskAccessesOperations", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_05_01/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_05_01/operations/_operations.py index 78cf9763a47a8..b43b704fdf40a 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_05_01/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_05_01/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. @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -36,7 +36,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, HttpResponse], T, Dict[str, Any]], Any]] @@ -940,7 +940,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.Disk, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1124,7 +1124,7 @@ def get_long_running_output(pipeline_response): def _update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.DiskUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1319,7 +1319,7 @@ def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> _model :rtype: ~azure.mgmt.compute.v2020_05_01.models.Disk :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1362,7 +1362,7 @@ def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> _model return deserialized # type: ignore def _delete_initial(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1479,7 +1479,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-05-01")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1554,7 +1554,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Disk"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-05-01")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1621,7 +1621,7 @@ def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1811,7 +1811,7 @@ def get_long_running_output(pipeline_response): ) def _revoke_access_initial(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1938,7 +1938,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, snapshot_name: str, snapshot: Union[_models.Snapshot, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2126,7 +2126,7 @@ def _update_initial( snapshot: Union[_models.SnapshotUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2327,7 +2327,7 @@ def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> _m :rtype: ~azure.mgmt.compute.v2020_05_01.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2370,7 +2370,7 @@ def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> _m return deserialized # type: ignore def _delete_initial(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2487,7 +2487,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-05-01")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2562,7 +2562,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Snapshot"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-05-01")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2629,7 +2629,7 @@ def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2819,7 +2819,7 @@ def get_long_running_output(pipeline_response): ) def _revoke_access_initial(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2950,7 +2950,7 @@ def _create_or_update_initial( disk_encryption_set: Union[_models.DiskEncryptionSet, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3148,7 +3148,7 @@ def _update_initial( disk_encryption_set: Union[_models.DiskEncryptionSetUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3354,7 +3354,7 @@ def get(self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: :rtype: ~azure.mgmt.compute.v2020_05_01.models.DiskEncryptionSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3399,7 +3399,7 @@ def get(self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: def _delete_initial( self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3516,7 +3516,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-05-01")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3591,7 +3591,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.DiskEncryptionSet"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-05-01")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3679,7 +3679,7 @@ def _create_or_update_initial( disk_access: Union[_models.DiskAccess, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3873,7 +3873,7 @@ def _update_initial( disk_access: Union[_models.DiskAccessUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4074,7 +4074,7 @@ def get(self, resource_group_name: str, disk_access_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.compute.v2020_05_01.models.DiskAccess :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4117,7 +4117,7 @@ def get(self, resource_group_name: str, disk_access_name: str, **kwargs: Any) -> return deserialized # type: ignore def _delete_initial(self, resource_group_name: str, disk_access_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4234,7 +4234,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-05-01")) cls: ClsType[_models.DiskAccessList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4309,7 +4309,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.DiskAccess"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-05-01")) cls: ClsType[_models.DiskAccessList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4385,7 +4385,7 @@ def get_private_link_resources( :rtype: ~azure.mgmt.compute.v2020_05_01.models.PrivateLinkResourceListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/__init__.py index 3b1b6244b2375..ab7c46e8991db 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/__init__.py @@ -5,15 +5,21 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._compute_management_client import ComputeManagementClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._compute_management_client import ComputeManagementClient # 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__ = [ "ComputeManagementClient", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/_compute_management_client.py index b71cf8f1ca53a..eb3a7a5bba5aa 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/_compute_management_client.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/_compute_management_client.py @@ -43,11 +43,10 @@ ) if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class ComputeManagementClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes +class ComputeManagementClient: # pylint: disable=too-many-instance-attributes """Compute Client. :ivar operations: Operations operations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/_configuration.py index a273a41d70a6a..d570b6052fdce 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/_configuration.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/_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 ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ComputeManagementClient. Note that all parameters used to create this instance are saved as instance diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/_version.py index d79b2760319c5..e5754a47ce68f 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "33.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/aio/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/aio/__init__.py index 0715f50185586..d3fd1ba93379a 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/aio/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/aio/__init__.py @@ -5,12 +5,18 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._compute_management_client import ComputeManagementClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._compute_management_client import ComputeManagementClient # 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__ = [ "ComputeManagementClient", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/aio/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/aio/_compute_management_client.py index 7114cd8c74399..5f60cb47786a1 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/aio/_compute_management_client.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/aio/_compute_management_client.py @@ -43,11 +43,10 @@ ) if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class ComputeManagementClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes +class ComputeManagementClient: # pylint: disable=too-many-instance-attributes """Compute Client. :ivar operations: Operations operations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/aio/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/aio/_configuration.py index 0b961a9bdc740..22e7e4691e7ff 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/aio/_configuration.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/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 ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ComputeManagementClient. Note that all parameters used to create this instance are saved as instance diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/aio/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/aio/operations/__init__.py index 263a5499b7f1e..dfc04c351e854 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/aio/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/aio/operations/__init__.py @@ -5,31 +5,37 @@ # Code generated by Microsoft (R) AutoRest 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 AvailabilitySetsOperations -from ._operations import ProximityPlacementGroupsOperations -from ._operations import DedicatedHostGroupsOperations -from ._operations import DedicatedHostsOperations -from ._operations import SshPublicKeysOperations -from ._operations import VirtualMachineExtensionImagesOperations -from ._operations import VirtualMachineExtensionsOperations -from ._operations import VirtualMachineImagesOperations -from ._operations import UsageOperations -from ._operations import VirtualMachinesOperations -from ._operations import VirtualMachineSizesOperations -from ._operations import ImagesOperations -from ._operations import VirtualMachineScaleSetsOperations -from ._operations import VirtualMachineScaleSetExtensionsOperations -from ._operations import VirtualMachineScaleSetRollingUpgradesOperations -from ._operations import VirtualMachineScaleSetVMExtensionsOperations -from ._operations import VirtualMachineScaleSetVMsOperations -from ._operations import LogAnalyticsOperations -from ._operations import VirtualMachineRunCommandsOperations -from ._operations import VirtualMachineScaleSetVMRunCommandsOperations +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 AvailabilitySetsOperations # type: ignore +from ._operations import ProximityPlacementGroupsOperations # type: ignore +from ._operations import DedicatedHostGroupsOperations # type: ignore +from ._operations import DedicatedHostsOperations # type: ignore +from ._operations import SshPublicKeysOperations # type: ignore +from ._operations import VirtualMachineExtensionImagesOperations # type: ignore +from ._operations import VirtualMachineExtensionsOperations # type: ignore +from ._operations import VirtualMachineImagesOperations # type: ignore +from ._operations import UsageOperations # type: ignore +from ._operations import VirtualMachinesOperations # type: ignore +from ._operations import VirtualMachineSizesOperations # type: ignore +from ._operations import ImagesOperations # type: ignore +from ._operations import VirtualMachineScaleSetsOperations # type: ignore +from ._operations import VirtualMachineScaleSetExtensionsOperations # type: ignore +from ._operations import VirtualMachineScaleSetRollingUpgradesOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMExtensionsOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMsOperations # type: ignore +from ._operations import LogAnalyticsOperations # type: ignore +from ._operations import VirtualMachineRunCommandsOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMRunCommandsOperations # 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__ = [ @@ -55,5 +61,5 @@ "VirtualMachineRunCommandsOperations", "VirtualMachineScaleSetVMRunCommandsOperations", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/aio/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/aio/operations/_operations.py index a6a669a3ac26b..e1d57c767d73a 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/aio/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/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. @@ -18,7 +18,6 @@ List, Literal, Optional, - Type, TypeVar, Union, cast, @@ -196,7 +195,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]] @@ -237,7 +236,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.ComputeOperationValue"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.ComputeOperationListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -390,7 +389,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2020_06_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -517,7 +516,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2020_06_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -572,9 +571,7 @@ async def update( return deserialized # type: ignore @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, availability_set_name: str, **kwargs: Any - ) -> None: + async def delete(self, resource_group_name: str, availability_set_name: str, **kwargs: Any) -> None: """Delete an availability set. :param resource_group_name: The name of the resource group. Required. @@ -585,7 +582,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -635,7 +632,7 @@ async def get(self, resource_group_name: str, availability_set_name: str, **kwar :rtype: ~azure.mgmt.compute.v2020_06_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -697,7 +694,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -775,7 +772,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -858,7 +855,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1016,7 +1013,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2020_06_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1146,7 +1143,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2020_06_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1201,9 +1198,7 @@ async def update( return deserialized # type: ignore @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, proximity_placement_group_name: str, **kwargs: Any - ) -> None: + async def delete(self, resource_group_name: str, proximity_placement_group_name: str, **kwargs: Any) -> None: """Delete a proximity placement group. :param resource_group_name: The name of the resource group. Required. @@ -1214,7 +1209,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1274,7 +1269,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2020_06_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1333,7 +1328,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Proximit api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1413,7 +1408,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1574,7 +1569,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2020_06_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1701,7 +1696,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2020_06_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1756,9 +1751,7 @@ async def update( return deserialized # type: ignore @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, host_group_name: str, **kwargs: Any - ) -> None: + async def delete(self, resource_group_name: str, host_group_name: str, **kwargs: Any) -> None: """Delete a dedicated host group. :param resource_group_name: The name of the resource group. Required. @@ -1769,7 +1762,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1830,7 +1823,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2020_06_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1893,7 +1886,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1970,7 +1963,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Dedicate api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2059,7 +2052,7 @@ async def _create_or_update_initial( parameters: Union[_models.DedicatedHost, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2263,7 +2256,7 @@ async def _update_initial( parameters: Union[_models.DedicatedHostUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2462,7 +2455,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2592,7 +2585,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2020_06_01.models.DedicatedHost :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2658,7 +2651,7 @@ def list_by_host_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.DedicatedHostListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2758,7 +2751,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.SshPubli api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2839,7 +2832,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2973,7 +2966,7 @@ async def create( :rtype: ~azure.mgmt.compute.v2020_06_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3101,7 +3094,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2020_06_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3156,9 +3149,7 @@ async def update( return deserialized # type: ignore @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, ssh_public_key_name: str, **kwargs: Any - ) -> None: + async def delete(self, resource_group_name: str, ssh_public_key_name: str, **kwargs: Any) -> None: """Delete an SSH public key. :param resource_group_name: The name of the resource group. Required. @@ -3169,7 +3160,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3221,7 +3212,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2020_06_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3279,7 +3270,7 @@ async def generate_key_pair( :rtype: ~azure.mgmt.compute.v2020_06_01.models.SshPublicKeyGenerateKeyPairResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3360,7 +3351,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2020_06_01.models.VirtualMachineExtensionImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3418,7 +3409,7 @@ async def list_types( :rtype: list[~azure.mgmt.compute.v2020_06_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3490,7 +3481,7 @@ async def list_versions( :rtype: list[~azure.mgmt.compute.v2020_06_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3565,7 +3556,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineExtension, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3775,7 +3766,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineExtensionUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3981,7 +3972,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_name: str, vm_extension_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4111,7 +4102,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2020_06_01.models.VirtualMachineExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4171,7 +4162,7 @@ async def list( :rtype: ~azure.mgmt.compute.v2020_06_01.models.VirtualMachineExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4255,7 +4246,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2020_06_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4334,7 +4325,7 @@ async def list( :rtype: list[~azure.mgmt.compute.v2020_06_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4395,7 +4386,7 @@ async def list_offers( :rtype: list[~azure.mgmt.compute.v2020_06_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4447,7 +4438,7 @@ async def list_publishers(self, location: str, **kwargs: Any) -> List[_models.Vi :rtype: list[~azure.mgmt.compute.v2020_06_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4504,7 +4495,7 @@ async def list_skus( :rtype: list[~azure.mgmt.compute.v2020_06_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4585,7 +4576,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.Usage"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.ListUsagesResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4685,7 +4676,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> AsyncIterable["_mode api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4753,7 +4744,7 @@ async def _capture_initial( parameters: Union[_models.VirtualMachineCaptureParameters, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4951,7 +4942,7 @@ async def _create_or_update_initial( parameters: Union[_models.VirtualMachine, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5146,7 +5137,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5334,7 +5325,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_name: str, *, force_deletion: Optional[bool] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5457,7 +5448,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2020_06_01.models.VirtualMachine :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5514,7 +5505,7 @@ async def instance_view( :rtype: ~azure.mgmt.compute.v2020_06_01.models.VirtualMachineInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5559,7 +5550,7 @@ async def instance_view( async def _convert_to_managed_disks_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5662,7 +5653,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _deallocate_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5763,9 +5754,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace_async - async def generalize( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, vm_name: str, **kwargs: Any - ) -> None: + async def generalize(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> None: """Sets the OS state of the virtual machine to generalized. It is recommended to sysprep the virtual machine before performing this operation. :code:`
`For Windows, please refer to `Create a managed image of a generalized VM in Azure @@ -5781,7 +5770,7 @@ async def generalize( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5837,7 +5826,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5917,7 +5906,7 @@ def list_all(self, *, status_only: Optional[str] = None, **kwargs: Any) -> Async api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6000,7 +5989,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6065,7 +6054,7 @@ async def get_next(next_link=None): async def _power_off_initial( self, resource_group_name: str, vm_name: str, *, skip_shutdown: bool = False, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6174,7 +6163,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _reapply_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6274,7 +6263,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _restart_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6374,7 +6363,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _start_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6474,7 +6463,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _redeploy_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6580,7 +6569,7 @@ async def _reimage_initial( parameters: Optional[Union[_models.VirtualMachineReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6785,7 +6774,7 @@ async def retrieve_boot_diagnostics_data( :rtype: ~azure.mgmt.compute.v2020_06_01.models.RetrieveBootDiagnosticsDataResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6831,7 +6820,7 @@ async def retrieve_boot_diagnostics_data( async def _perform_maintenance_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6933,9 +6922,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace_async - async def simulate_eviction( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, vm_name: str, **kwargs: Any - ) -> None: + async def simulate_eviction(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> None: """The operation to simulate the eviction of spot virtual machine. :param resource_group_name: The name of the resource group. Required. @@ -6946,7 +6933,7 @@ async def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6987,7 +6974,7 @@ async def simulate_eviction( # pylint: disable=inconsistent-return-statements async def _assess_patches_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7103,7 +7090,7 @@ async def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7329,7 +7316,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.VirtualMa api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7414,7 +7401,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, image_name: str, parameters: Union[_models.Image, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7596,7 +7583,7 @@ async def _update_initial( parameters: Union[_models.ImageUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7776,7 +7763,7 @@ def get_long_running_output(pipeline_response): ) async def _delete_initial(self, resource_group_name: str, image_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7891,7 +7878,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2020_06_01.models.Image :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7950,7 +7937,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8026,7 +8013,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Image"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8114,7 +8101,7 @@ async def _create_or_update_initial( parameters: Union[_models.VirtualMachineScaleSet, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8306,7 +8293,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineScaleSetUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8495,7 +8482,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8610,7 +8597,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2020_06_01.models.VirtualMachineScaleSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8659,7 +8646,7 @@ async def _deallocate_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8854,7 +8841,7 @@ async def _delete_instances_initial( vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9047,7 +9034,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2020_06_01.models.VirtualMachineScaleSetInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9107,7 +9094,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9186,7 +9173,7 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.VirtualMachineScaleS api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.VirtualMachineScaleSetListWithLinkResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9269,7 +9256,7 @@ def list_skus( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.VirtualMachineScaleSetListSkusResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9335,6 +9322,7 @@ async def get_next(next_link=None): def get_os_upgrade_history( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> AsyncIterable["_models.UpgradeOperationHistoricalStatusInfo"]: + # pylint: disable=line-too-long """Gets list of OS upgrades on a VM scale set instance. :param resource_group_name: The name of the resource group. Required. @@ -9353,7 +9341,7 @@ def get_os_upgrade_history( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.VirtualMachineScaleSetListOSUpgradeHistory] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9424,7 +9412,7 @@ async def _power_off_initial( skip_shutdown: bool = False, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9637,7 +9625,7 @@ async def _restart_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9826,7 +9814,7 @@ async def _start_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10015,7 +10003,7 @@ async def _redeploy_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10207,7 +10195,7 @@ async def _perform_maintenance_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10405,7 +10393,7 @@ async def _update_instances_initial( vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10591,7 +10579,7 @@ async def _reimage_initial( vm_scale_set_reimage_input: Optional[Union[_models.VirtualMachineScaleSetReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10784,7 +10772,7 @@ async def _reimage_all_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10987,7 +10975,7 @@ async def force_recovery_service_fabric_platform_update_domain_walk( # pylint: :rtype: ~azure.mgmt.compute.v2020_06_01.models.RecoveryWalkResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11031,7 +11019,7 @@ async def force_recovery_service_fabric_platform_update_domain_walk( # pylint: return deserialized # type: ignore @overload - async def convert_to_single_placement_group( # pylint: disable=inconsistent-return-statements + async def convert_to_single_placement_group( self, resource_group_name: str, vm_scale_set_name: str, @@ -11059,7 +11047,7 @@ async def convert_to_single_placement_group( # pylint: disable=inconsistent-ret """ @overload - async def convert_to_single_placement_group( # pylint: disable=inconsistent-return-statements + async def convert_to_single_placement_group( self, resource_group_name: str, vm_scale_set_name: str, @@ -11086,7 +11074,7 @@ async def convert_to_single_placement_group( # pylint: disable=inconsistent-ret """ @distributed_trace_async - async def convert_to_single_placement_group( # pylint: disable=inconsistent-return-statements + async def convert_to_single_placement_group( self, resource_group_name: str, vm_scale_set_name: str, @@ -11109,7 +11097,7 @@ async def convert_to_single_placement_group( # pylint: disable=inconsistent-ret :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11166,7 +11154,7 @@ async def _set_orchestration_service_state_initial( parameters: Union[_models.OrchestrationServiceStateInput, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11374,7 +11362,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtension, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11585,7 +11573,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtensionUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11792,7 +11780,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, vmss_extension_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11922,7 +11910,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2020_06_01.models.VirtualMachineScaleSetExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11988,7 +11976,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.VirtualMachineScaleSetExtensionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12074,7 +12062,7 @@ def __init__(self, *args, **kwargs) -> None: async def _cancel_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12178,7 +12166,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_os_upgrade_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12284,7 +12272,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_extension_upgrade_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12401,7 +12389,7 @@ async def get_latest( :rtype: ~azure.mgmt.compute.v2020_06_01.models.RollingUpgradeStatusInfo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12473,7 +12461,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetVMExtension, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12693,7 +12681,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetVMExtensionUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12908,7 +12896,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, vm_extension_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13044,7 +13032,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2020_06_01.models.VirtualMachineScaleSetVMExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13113,7 +13101,7 @@ async def list( :rtype: ~azure.mgmt.compute.v2020_06_01.models.VirtualMachineScaleSetVMExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13190,7 +13178,7 @@ async def _reimage_initial( ] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13389,7 +13377,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _reimage_all_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13498,7 +13486,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _deallocate_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13613,7 +13601,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineScaleSetVM, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13817,7 +13805,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13947,7 +13935,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2020_06_01.models.VirtualMachineScaleSetVM :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14007,7 +13995,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2020_06_01.models.VirtualMachineScaleSetVMInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14089,7 +14077,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.VirtualMachineScaleSetVMListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14163,7 +14151,7 @@ async def _power_off_initial( skip_shutdown: bool = False, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14285,7 +14273,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _restart_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14393,7 +14381,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14501,7 +14489,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _redeploy_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14635,7 +14623,7 @@ async def retrieve_boot_diagnostics_data( :rtype: ~azure.mgmt.compute.v2020_06_01.models.RetrieveBootDiagnosticsDataResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14682,7 +14670,7 @@ async def retrieve_boot_diagnostics_data( async def _perform_maintenance_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14788,7 +14776,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace_async - async def simulate_eviction( # pylint: disable=inconsistent-return-statements + async def simulate_eviction( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: """The operation to simulate the eviction of spot virtual machine in a VM scale set. @@ -14803,7 +14791,7 @@ async def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14850,7 +14838,7 @@ async def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15072,7 +15060,7 @@ def __init__(self, *args, **kwargs) -> None: async def _export_request_rate_by_interval_initial( self, location: str, parameters: Union[_models.RequestRateByIntervalInput, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15250,7 +15238,7 @@ def get_long_running_output(pipeline_response): async def _export_throttled_requests_initial( self, location: str, parameters: Union[_models.ThrottledRequestsInput, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15461,7 +15449,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.RunComman api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.RunCommandListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15534,7 +15522,7 @@ async def get(self, location: str, command_id: str, **kwargs: Any) -> _models.Ru :rtype: ~azure.mgmt.compute.v2020_06_01.models.RunCommandDocument :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15584,7 +15572,7 @@ async def _create_or_update_initial( run_command: Union[_models.VirtualMachineRunCommand, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15793,7 +15781,7 @@ async def _update_initial( run_command: Union[_models.VirtualMachineRunCommandUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15998,7 +15986,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_name: str, run_command_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16128,7 +16116,7 @@ async def get_by_virtual_machine( :rtype: ~azure.mgmt.compute.v2020_06_01.models.VirtualMachineRunCommand :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16196,7 +16184,7 @@ def list_by_virtual_machine( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.VirtualMachineRunCommandsListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16289,7 +16277,7 @@ async def _create_or_update_initial( run_command: Union[_models.VirtualMachineRunCommand, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16507,7 +16495,7 @@ async def _update_initial( run_command: Union[_models.VirtualMachineRunCommandUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16720,7 +16708,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, run_command_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16856,7 +16844,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2020_06_01.models.VirtualMachineRunCommand :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16933,7 +16921,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.VirtualMachineRunCommandsListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/models/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/models/__init__.py index 32d8afbe79f30..7186e0fa7c79a 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/models/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/models/__init__.py @@ -5,245 +5,256 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._models_py3 import AdditionalCapabilities -from ._models_py3 import AdditionalUnattendContent -from ._models_py3 import ApiEntityReference -from ._models_py3 import ApiError -from ._models_py3 import ApiErrorBase -from ._models_py3 import AutomaticOSUpgradePolicy -from ._models_py3 import AutomaticOSUpgradeProperties -from ._models_py3 import AutomaticRepairsPolicy -from ._models_py3 import AvailabilitySet -from ._models_py3 import AvailabilitySetListResult -from ._models_py3 import AvailabilitySetUpdate -from ._models_py3 import AvailablePatchSummary -from ._models_py3 import BillingProfile -from ._models_py3 import BootDiagnostics -from ._models_py3 import BootDiagnosticsInstanceView -from ._models_py3 import ComputeOperationListResult -from ._models_py3 import ComputeOperationValue -from ._models_py3 import DataDisk -from ._models_py3 import DataDiskImage -from ._models_py3 import DedicatedHost -from ._models_py3 import DedicatedHostAllocatableVM -from ._models_py3 import DedicatedHostAvailableCapacity -from ._models_py3 import DedicatedHostGroup -from ._models_py3 import DedicatedHostGroupInstanceView -from ._models_py3 import DedicatedHostGroupListResult -from ._models_py3 import DedicatedHostGroupUpdate -from ._models_py3 import DedicatedHostInstanceView -from ._models_py3 import DedicatedHostInstanceViewWithName -from ._models_py3 import DedicatedHostListResult -from ._models_py3 import DedicatedHostUpdate -from ._models_py3 import DiagnosticsProfile -from ._models_py3 import DiffDiskSettings -from ._models_py3 import DisallowedConfiguration -from ._models_py3 import DiskEncryptionSetParameters -from ._models_py3 import DiskEncryptionSettings -from ._models_py3 import DiskInstanceView -from ._models_py3 import HardwareProfile -from ._models_py3 import Image -from ._models_py3 import ImageDataDisk -from ._models_py3 import ImageDisk -from ._models_py3 import ImageListResult -from ._models_py3 import ImageOSDisk -from ._models_py3 import ImageReference -from ._models_py3 import ImageStorageProfile -from ._models_py3 import ImageUpdate -from ._models_py3 import InnerError -from ._models_py3 import InstanceViewStatus -from ._models_py3 import KeyVaultKeyReference -from ._models_py3 import KeyVaultSecretReference -from ._models_py3 import LastPatchInstallationSummary -from ._models_py3 import LinuxConfiguration -from ._models_py3 import ListUsagesResult -from ._models_py3 import LogAnalyticsInputBase -from ._models_py3 import LogAnalyticsOperationResult -from ._models_py3 import LogAnalyticsOutput -from ._models_py3 import MaintenanceRedeployStatus -from ._models_py3 import ManagedDiskParameters -from ._models_py3 import NetworkInterfaceReference -from ._models_py3 import NetworkProfile -from ._models_py3 import OSDisk -from ._models_py3 import OSDiskImage -from ._models_py3 import OSProfile -from ._models_py3 import OrchestrationServiceStateInput -from ._models_py3 import OrchestrationServiceSummary -from ._models_py3 import PatchSettings -from ._models_py3 import Plan -from ._models_py3 import ProximityPlacementGroup -from ._models_py3 import ProximityPlacementGroupListResult -from ._models_py3 import ProximityPlacementGroupUpdate -from ._models_py3 import PurchasePlan -from ._models_py3 import RecoveryWalkResponse -from ._models_py3 import RequestRateByIntervalInput -from ._models_py3 import Resource -from ._models_py3 import RetrieveBootDiagnosticsDataResult -from ._models_py3 import RollbackStatusInfo -from ._models_py3 import RollingUpgradePolicy -from ._models_py3 import RollingUpgradeProgressInfo -from ._models_py3 import RollingUpgradeRunningStatus -from ._models_py3 import RollingUpgradeStatusInfo -from ._models_py3 import RunCommandDocument -from ._models_py3 import RunCommandDocumentBase -from ._models_py3 import RunCommandInput -from ._models_py3 import RunCommandInputParameter -from ._models_py3 import RunCommandListResult -from ._models_py3 import RunCommandParameterDefinition -from ._models_py3 import RunCommandResult -from ._models_py3 import ScaleInPolicy -from ._models_py3 import ScheduledEventsProfile -from ._models_py3 import SecurityProfile -from ._models_py3 import Sku -from ._models_py3 import SshConfiguration -from ._models_py3 import SshPublicKey -from ._models_py3 import SshPublicKeyGenerateKeyPairResult -from ._models_py3 import SshPublicKeyResource -from ._models_py3 import SshPublicKeyUpdateResource -from ._models_py3 import SshPublicKeysGroupListResult -from ._models_py3 import StorageProfile -from ._models_py3 import SubResource -from ._models_py3 import SubResourceReadOnly -from ._models_py3 import SubResourceWithColocationStatus -from ._models_py3 import TerminateNotificationProfile -from ._models_py3 import ThrottledRequestsInput -from ._models_py3 import UpdateResource -from ._models_py3 import UpgradeOperationHistoricalStatusInfo -from ._models_py3 import UpgradeOperationHistoricalStatusInfoProperties -from ._models_py3 import UpgradeOperationHistoryStatus -from ._models_py3 import UpgradePolicy -from ._models_py3 import Usage -from ._models_py3 import UsageName -from ._models_py3 import UserAssignedIdentitiesValue -from ._models_py3 import VMScaleSetConvertToSinglePlacementGroupInput -from ._models_py3 import VaultCertificate -from ._models_py3 import VaultSecretGroup -from ._models_py3 import VirtualHardDisk -from ._models_py3 import VirtualMachine -from ._models_py3 import VirtualMachineAgentInstanceView -from ._models_py3 import VirtualMachineAssessPatchesResult -from ._models_py3 import VirtualMachineCaptureParameters -from ._models_py3 import VirtualMachineCaptureResult -from ._models_py3 import VirtualMachineExtension -from ._models_py3 import VirtualMachineExtensionHandlerInstanceView -from ._models_py3 import VirtualMachineExtensionImage -from ._models_py3 import VirtualMachineExtensionInstanceView -from ._models_py3 import VirtualMachineExtensionUpdate -from ._models_py3 import VirtualMachineExtensionsListResult -from ._models_py3 import VirtualMachineHealthStatus -from ._models_py3 import VirtualMachineIdentity -from ._models_py3 import VirtualMachineImage -from ._models_py3 import VirtualMachineImageResource -from ._models_py3 import VirtualMachineInstanceView -from ._models_py3 import VirtualMachineListResult -from ._models_py3 import VirtualMachinePatchStatus -from ._models_py3 import VirtualMachineReimageParameters -from ._models_py3 import VirtualMachineRunCommand -from ._models_py3 import VirtualMachineRunCommandInstanceView -from ._models_py3 import VirtualMachineRunCommandScriptSource -from ._models_py3 import VirtualMachineRunCommandUpdate -from ._models_py3 import VirtualMachineRunCommandsListResult -from ._models_py3 import VirtualMachineScaleSet -from ._models_py3 import VirtualMachineScaleSetDataDisk -from ._models_py3 import VirtualMachineScaleSetExtension -from ._models_py3 import VirtualMachineScaleSetExtensionListResult -from ._models_py3 import VirtualMachineScaleSetExtensionProfile -from ._models_py3 import VirtualMachineScaleSetExtensionUpdate -from ._models_py3 import VirtualMachineScaleSetIPConfiguration -from ._models_py3 import VirtualMachineScaleSetIdentity -from ._models_py3 import VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue -from ._models_py3 import VirtualMachineScaleSetInstanceView -from ._models_py3 import VirtualMachineScaleSetInstanceViewStatusesSummary -from ._models_py3 import VirtualMachineScaleSetIpTag -from ._models_py3 import VirtualMachineScaleSetListOSUpgradeHistory -from ._models_py3 import VirtualMachineScaleSetListResult -from ._models_py3 import VirtualMachineScaleSetListSkusResult -from ._models_py3 import VirtualMachineScaleSetListWithLinkResult -from ._models_py3 import VirtualMachineScaleSetManagedDiskParameters -from ._models_py3 import VirtualMachineScaleSetNetworkConfiguration -from ._models_py3 import VirtualMachineScaleSetNetworkConfigurationDnsSettings -from ._models_py3 import VirtualMachineScaleSetNetworkProfile -from ._models_py3 import VirtualMachineScaleSetOSDisk -from ._models_py3 import VirtualMachineScaleSetOSProfile -from ._models_py3 import VirtualMachineScaleSetPublicIPAddressConfiguration -from ._models_py3 import VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings -from ._models_py3 import VirtualMachineScaleSetReimageParameters -from ._models_py3 import VirtualMachineScaleSetSku -from ._models_py3 import VirtualMachineScaleSetSkuCapacity -from ._models_py3 import VirtualMachineScaleSetStorageProfile -from ._models_py3 import VirtualMachineScaleSetUpdate -from ._models_py3 import VirtualMachineScaleSetUpdateIPConfiguration -from ._models_py3 import VirtualMachineScaleSetUpdateNetworkConfiguration -from ._models_py3 import VirtualMachineScaleSetUpdateNetworkProfile -from ._models_py3 import VirtualMachineScaleSetUpdateOSDisk -from ._models_py3 import VirtualMachineScaleSetUpdateOSProfile -from ._models_py3 import VirtualMachineScaleSetUpdatePublicIPAddressConfiguration -from ._models_py3 import VirtualMachineScaleSetUpdateStorageProfile -from ._models_py3 import VirtualMachineScaleSetUpdateVMProfile -from ._models_py3 import VirtualMachineScaleSetVM -from ._models_py3 import VirtualMachineScaleSetVMExtension -from ._models_py3 import VirtualMachineScaleSetVMExtensionUpdate -from ._models_py3 import VirtualMachineScaleSetVMExtensionsListResult -from ._models_py3 import VirtualMachineScaleSetVMExtensionsSummary -from ._models_py3 import VirtualMachineScaleSetVMInstanceIDs -from ._models_py3 import VirtualMachineScaleSetVMInstanceRequiredIDs -from ._models_py3 import VirtualMachineScaleSetVMInstanceView -from ._models_py3 import VirtualMachineScaleSetVMListResult -from ._models_py3 import VirtualMachineScaleSetVMNetworkProfileConfiguration -from ._models_py3 import VirtualMachineScaleSetVMProfile -from ._models_py3 import VirtualMachineScaleSetVMProtectionPolicy -from ._models_py3 import VirtualMachineScaleSetVMReimageParameters -from ._models_py3 import VirtualMachineSize -from ._models_py3 import VirtualMachineSizeListResult -from ._models_py3 import VirtualMachineSoftwarePatchProperties -from ._models_py3 import VirtualMachineStatusCodeCount -from ._models_py3 import VirtualMachineUpdate -from ._models_py3 import WinRMConfiguration -from ._models_py3 import WinRMListener -from ._models_py3 import WindowsConfiguration +from typing import TYPE_CHECKING -from ._compute_management_client_enums import AvailabilitySetSkuTypes -from ._compute_management_client_enums import CachingTypes -from ._compute_management_client_enums import DedicatedHostLicenseTypes -from ._compute_management_client_enums import DiffDiskOptions -from ._compute_management_client_enums import DiffDiskPlacement -from ._compute_management_client_enums import DiskCreateOptionTypes -from ._compute_management_client_enums import ExecutionState -from ._compute_management_client_enums import HyperVGenerationType -from ._compute_management_client_enums import HyperVGenerationTypes -from ._compute_management_client_enums import IPVersion -from ._compute_management_client_enums import InGuestPatchMode -from ._compute_management_client_enums import IntervalInMins -from ._compute_management_client_enums import MaintenanceOperationResultCodeTypes -from ._compute_management_client_enums import OperatingSystemStateTypes -from ._compute_management_client_enums import OperatingSystemTypes -from ._compute_management_client_enums import OrchestrationServiceNames -from ._compute_management_client_enums import OrchestrationServiceState -from ._compute_management_client_enums import OrchestrationServiceStateAction -from ._compute_management_client_enums import PatchAssessmentState -from ._compute_management_client_enums import PatchOperationStatus -from ._compute_management_client_enums import ProtocolTypes -from ._compute_management_client_enums import ProximityPlacementGroupType -from ._compute_management_client_enums import RebootStatus -from ._compute_management_client_enums import ResourceIdentityType -from ._compute_management_client_enums import RollingUpgradeActionType -from ._compute_management_client_enums import RollingUpgradeStatusCode -from ._compute_management_client_enums import SettingNames -from ._compute_management_client_enums import SoftwareUpdateRebootBehavior -from ._compute_management_client_enums import StatusLevelTypes -from ._compute_management_client_enums import StorageAccountTypes -from ._compute_management_client_enums import UpgradeMode -from ._compute_management_client_enums import UpgradeOperationInvoker -from ._compute_management_client_enums import UpgradeState -from ._compute_management_client_enums import VirtualMachineEvictionPolicyTypes -from ._compute_management_client_enums import VirtualMachinePriorityTypes -from ._compute_management_client_enums import VirtualMachineScaleSetScaleInRules -from ._compute_management_client_enums import VirtualMachineScaleSetSkuScaleType -from ._compute_management_client_enums import VirtualMachineSizeTypes -from ._compute_management_client_enums import VmDiskTypes +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + + +from ._models_py3 import ( # type: ignore + AdditionalCapabilities, + AdditionalUnattendContent, + ApiEntityReference, + ApiError, + ApiErrorBase, + AutomaticOSUpgradePolicy, + AutomaticOSUpgradeProperties, + AutomaticRepairsPolicy, + AvailabilitySet, + AvailabilitySetListResult, + AvailabilitySetUpdate, + AvailablePatchSummary, + BillingProfile, + BootDiagnostics, + BootDiagnosticsInstanceView, + ComputeOperationListResult, + ComputeOperationValue, + DataDisk, + DataDiskImage, + DedicatedHost, + DedicatedHostAllocatableVM, + DedicatedHostAvailableCapacity, + DedicatedHostGroup, + DedicatedHostGroupInstanceView, + DedicatedHostGroupListResult, + DedicatedHostGroupUpdate, + DedicatedHostInstanceView, + DedicatedHostInstanceViewWithName, + DedicatedHostListResult, + DedicatedHostUpdate, + DiagnosticsProfile, + DiffDiskSettings, + DisallowedConfiguration, + DiskEncryptionSetParameters, + DiskEncryptionSettings, + DiskInstanceView, + HardwareProfile, + Image, + ImageDataDisk, + ImageDisk, + ImageListResult, + ImageOSDisk, + ImageReference, + ImageStorageProfile, + ImageUpdate, + InnerError, + InstanceViewStatus, + KeyVaultKeyReference, + KeyVaultSecretReference, + LastPatchInstallationSummary, + LinuxConfiguration, + ListUsagesResult, + LogAnalyticsInputBase, + LogAnalyticsOperationResult, + LogAnalyticsOutput, + MaintenanceRedeployStatus, + ManagedDiskParameters, + NetworkInterfaceReference, + NetworkProfile, + OSDisk, + OSDiskImage, + OSProfile, + OrchestrationServiceStateInput, + OrchestrationServiceSummary, + PatchSettings, + Plan, + ProximityPlacementGroup, + ProximityPlacementGroupListResult, + ProximityPlacementGroupUpdate, + PurchasePlan, + RecoveryWalkResponse, + RequestRateByIntervalInput, + Resource, + RetrieveBootDiagnosticsDataResult, + RollbackStatusInfo, + RollingUpgradePolicy, + RollingUpgradeProgressInfo, + RollingUpgradeRunningStatus, + RollingUpgradeStatusInfo, + RunCommandDocument, + RunCommandDocumentBase, + RunCommandInput, + RunCommandInputParameter, + RunCommandListResult, + RunCommandParameterDefinition, + RunCommandResult, + ScaleInPolicy, + ScheduledEventsProfile, + SecurityProfile, + Sku, + SshConfiguration, + SshPublicKey, + SshPublicKeyGenerateKeyPairResult, + SshPublicKeyResource, + SshPublicKeyUpdateResource, + SshPublicKeysGroupListResult, + StorageProfile, + SubResource, + SubResourceReadOnly, + SubResourceWithColocationStatus, + TerminateNotificationProfile, + ThrottledRequestsInput, + UpdateResource, + UpgradeOperationHistoricalStatusInfo, + UpgradeOperationHistoricalStatusInfoProperties, + UpgradeOperationHistoryStatus, + UpgradePolicy, + Usage, + UsageName, + UserAssignedIdentitiesValue, + VMScaleSetConvertToSinglePlacementGroupInput, + VaultCertificate, + VaultSecretGroup, + VirtualHardDisk, + VirtualMachine, + VirtualMachineAgentInstanceView, + VirtualMachineAssessPatchesResult, + VirtualMachineCaptureParameters, + VirtualMachineCaptureResult, + VirtualMachineExtension, + VirtualMachineExtensionHandlerInstanceView, + VirtualMachineExtensionImage, + VirtualMachineExtensionInstanceView, + VirtualMachineExtensionUpdate, + VirtualMachineExtensionsListResult, + VirtualMachineHealthStatus, + VirtualMachineIdentity, + VirtualMachineImage, + VirtualMachineImageResource, + VirtualMachineInstanceView, + VirtualMachineListResult, + VirtualMachinePatchStatus, + VirtualMachineReimageParameters, + VirtualMachineRunCommand, + VirtualMachineRunCommandInstanceView, + VirtualMachineRunCommandScriptSource, + VirtualMachineRunCommandUpdate, + VirtualMachineRunCommandsListResult, + VirtualMachineScaleSet, + VirtualMachineScaleSetDataDisk, + VirtualMachineScaleSetExtension, + VirtualMachineScaleSetExtensionListResult, + VirtualMachineScaleSetExtensionProfile, + VirtualMachineScaleSetExtensionUpdate, + VirtualMachineScaleSetIPConfiguration, + VirtualMachineScaleSetIdentity, + VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue, + VirtualMachineScaleSetInstanceView, + VirtualMachineScaleSetInstanceViewStatusesSummary, + VirtualMachineScaleSetIpTag, + VirtualMachineScaleSetListOSUpgradeHistory, + VirtualMachineScaleSetListResult, + VirtualMachineScaleSetListSkusResult, + VirtualMachineScaleSetListWithLinkResult, + VirtualMachineScaleSetManagedDiskParameters, + VirtualMachineScaleSetNetworkConfiguration, + VirtualMachineScaleSetNetworkConfigurationDnsSettings, + VirtualMachineScaleSetNetworkProfile, + VirtualMachineScaleSetOSDisk, + VirtualMachineScaleSetOSProfile, + VirtualMachineScaleSetPublicIPAddressConfiguration, + VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings, + VirtualMachineScaleSetReimageParameters, + VirtualMachineScaleSetSku, + VirtualMachineScaleSetSkuCapacity, + VirtualMachineScaleSetStorageProfile, + VirtualMachineScaleSetUpdate, + VirtualMachineScaleSetUpdateIPConfiguration, + VirtualMachineScaleSetUpdateNetworkConfiguration, + VirtualMachineScaleSetUpdateNetworkProfile, + VirtualMachineScaleSetUpdateOSDisk, + VirtualMachineScaleSetUpdateOSProfile, + VirtualMachineScaleSetUpdatePublicIPAddressConfiguration, + VirtualMachineScaleSetUpdateStorageProfile, + VirtualMachineScaleSetUpdateVMProfile, + VirtualMachineScaleSetVM, + VirtualMachineScaleSetVMExtension, + VirtualMachineScaleSetVMExtensionUpdate, + VirtualMachineScaleSetVMExtensionsListResult, + VirtualMachineScaleSetVMExtensionsSummary, + VirtualMachineScaleSetVMInstanceIDs, + VirtualMachineScaleSetVMInstanceRequiredIDs, + VirtualMachineScaleSetVMInstanceView, + VirtualMachineScaleSetVMListResult, + VirtualMachineScaleSetVMNetworkProfileConfiguration, + VirtualMachineScaleSetVMProfile, + VirtualMachineScaleSetVMProtectionPolicy, + VirtualMachineScaleSetVMReimageParameters, + VirtualMachineSize, + VirtualMachineSizeListResult, + VirtualMachineSoftwarePatchProperties, + VirtualMachineStatusCodeCount, + VirtualMachineUpdate, + WinRMConfiguration, + WinRMListener, + WindowsConfiguration, +) + +from ._compute_management_client_enums import ( # type: ignore + AvailabilitySetSkuTypes, + CachingTypes, + DedicatedHostLicenseTypes, + DiffDiskOptions, + DiffDiskPlacement, + DiskCreateOptionTypes, + ExecutionState, + HyperVGenerationType, + HyperVGenerationTypes, + IPVersion, + InGuestPatchMode, + IntervalInMins, + MaintenanceOperationResultCodeTypes, + OperatingSystemStateTypes, + OperatingSystemTypes, + OrchestrationServiceNames, + OrchestrationServiceState, + OrchestrationServiceStateAction, + PatchAssessmentState, + PatchOperationStatus, + ProtocolTypes, + ProximityPlacementGroupType, + RebootStatus, + ResourceIdentityType, + RollingUpgradeActionType, + RollingUpgradeStatusCode, + SettingNames, + SoftwareUpdateRebootBehavior, + StatusLevelTypes, + StorageAccountTypes, + UpgradeMode, + UpgradeOperationInvoker, + UpgradeState, + VirtualMachineEvictionPolicyTypes, + VirtualMachinePriorityTypes, + VirtualMachineScaleSetScaleInRules, + VirtualMachineScaleSetSkuScaleType, + VirtualMachineSizeTypes, + VmDiskTypes, +) 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__ = [ @@ -483,5 +494,5 @@ "VirtualMachineSizeTypes", "VmDiskTypes", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/models/_models_py3.py index 305f8401ce705..6943582d44b78 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/models/_models_py3.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/models/_models_py3.py @@ -1,5 +1,5 @@ -# 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. @@ -16,10 +16,9 @@ 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 if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object @@ -376,7 +375,7 @@ def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kw self.tags = tags -class AvailabilitySet(Resource): # pylint: disable=too-many-instance-attributes +class AvailabilitySet(Resource): """Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see `Manage the @@ -868,7 +867,7 @@ def __init__(self, **kwargs: Any) -> None: self.provider = None -class DataDisk(_serialization.Model): # pylint: disable=too-many-instance-attributes +class DataDisk(_serialization.Model): """Describes a data disk. Variables are only populated by the server, and will be ignored when sending a request. @@ -1039,7 +1038,7 @@ def __init__(self, **kwargs: Any) -> None: self.lun = None -class DedicatedHost(Resource): # pylint: disable=too-many-instance-attributes +class DedicatedHost(Resource): """Specifies information about the Dedicated host. Variables are only populated by the server, and will be ignored when sending a request. @@ -2756,7 +2755,7 @@ def __init__(self, *, secret_url: str, source_vault: "_models.SubResource", **kw self.source_vault = source_vault -class LastPatchInstallationSummary(_serialization.Model): # pylint: disable=too-many-instance-attributes +class LastPatchInstallationSummary(_serialization.Model): """Describes the properties of the last installed patch summary. Variables are only populated by the server, and will be ignored when sending a request. @@ -3323,7 +3322,7 @@ def __init__(self, **kwargs: Any) -> None: self.service_state = None -class OSDisk(_serialization.Model): # pylint: disable=too-many-instance-attributes +class OSDisk(_serialization.Model): """Specifies information about the operating system disk used by the virtual machine. :code:`
`:code:`
` For more information about disks, see `About disks and VHDs for Azure virtual machines @@ -5619,7 +5618,7 @@ def __init__(self, *, uri: Optional[str] = None, **kwargs: Any) -> None: self.uri = uri -class VirtualMachine(Resource): # pylint: disable=too-many-instance-attributes +class VirtualMachine(Resource): """Describes a Virtual Machine. Variables are only populated by the server, and will be ignored when sending a request. @@ -6128,7 +6127,7 @@ def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylin self.resources = None -class VirtualMachineExtension(Resource): # pylint: disable=too-many-instance-attributes +class VirtualMachineExtension(Resource): """Describes a Virtual Machine Extension. Variables are only populated by the server, and will be ignored when sending a request. @@ -6801,7 +6800,7 @@ def __init__( self.disallowed = disallowed -class VirtualMachineInstanceView(_serialization.Model): # pylint: disable=too-many-instance-attributes +class VirtualMachineInstanceView(_serialization.Model): """The instance view of a virtual machine. Variables are only populated by the server, and will be ignored when sending a request. @@ -7049,7 +7048,7 @@ def __init__(self, *, temp_disk: Optional[bool] = None, **kwargs: Any) -> None: self.temp_disk = temp_disk -class VirtualMachineRunCommand(Resource): # pylint: disable=too-many-instance-attributes +class VirtualMachineRunCommand(Resource): """Describes a Virtual Machine run command. Variables are only populated by the server, and will be ignored when sending a request. @@ -7332,7 +7331,7 @@ def __init__( self.next_link = next_link -class VirtualMachineRunCommandUpdate(UpdateResource): # pylint: disable=too-many-instance-attributes +class VirtualMachineRunCommandUpdate(UpdateResource): """Describes a Virtual Machine run command. Variables are only populated by the server, and will be ignored when sending a request. @@ -7445,7 +7444,7 @@ def __init__( self.instance_view = None -class VirtualMachineScaleSet(Resource): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSet(Resource): """Describes a Virtual Machine Scale Set. Variables are only populated by the server, and will be ignored when sending a request. @@ -7779,7 +7778,7 @@ def __init__( self.disk_m_bps_read_write = disk_m_bps_read_write -class VirtualMachineScaleSetExtension(SubResourceReadOnly): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetExtension(SubResourceReadOnly): """Describes a Virtual Machine Scale Set Extension. Variables are only populated by the server, and will be ignored when sending a request. @@ -7976,7 +7975,7 @@ def __init__( self.extensions_time_budget = extensions_time_budget -class VirtualMachineScaleSetExtensionUpdate(SubResourceReadOnly): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetExtensionUpdate(SubResourceReadOnly): """Describes a Virtual Machine Scale Set Extension. Variables are only populated by the server, and will be ignored when sending a request. @@ -9322,7 +9321,7 @@ def __init__( self.data_disks = data_disks -class VirtualMachineScaleSetUpdate(UpdateResource): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetUpdate(UpdateResource): """Describes a Virtual Machine Scale Set. :ivar tags: Resource tags. @@ -10014,7 +10013,7 @@ def __init__( self.scheduled_events_profile = scheduled_events_profile -class VirtualMachineScaleSetVM(Resource): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetVM(Resource): """Describes a virtual machine scale set virtual machine. Variables are only populated by the server, and will be ignored when sending a request. @@ -10258,7 +10257,7 @@ def __init__( # pylint: disable=too-many-locals self.protection_policy = protection_policy -class VirtualMachineScaleSetVMExtension(SubResourceReadOnly): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetVMExtension(SubResourceReadOnly): """Describes a VMSS VM Extension. Variables are only populated by the server, and will be ignored when sending a request. @@ -10429,7 +10428,7 @@ def __init__(self, **kwargs: Any) -> None: self.statuses_summary = None -class VirtualMachineScaleSetVMExtensionUpdate(SubResourceReadOnly): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetVMExtensionUpdate(SubResourceReadOnly): """Describes a VMSS VM Extension. Variables are only populated by the server, and will be ignored when sending a request. @@ -10584,7 +10583,7 @@ def __init__(self, *, instance_ids: List[str], **kwargs: Any) -> None: self.instance_ids = instance_ids -class VirtualMachineScaleSetVMInstanceView(_serialization.Model): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetVMInstanceView(_serialization.Model): """The instance view of a virtual machine scale set VM. Variables are only populated by the server, and will be ignored when sending a request. @@ -10768,7 +10767,7 @@ def __init__( self.network_interface_configurations = network_interface_configurations -class VirtualMachineScaleSetVMProfile(_serialization.Model): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetVMProfile(_serialization.Model): """Describes a virtual machine scale set virtual machine profile. :ivar os_profile: Specifies the operating system settings for the virtual machines in the scale @@ -11137,7 +11136,7 @@ def __init__(self, **kwargs: Any) -> None: self.count = None -class VirtualMachineUpdate(UpdateResource): # pylint: disable=too-many-instance-attributes +class VirtualMachineUpdate(UpdateResource): """Describes a Virtual Machine Update. Variables are only populated by the server, and will be ignored when sending a request. diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/operations/__init__.py index 263a5499b7f1e..dfc04c351e854 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/operations/__init__.py @@ -5,31 +5,37 @@ # Code generated by Microsoft (R) AutoRest 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 AvailabilitySetsOperations -from ._operations import ProximityPlacementGroupsOperations -from ._operations import DedicatedHostGroupsOperations -from ._operations import DedicatedHostsOperations -from ._operations import SshPublicKeysOperations -from ._operations import VirtualMachineExtensionImagesOperations -from ._operations import VirtualMachineExtensionsOperations -from ._operations import VirtualMachineImagesOperations -from ._operations import UsageOperations -from ._operations import VirtualMachinesOperations -from ._operations import VirtualMachineSizesOperations -from ._operations import ImagesOperations -from ._operations import VirtualMachineScaleSetsOperations -from ._operations import VirtualMachineScaleSetExtensionsOperations -from ._operations import VirtualMachineScaleSetRollingUpgradesOperations -from ._operations import VirtualMachineScaleSetVMExtensionsOperations -from ._operations import VirtualMachineScaleSetVMsOperations -from ._operations import LogAnalyticsOperations -from ._operations import VirtualMachineRunCommandsOperations -from ._operations import VirtualMachineScaleSetVMRunCommandsOperations +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 AvailabilitySetsOperations # type: ignore +from ._operations import ProximityPlacementGroupsOperations # type: ignore +from ._operations import DedicatedHostGroupsOperations # type: ignore +from ._operations import DedicatedHostsOperations # type: ignore +from ._operations import SshPublicKeysOperations # type: ignore +from ._operations import VirtualMachineExtensionImagesOperations # type: ignore +from ._operations import VirtualMachineExtensionsOperations # type: ignore +from ._operations import VirtualMachineImagesOperations # type: ignore +from ._operations import UsageOperations # type: ignore +from ._operations import VirtualMachinesOperations # type: ignore +from ._operations import VirtualMachineSizesOperations # type: ignore +from ._operations import ImagesOperations # type: ignore +from ._operations import VirtualMachineScaleSetsOperations # type: ignore +from ._operations import VirtualMachineScaleSetExtensionsOperations # type: ignore +from ._operations import VirtualMachineScaleSetRollingUpgradesOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMExtensionsOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMsOperations # type: ignore +from ._operations import LogAnalyticsOperations # type: ignore +from ._operations import VirtualMachineRunCommandsOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMRunCommandsOperations # 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__ = [ @@ -55,5 +61,5 @@ "VirtualMachineRunCommandsOperations", "VirtualMachineScaleSetVMRunCommandsOperations", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/operations/_operations.py index 09cc1df419812..8e47856497628 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/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. @@ -8,22 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import ( - Any, - Callable, - Dict, - IO, - Iterable, - Iterator, - List, - Literal, - Optional, - Type, - TypeVar, - Union, - cast, - overload, -) +from typing import Any, Callable, Dict, IO, Iterable, Iterator, List, Literal, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -51,7 +36,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, HttpResponse], T, Dict[str, Any]], Any]] @@ -4663,7 +4648,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.ComputeOperationValue"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.ComputeOperationListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4816,7 +4801,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2020_06_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4943,7 +4928,7 @@ def update( :rtype: ~azure.mgmt.compute.v2020_06_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5011,7 +4996,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5061,7 +5046,7 @@ def get(self, resource_group_name: str, availability_set_name: str, **kwargs: An :rtype: ~azure.mgmt.compute.v2020_06_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5122,7 +5107,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5199,7 +5184,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Ava api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5281,7 +5266,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5439,7 +5424,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2020_06_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5569,7 +5554,7 @@ def update( :rtype: ~azure.mgmt.compute.v2020_06_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5637,7 +5622,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5697,7 +5682,7 @@ def get( :rtype: ~azure.mgmt.compute.v2020_06_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5756,7 +5741,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.ProximityPlac api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5836,7 +5821,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5997,7 +5982,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2020_06_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6124,7 +6109,7 @@ def update( :rtype: ~azure.mgmt.compute.v2020_06_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6192,7 +6177,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6253,7 +6238,7 @@ def get( :rtype: ~azure.mgmt.compute.v2020_06_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6313,7 +6298,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6389,7 +6374,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.DedicatedHost api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6478,7 +6463,7 @@ def _create_or_update_initial( parameters: Union[_models.DedicatedHost, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6679,7 +6664,7 @@ def _update_initial( parameters: Union[_models.DedicatedHostUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6875,7 +6860,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7005,7 +6990,7 @@ def get( :rtype: ~azure.mgmt.compute.v2020_06_01.models.DedicatedHost :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7070,7 +7055,7 @@ def list_by_host_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.DedicatedHostListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7170,7 +7155,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.SshPublicKeyR api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7251,7 +7236,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7385,7 +7370,7 @@ def create( :rtype: ~azure.mgmt.compute.v2020_06_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7513,7 +7498,7 @@ def update( :rtype: ~azure.mgmt.compute.v2020_06_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7581,7 +7566,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7631,7 +7616,7 @@ def get(self, resource_group_name: str, ssh_public_key_name: str, **kwargs: Any) :rtype: ~azure.mgmt.compute.v2020_06_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7689,7 +7674,7 @@ def generate_key_pair( :rtype: ~azure.mgmt.compute.v2020_06_01.models.SshPublicKeyGenerateKeyPairResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7770,7 +7755,7 @@ def get( :rtype: ~azure.mgmt.compute.v2020_06_01.models.VirtualMachineExtensionImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7828,7 +7813,7 @@ def list_types( :rtype: list[~azure.mgmt.compute.v2020_06_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7900,7 +7885,7 @@ def list_versions( :rtype: list[~azure.mgmt.compute.v2020_06_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7975,7 +7960,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineExtension, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8185,7 +8170,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineExtensionUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8391,7 +8376,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_name: str, vm_extension_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8521,7 +8506,7 @@ def get( :rtype: ~azure.mgmt.compute.v2020_06_01.models.VirtualMachineExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8581,7 +8566,7 @@ def list( :rtype: ~azure.mgmt.compute.v2020_06_01.models.VirtualMachineExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8665,7 +8650,7 @@ def get( :rtype: ~azure.mgmt.compute.v2020_06_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8744,7 +8729,7 @@ def list( :rtype: list[~azure.mgmt.compute.v2020_06_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8805,7 +8790,7 @@ def list_offers( :rtype: list[~azure.mgmt.compute.v2020_06_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8857,7 +8842,7 @@ def list_publishers(self, location: str, **kwargs: Any) -> List[_models.VirtualM :rtype: list[~azure.mgmt.compute.v2020_06_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8914,7 +8899,7 @@ def list_skus( :rtype: list[~azure.mgmt.compute.v2020_06_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8995,7 +8980,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.Usage"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.ListUsagesResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9094,7 +9079,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> Iterable["_models.Vi api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9162,7 +9147,7 @@ def _capture_initial( parameters: Union[_models.VirtualMachineCaptureParameters, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9360,7 +9345,7 @@ def _create_or_update_initial( parameters: Union[_models.VirtualMachine, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9552,7 +9537,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9737,7 +9722,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_name: str, *, force_deletion: Optional[bool] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9860,7 +9845,7 @@ def get( :rtype: ~azure.mgmt.compute.v2020_06_01.models.VirtualMachine :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9917,7 +9902,7 @@ def instance_view( :rtype: ~azure.mgmt.compute.v2020_06_01.models.VirtualMachineInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9962,7 +9947,7 @@ def instance_view( def _convert_to_managed_disks_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10063,7 +10048,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _deallocate_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10182,7 +10167,7 @@ def generalize( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10237,7 +10222,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Vir api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10316,7 +10301,7 @@ def list_all(self, *, status_only: Optional[str] = None, **kwargs: Any) -> Itera api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10398,7 +10383,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10463,7 +10448,7 @@ def get_next(next_link=None): def _power_off_initial( self, resource_group_name: str, vm_name: str, *, skip_shutdown: bool = False, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10572,7 +10557,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _reapply_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10672,7 +10657,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _restart_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10772,7 +10757,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _start_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10872,7 +10857,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _redeploy_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10978,7 +10963,7 @@ def _reimage_initial( parameters: Optional[Union[_models.VirtualMachineReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11183,7 +11168,7 @@ def retrieve_boot_diagnostics_data( :rtype: ~azure.mgmt.compute.v2020_06_01.models.RetrieveBootDiagnosticsDataResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11227,7 +11212,7 @@ def retrieve_boot_diagnostics_data( return deserialized # type: ignore def _perform_maintenance_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11340,7 +11325,7 @@ def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11379,7 +11364,7 @@ def simulate_eviction( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore def _assess_patches_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11495,7 +11480,7 @@ def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11717,7 +11702,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.VirtualMachine api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11802,7 +11787,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, image_name: str, parameters: Union[_models.Image, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11984,7 +11969,7 @@ def _update_initial( parameters: Union[_models.ImageUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12164,7 +12149,7 @@ def get_long_running_output(pipeline_response): ) def _delete_initial(self, resource_group_name: str, image_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12279,7 +12264,7 @@ def get( :rtype: ~azure.mgmt.compute.v2020_06_01.models.Image :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12338,7 +12323,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12414,7 +12399,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Image"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12502,7 +12487,7 @@ def _create_or_update_initial( parameters: Union[_models.VirtualMachineScaleSet, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12694,7 +12679,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineScaleSetUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12881,7 +12866,7 @@ def get_long_running_output(pipeline_response): ) def _delete_initial(self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12992,7 +12977,7 @@ def get(self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) - :rtype: ~azure.mgmt.compute.v2020_06_01.models.VirtualMachineScaleSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13041,7 +13026,7 @@ def _deallocate_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13236,7 +13221,7 @@ def _delete_instances_initial( vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13429,7 +13414,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2020_06_01.models.VirtualMachineScaleSetInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13489,7 +13474,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Vir api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13568,7 +13553,7 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.VirtualMachineScaleSet"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.VirtualMachineScaleSetListWithLinkResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13651,7 +13636,7 @@ def list_skus( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.VirtualMachineScaleSetListSkusResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13735,7 +13720,7 @@ def get_os_upgrade_history( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.VirtualMachineScaleSetListOSUpgradeHistory] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13806,7 +13791,7 @@ def _power_off_initial( skip_shutdown: bool = False, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14019,7 +14004,7 @@ def _restart_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14208,7 +14193,7 @@ def _start_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14397,7 +14382,7 @@ def _redeploy_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14589,7 +14574,7 @@ def _perform_maintenance_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14787,7 +14772,7 @@ def _update_instances_initial( vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14973,7 +14958,7 @@ def _reimage_initial( vm_scale_set_reimage_input: Optional[Union[_models.VirtualMachineScaleSetReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15166,7 +15151,7 @@ def _reimage_all_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15369,7 +15354,7 @@ def force_recovery_service_fabric_platform_update_domain_walk( # pylint: disabl :rtype: ~azure.mgmt.compute.v2020_06_01.models.RecoveryWalkResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15413,7 +15398,7 @@ def force_recovery_service_fabric_platform_update_domain_walk( # pylint: disabl return deserialized # type: ignore @overload - def convert_to_single_placement_group( # pylint: disable=inconsistent-return-statements + def convert_to_single_placement_group( self, resource_group_name: str, vm_scale_set_name: str, @@ -15441,7 +15426,7 @@ def convert_to_single_placement_group( # pylint: disable=inconsistent-return-st """ @overload - def convert_to_single_placement_group( # pylint: disable=inconsistent-return-statements + def convert_to_single_placement_group( self, resource_group_name: str, vm_scale_set_name: str, @@ -15491,7 +15476,7 @@ def convert_to_single_placement_group( # pylint: disable=inconsistent-return-st :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15548,7 +15533,7 @@ def _set_orchestration_service_state_initial( parameters: Union[_models.OrchestrationServiceStateInput, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15756,7 +15741,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtension, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15967,7 +15952,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtensionUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16174,7 +16159,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, vmss_extension_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16304,7 +16289,7 @@ def get( :rtype: ~azure.mgmt.compute.v2020_06_01.models.VirtualMachineScaleSetExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16370,7 +16355,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.VirtualMachineScaleSetExtensionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16454,7 +16439,7 @@ def __init__(self, *args, **kwargs): self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") def _cancel_initial(self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16556,7 +16541,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_os_upgrade_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16662,7 +16647,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_extension_upgrade_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16779,7 +16764,7 @@ def get_latest( :rtype: ~azure.mgmt.compute.v2020_06_01.models.RollingUpgradeStatusInfo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16851,7 +16836,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetVMExtension, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17071,7 +17056,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetVMExtensionUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17286,7 +17271,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, vm_extension_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17422,7 +17407,7 @@ def get( :rtype: ~azure.mgmt.compute.v2020_06_01.models.VirtualMachineScaleSetVMExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17491,7 +17476,7 @@ def list( :rtype: ~azure.mgmt.compute.v2020_06_01.models.VirtualMachineScaleSetVMExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17568,7 +17553,7 @@ def _reimage_initial( ] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17767,7 +17752,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _reimage_all_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17876,7 +17861,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _deallocate_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17991,7 +17976,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineScaleSetVM, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18195,7 +18180,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18325,7 +18310,7 @@ def get( :rtype: ~azure.mgmt.compute.v2020_06_01.models.VirtualMachineScaleSetVM :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18385,7 +18370,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2020_06_01.models.VirtualMachineScaleSetVMInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18467,7 +18452,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.VirtualMachineScaleSetVMListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18541,7 +18526,7 @@ def _power_off_initial( skip_shutdown: bool = False, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18663,7 +18648,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _restart_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18771,7 +18756,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18879,7 +18864,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _redeploy_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19013,7 +18998,7 @@ def retrieve_boot_diagnostics_data( :rtype: ~azure.mgmt.compute.v2020_06_01.models.RetrieveBootDiagnosticsDataResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19060,7 +19045,7 @@ def retrieve_boot_diagnostics_data( def _perform_maintenance_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19181,7 +19166,7 @@ def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19228,7 +19213,7 @@ def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19447,7 +19432,7 @@ def __init__(self, *args, **kwargs): def _export_request_rate_by_interval_initial( self, location: str, parameters: Union[_models.RequestRateByIntervalInput, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19624,7 +19609,7 @@ def get_long_running_output(pipeline_response): def _export_throttled_requests_initial( self, location: str, parameters: Union[_models.ThrottledRequestsInput, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19834,7 +19819,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.RunCommandDocu api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.RunCommandListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19907,7 +19892,7 @@ def get(self, location: str, command_id: str, **kwargs: Any) -> _models.RunComma :rtype: ~azure.mgmt.compute.v2020_06_01.models.RunCommandDocument :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19957,7 +19942,7 @@ def _create_or_update_initial( run_command: Union[_models.VirtualMachineRunCommand, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20166,7 +20151,7 @@ def _update_initial( run_command: Union[_models.VirtualMachineRunCommandUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20371,7 +20356,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_name: str, run_command_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20501,7 +20486,7 @@ def get_by_virtual_machine( :rtype: ~azure.mgmt.compute.v2020_06_01.models.VirtualMachineRunCommand :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20569,7 +20554,7 @@ def list_by_virtual_machine( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.VirtualMachineRunCommandsListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20662,7 +20647,7 @@ def _create_or_update_initial( run_command: Union[_models.VirtualMachineRunCommand, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20880,7 +20865,7 @@ def _update_initial( run_command: Union[_models.VirtualMachineRunCommandUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21093,7 +21078,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, run_command_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21229,7 +21214,7 @@ def get( :rtype: ~azure.mgmt.compute.v2020_06_01.models.VirtualMachineRunCommand :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21306,7 +21291,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-01")) cls: ClsType[_models.VirtualMachineRunCommandsListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_30/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_30/__init__.py index 3b1b6244b2375..ab7c46e8991db 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_30/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_30/__init__.py @@ -5,15 +5,21 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._compute_management_client import ComputeManagementClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._compute_management_client import ComputeManagementClient # 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__ = [ "ComputeManagementClient", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_30/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_30/_compute_management_client.py index b10c827a2fb1e..2965cbb7a00a5 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_30/_compute_management_client.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_30/_compute_management_client.py @@ -21,11 +21,10 @@ from .operations import DiskAccessesOperations, DiskEncryptionSetsOperations, DisksOperations, SnapshotsOperations if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class ComputeManagementClient: # pylint: disable=client-accepts-api-version-keyword +class ComputeManagementClient: """Compute Client. :ivar disks: DisksOperations operations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_30/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_30/_configuration.py index 351261f5d3a5d..3595328c589a0 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_30/_configuration.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_30/_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 ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ComputeManagementClient. Note that all parameters used to create this instance are saved as instance diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_30/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_30/_version.py index d79b2760319c5..e5754a47ce68f 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_30/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_30/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "33.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_30/aio/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_30/aio/__init__.py index 0715f50185586..d3fd1ba93379a 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_30/aio/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_30/aio/__init__.py @@ -5,12 +5,18 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._compute_management_client import ComputeManagementClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._compute_management_client import ComputeManagementClient # 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__ = [ "ComputeManagementClient", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_30/aio/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_30/aio/_compute_management_client.py index 41d2f872ae2a0..30a2013ee7fd2 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_30/aio/_compute_management_client.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_30/aio/_compute_management_client.py @@ -21,11 +21,10 @@ from .operations import DiskAccessesOperations, DiskEncryptionSetsOperations, DisksOperations, SnapshotsOperations if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class ComputeManagementClient: # pylint: disable=client-accepts-api-version-keyword +class ComputeManagementClient: """Compute Client. :ivar disks: DisksOperations operations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_30/aio/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_30/aio/_configuration.py index d7763f4c48cb1..a979d21eb8f9e 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_30/aio/_configuration.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_30/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 ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ComputeManagementClient. Note that all parameters used to create this instance are saved as instance diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_30/aio/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_30/aio/operations/__init__.py index 23b64bb2c8e06..daa94a7f93b23 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_30/aio/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_30/aio/operations/__init__.py @@ -5,14 +5,20 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._operations import DisksOperations -from ._operations import SnapshotsOperations -from ._operations import DiskEncryptionSetsOperations -from ._operations import DiskAccessesOperations +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._operations import DisksOperations # type: ignore +from ._operations import SnapshotsOperations # type: ignore +from ._operations import DiskEncryptionSetsOperations # type: ignore +from ._operations import DiskAccessesOperations # 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__ = [ @@ -21,5 +27,5 @@ "DiskEncryptionSetsOperations", "DiskAccessesOperations", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_30/aio/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_30/aio/operations/_operations.py index 4ec0fefb2d66e..4f7a80acf4b08 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_30/aio/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_30/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. @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -68,7 +68,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]] @@ -96,7 +96,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.Disk, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -280,7 +280,7 @@ def get_long_running_output(pipeline_response): async def _update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.DiskUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -475,7 +475,7 @@ async def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.compute.v2020_06_30.models.Disk :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -518,7 +518,7 @@ async def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> return deserialized # type: ignore async def _delete_initial(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -635,7 +635,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-30")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -710,7 +710,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Disk"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-30")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -777,7 +777,7 @@ async def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -972,7 +972,7 @@ def get_long_running_output(pipeline_response): async def _revoke_access_initial( self, resource_group_name: str, disk_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1101,7 +1101,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, snapshot_name: str, snapshot: Union[_models.Snapshot, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1292,7 +1292,7 @@ async def _update_initial( snapshot: Union[_models.SnapshotUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1496,7 +1496,7 @@ async def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) :rtype: ~azure.mgmt.compute.v2020_06_30.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1541,7 +1541,7 @@ async def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) async def _delete_initial( self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1659,7 +1659,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-30")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1735,7 +1735,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Snapshot"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-30")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1802,7 +1802,7 @@ async def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1997,7 +1997,7 @@ def get_long_running_output(pipeline_response): async def _revoke_access_initial( self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2130,7 +2130,7 @@ async def _create_or_update_initial( disk_encryption_set: Union[_models.DiskEncryptionSet, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2331,7 +2331,7 @@ async def _update_initial( disk_encryption_set: Union[_models.DiskEncryptionSetUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2542,7 +2542,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2020_06_30.models.DiskEncryptionSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2587,7 +2587,7 @@ async def get( async def _delete_initial( self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2709,7 +2709,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-30")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2785,7 +2785,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.DiskEncryptionSet"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-30")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2867,7 +2867,7 @@ def list_associated_resources( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-30")) cls: ClsType[_models.ResourceUriList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2957,7 +2957,7 @@ async def _create_or_update_initial( disk_access: Union[_models.DiskAccess, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3154,7 +3154,7 @@ async def _update_initial( disk_access: Union[_models.DiskAccessUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3358,7 +3358,7 @@ async def get(self, resource_group_name: str, disk_access_name: str, **kwargs: A :rtype: ~azure.mgmt.compute.v2020_06_30.models.DiskAccess :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3403,7 +3403,7 @@ async def get(self, resource_group_name: str, disk_access_name: str, **kwargs: A async def _delete_initial( self, resource_group_name: str, disk_access_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3523,7 +3523,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-30")) cls: ClsType[_models.DiskAccessList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3599,7 +3599,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.DiskAccess"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-30")) cls: ClsType[_models.DiskAccessList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3675,7 +3675,7 @@ async def get_private_link_resources( :rtype: ~azure.mgmt.compute.v2020_06_30.models.PrivateLinkResourceListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_30/models/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_30/models/__init__.py index b1c48b400c4e4..7e034c64727e6 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_30/models/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_30/models/__init__.py @@ -5,59 +5,70 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._models_py3 import AccessUri -from ._models_py3 import ApiError -from ._models_py3 import ApiErrorBase -from ._models_py3 import CreationData -from ._models_py3 import Disk -from ._models_py3 import DiskAccess -from ._models_py3 import DiskAccessList -from ._models_py3 import DiskAccessUpdate -from ._models_py3 import DiskEncryptionSet -from ._models_py3 import DiskEncryptionSetList -from ._models_py3 import DiskEncryptionSetUpdate -from ._models_py3 import DiskList -from ._models_py3 import DiskSku -from ._models_py3 import DiskUpdate -from ._models_py3 import Encryption -from ._models_py3 import EncryptionSetIdentity -from ._models_py3 import EncryptionSettingsCollection -from ._models_py3 import EncryptionSettingsElement -from ._models_py3 import GrantAccessData -from ._models_py3 import ImageDiskReference -from ._models_py3 import InnerError -from ._models_py3 import KeyVaultAndKeyReference -from ._models_py3 import KeyVaultAndSecretReference -from ._models_py3 import PrivateEndpoint -from ._models_py3 import PrivateEndpointConnection -from ._models_py3 import PrivateLinkResource -from ._models_py3 import PrivateLinkResourceListResult -from ._models_py3 import PrivateLinkServiceConnectionState -from ._models_py3 import Resource -from ._models_py3 import ResourceUriList -from ._models_py3 import ShareInfoElement -from ._models_py3 import Snapshot -from ._models_py3 import SnapshotList -from ._models_py3 import SnapshotSku -from ._models_py3 import SnapshotUpdate -from ._models_py3 import SourceVault +from typing import TYPE_CHECKING -from ._compute_management_client_enums import AccessLevel -from ._compute_management_client_enums import DiskCreateOption -from ._compute_management_client_enums import DiskEncryptionSetIdentityType -from ._compute_management_client_enums import DiskEncryptionSetType -from ._compute_management_client_enums import DiskState -from ._compute_management_client_enums import DiskStorageAccountTypes -from ._compute_management_client_enums import EncryptionType -from ._compute_management_client_enums import HyperVGeneration -from ._compute_management_client_enums import NetworkAccessPolicy -from ._compute_management_client_enums import OperatingSystemTypes -from ._compute_management_client_enums import PrivateEndpointConnectionProvisioningState -from ._compute_management_client_enums import PrivateEndpointServiceConnectionStatus -from ._compute_management_client_enums import SnapshotStorageAccountTypes +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + + +from ._models_py3 import ( # type: ignore + AccessUri, + ApiError, + ApiErrorBase, + CreationData, + Disk, + DiskAccess, + DiskAccessList, + DiskAccessUpdate, + DiskEncryptionSet, + DiskEncryptionSetList, + DiskEncryptionSetUpdate, + DiskList, + DiskSku, + DiskUpdate, + Encryption, + EncryptionSetIdentity, + EncryptionSettingsCollection, + EncryptionSettingsElement, + GrantAccessData, + ImageDiskReference, + InnerError, + KeyVaultAndKeyReference, + KeyVaultAndSecretReference, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateLinkResource, + PrivateLinkResourceListResult, + PrivateLinkServiceConnectionState, + Resource, + ResourceUriList, + ShareInfoElement, + Snapshot, + SnapshotList, + SnapshotSku, + SnapshotUpdate, + SourceVault, +) + +from ._compute_management_client_enums import ( # type: ignore + AccessLevel, + DiskCreateOption, + DiskEncryptionSetIdentityType, + DiskEncryptionSetType, + DiskState, + DiskStorageAccountTypes, + EncryptionType, + HyperVGeneration, + NetworkAccessPolicy, + OperatingSystemTypes, + PrivateEndpointConnectionProvisioningState, + PrivateEndpointServiceConnectionStatus, + SnapshotStorageAccountTypes, +) 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__ = [ @@ -111,5 +122,5 @@ "PrivateEndpointServiceConnectionStatus", "SnapshotStorageAccountTypes", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_30/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_30/models/_models_py3.py index e3a7d5bd9adde..6b5bdc2c854e3 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_30/models/_models_py3.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_30/models/_models_py3.py @@ -1,5 +1,5 @@ -# 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. @@ -12,7 +12,6 @@ from ... import _serialization if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models @@ -283,7 +282,7 @@ def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kw self.tags = tags -class Disk(Resource): # pylint: disable=too-many-instance-attributes +class Disk(Resource): """Disk resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -883,7 +882,7 @@ def __init__(self, *, name: Optional[Union[str, "_models.DiskStorageAccountTypes self.tier = None -class DiskUpdate(_serialization.Model): # pylint: disable=too-many-instance-attributes +class DiskUpdate(_serialization.Model): """Disk update resource. :ivar tags: Resource tags. @@ -1643,7 +1642,7 @@ def __init__(self, **kwargs: Any) -> None: self.vm_uri = None -class Snapshot(Resource): # pylint: disable=too-many-instance-attributes +class Snapshot(Resource): """Snapshot resource. Variables are only populated by the server, and will be ignored when sending a request. diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_30/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_30/operations/__init__.py index 23b64bb2c8e06..daa94a7f93b23 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_30/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_30/operations/__init__.py @@ -5,14 +5,20 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._operations import DisksOperations -from ._operations import SnapshotsOperations -from ._operations import DiskEncryptionSetsOperations -from ._operations import DiskAccessesOperations +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._operations import DisksOperations # type: ignore +from ._operations import SnapshotsOperations # type: ignore +from ._operations import DiskEncryptionSetsOperations # type: ignore +from ._operations import DiskAccessesOperations # 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__ = [ @@ -21,5 +27,5 @@ "DiskEncryptionSetsOperations", "DiskAccessesOperations", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_30/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_30/operations/_operations.py index 2907a9dbf863e..ace9e7eb169ee 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_30/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_30/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. @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -36,7 +36,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, HttpResponse], T, Dict[str, Any]], Any]] @@ -971,7 +971,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.Disk, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1155,7 +1155,7 @@ def get_long_running_output(pipeline_response): def _update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.DiskUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1350,7 +1350,7 @@ def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> _model :rtype: ~azure.mgmt.compute.v2020_06_30.models.Disk :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1393,7 +1393,7 @@ def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> _model return deserialized # type: ignore def _delete_initial(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1510,7 +1510,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-30")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1585,7 +1585,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Disk"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-30")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1652,7 +1652,7 @@ def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1842,7 +1842,7 @@ def get_long_running_output(pipeline_response): ) def _revoke_access_initial(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1969,7 +1969,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, snapshot_name: str, snapshot: Union[_models.Snapshot, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2157,7 +2157,7 @@ def _update_initial( snapshot: Union[_models.SnapshotUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2358,7 +2358,7 @@ def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> _m :rtype: ~azure.mgmt.compute.v2020_06_30.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2401,7 +2401,7 @@ def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> _m return deserialized # type: ignore def _delete_initial(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2518,7 +2518,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-30")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2593,7 +2593,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Snapshot"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-30")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2660,7 +2660,7 @@ def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2850,7 +2850,7 @@ def get_long_running_output(pipeline_response): ) def _revoke_access_initial(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2981,7 +2981,7 @@ def _create_or_update_initial( disk_encryption_set: Union[_models.DiskEncryptionSet, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3179,7 +3179,7 @@ def _update_initial( disk_encryption_set: Union[_models.DiskEncryptionSetUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3385,7 +3385,7 @@ def get(self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: :rtype: ~azure.mgmt.compute.v2020_06_30.models.DiskEncryptionSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3430,7 +3430,7 @@ def get(self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: def _delete_initial( self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3547,7 +3547,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-30")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3622,7 +3622,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.DiskEncryptionSet"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-30")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3704,7 +3704,7 @@ def list_associated_resources( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-30")) cls: ClsType[_models.ResourceUriList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3794,7 +3794,7 @@ def _create_or_update_initial( disk_access: Union[_models.DiskAccess, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3988,7 +3988,7 @@ def _update_initial( disk_access: Union[_models.DiskAccessUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4189,7 +4189,7 @@ def get(self, resource_group_name: str, disk_access_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.compute.v2020_06_30.models.DiskAccess :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4232,7 +4232,7 @@ def get(self, resource_group_name: str, disk_access_name: str, **kwargs: Any) -> return deserialized # type: ignore def _delete_initial(self, resource_group_name: str, disk_access_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4349,7 +4349,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-30")) cls: ClsType[_models.DiskAccessList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4424,7 +4424,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.DiskAccess"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-06-30")) cls: ClsType[_models.DiskAccessList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4500,7 +4500,7 @@ def get_private_link_resources( :rtype: ~azure.mgmt.compute.v2020_06_30.models.PrivateLinkResourceListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_09_30/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_09_30/__init__.py index 3b1b6244b2375..ab7c46e8991db 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_09_30/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_09_30/__init__.py @@ -5,15 +5,21 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._compute_management_client import ComputeManagementClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._compute_management_client import ComputeManagementClient # 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__ = [ "ComputeManagementClient", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_09_30/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_09_30/_compute_management_client.py index 7fdf7798600cb..24b9a62d046d0 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_09_30/_compute_management_client.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_09_30/_compute_management_client.py @@ -36,11 +36,10 @@ ) if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class ComputeManagementClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes +class ComputeManagementClient: # pylint: disable=too-many-instance-attributes """Compute Client. :ivar disks: DisksOperations operations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_09_30/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_09_30/_configuration.py index 772bcbe13f845..4fb308ad98f7b 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_09_30/_configuration.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_09_30/_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 ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ComputeManagementClient. Note that all parameters used to create this instance are saved as instance diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_09_30/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_09_30/_version.py index d79b2760319c5..e5754a47ce68f 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_09_30/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_09_30/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "33.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_09_30/aio/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_09_30/aio/__init__.py index 0715f50185586..d3fd1ba93379a 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_09_30/aio/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_09_30/aio/__init__.py @@ -5,12 +5,18 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._compute_management_client import ComputeManagementClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._compute_management_client import ComputeManagementClient # 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__ = [ "ComputeManagementClient", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_09_30/aio/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_09_30/aio/_compute_management_client.py index ff989d5fd318d..ca8cd683d8f98 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_09_30/aio/_compute_management_client.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_09_30/aio/_compute_management_client.py @@ -36,11 +36,10 @@ ) if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class ComputeManagementClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes +class ComputeManagementClient: # pylint: disable=too-many-instance-attributes """Compute Client. :ivar disks: DisksOperations operations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_09_30/aio/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_09_30/aio/_configuration.py index 55eb9f6137252..a4be33d138ad4 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_09_30/aio/_configuration.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_09_30/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 ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ComputeManagementClient. Note that all parameters used to create this instance are saved as instance diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_09_30/aio/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_09_30/aio/operations/__init__.py index a3d6fa4cab6eb..913196ea384f4 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_09_30/aio/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_09_30/aio/operations/__init__.py @@ -5,24 +5,30 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._operations import DisksOperations -from ._operations import SnapshotsOperations -from ._operations import DiskEncryptionSetsOperations -from ._operations import DiskAccessesOperations -from ._operations import DiskRestorePointOperations -from ._operations import GalleriesOperations -from ._operations import GalleryImagesOperations -from ._operations import GalleryImageVersionsOperations -from ._operations import GalleryApplicationsOperations -from ._operations import GalleryApplicationVersionsOperations -from ._operations import GallerySharingProfileOperations -from ._operations import SharedGalleriesOperations -from ._operations import SharedGalleryImagesOperations -from ._operations import SharedGalleryImageVersionsOperations +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._operations import DisksOperations # type: ignore +from ._operations import SnapshotsOperations # type: ignore +from ._operations import DiskEncryptionSetsOperations # type: ignore +from ._operations import DiskAccessesOperations # type: ignore +from ._operations import DiskRestorePointOperations # type: ignore +from ._operations import GalleriesOperations # type: ignore +from ._operations import GalleryImagesOperations # type: ignore +from ._operations import GalleryImageVersionsOperations # type: ignore +from ._operations import GalleryApplicationsOperations # type: ignore +from ._operations import GalleryApplicationVersionsOperations # type: ignore +from ._operations import GallerySharingProfileOperations # type: ignore +from ._operations import SharedGalleriesOperations # type: ignore +from ._operations import SharedGalleryImagesOperations # type: ignore +from ._operations import SharedGalleryImageVersionsOperations # 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__ = [ @@ -41,5 +47,5 @@ "SharedGalleryImagesOperations", "SharedGalleryImageVersionsOperations", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_09_30/aio/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_09_30/aio/operations/_operations.py index 2e287b5a63f3d..f8ea254b4b501 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_09_30/aio/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_09_30/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. @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -107,7 +107,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]] @@ -135,7 +135,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.Disk, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -319,7 +319,7 @@ def get_long_running_output(pipeline_response): async def _update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.DiskUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -514,7 +514,7 @@ async def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.compute.v2020_09_30.models.Disk :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -557,7 +557,7 @@ async def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> return deserialized # type: ignore async def _delete_initial(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -674,7 +674,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-09-30")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -749,7 +749,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Disk"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-09-30")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -816,7 +816,7 @@ async def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1011,7 +1011,7 @@ def get_long_running_output(pipeline_response): async def _revoke_access_initial( self, resource_group_name: str, disk_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1140,7 +1140,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, snapshot_name: str, snapshot: Union[_models.Snapshot, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1331,7 +1331,7 @@ async def _update_initial( snapshot: Union[_models.SnapshotUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1535,7 +1535,7 @@ async def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) :rtype: ~azure.mgmt.compute.v2020_09_30.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1580,7 +1580,7 @@ async def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) async def _delete_initial( self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1698,7 +1698,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-09-30")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1774,7 +1774,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Snapshot"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-09-30")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1841,7 +1841,7 @@ async def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2036,7 +2036,7 @@ def get_long_running_output(pipeline_response): async def _revoke_access_initial( self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2169,7 +2169,7 @@ async def _create_or_update_initial( disk_encryption_set: Union[_models.DiskEncryptionSet, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2370,7 +2370,7 @@ async def _update_initial( disk_encryption_set: Union[_models.DiskEncryptionSetUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2581,7 +2581,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2020_09_30.models.DiskEncryptionSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2626,7 +2626,7 @@ async def get( async def _delete_initial( self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2748,7 +2748,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-09-30")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2824,7 +2824,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.DiskEncryptionSet"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-09-30")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2906,7 +2906,7 @@ def list_associated_resources( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-09-30")) cls: ClsType[_models.ResourceUriList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2996,7 +2996,7 @@ async def _create_or_update_initial( disk_access: Union[_models.DiskAccess, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3193,7 +3193,7 @@ async def _update_initial( disk_access: Union[_models.DiskAccessUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3397,7 +3397,7 @@ async def get(self, resource_group_name: str, disk_access_name: str, **kwargs: A :rtype: ~azure.mgmt.compute.v2020_09_30.models.DiskAccess :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3442,7 +3442,7 @@ async def get(self, resource_group_name: str, disk_access_name: str, **kwargs: A async def _delete_initial( self, resource_group_name: str, disk_access_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3562,7 +3562,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-09-30")) cls: ClsType[_models.DiskAccessList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3638,7 +3638,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.DiskAccess"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-09-30")) cls: ClsType[_models.DiskAccessList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3714,7 +3714,7 @@ async def get_private_link_resources( :rtype: ~azure.mgmt.compute.v2020_09_30.models.PrivateLinkResourceListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3764,7 +3764,7 @@ async def _update_a_private_endpoint_connection_initial( # pylint: disable=name private_endpoint_connection: Union[_models.PrivateEndpointConnection, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3992,7 +3992,7 @@ async def get_a_private_endpoint_connection( :rtype: ~azure.mgmt.compute.v2020_09_30.models.PrivateEndpointConnection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4038,7 +4038,7 @@ async def get_a_private_endpoint_connection( async def _delete_a_private_endpoint_connection_initial( # pylint: disable=name-too-long self, resource_group_name: str, disk_access_name: str, private_endpoint_connection_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4169,7 +4169,7 @@ def list_private_endpoint_connections( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-09-30")) cls: ClsType[_models.PrivateEndpointConnectionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4281,7 +4281,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2020_09_30.models.DiskRestorePoint :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4352,7 +4352,7 @@ def list_by_restore_point( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-09-30")) cls: ClsType[_models.DiskRestorePointList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4439,7 +4439,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, gallery_name: str, gallery: Union[_models.Gallery, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4632,7 +4632,7 @@ async def _update_initial( gallery: Union[_models.GalleryUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4842,7 +4842,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2020_09_30.models.Gallery :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4886,7 +4886,7 @@ async def get( return deserialized # type: ignore async def _delete_initial(self, resource_group_name: str, gallery_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5001,7 +5001,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-09-30")) cls: ClsType[_models.GalleryList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5076,7 +5076,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Gallery"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-09-30")) cls: ClsType[_models.GalleryList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5165,7 +5165,7 @@ async def _create_or_update_initial( gallery_image: Union[_models.GalleryImage, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5377,7 +5377,7 @@ async def _update_initial( gallery_image: Union[_models.GalleryImageUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5596,7 +5596,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2020_09_30.models.GalleryImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5642,7 +5642,7 @@ async def get( async def _delete_initial( self, resource_group_name: str, gallery_name: str, gallery_image_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5770,7 +5770,7 @@ def list_by_gallery( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-09-30")) cls: ClsType[_models.GalleryImageList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5862,7 +5862,7 @@ async def _create_or_update_initial( gallery_image_version: Union[_models.GalleryImageVersion, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6096,7 +6096,7 @@ async def _update_initial( gallery_image_version: Union[_models.GalleryImageVersionUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6352,7 +6352,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2020_09_30.models.GalleryImageVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6405,7 +6405,7 @@ async def _delete_initial( gallery_image_version_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6547,7 +6547,7 @@ def list_by_gallery_image( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-09-30")) cls: ClsType[_models.GalleryImageVersionList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6639,7 +6639,7 @@ async def _create_or_update_initial( gallery_application: Union[_models.GalleryApplication, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6855,7 +6855,7 @@ async def _update_initial( gallery_application: Union[_models.GalleryApplicationUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7081,7 +7081,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2020_09_30.models.GalleryApplication :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7127,7 +7127,7 @@ async def get( async def _delete_initial( self, resource_group_name: str, gallery_name: str, gallery_application_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7256,7 +7256,7 @@ def list_by_gallery( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-09-30")) cls: ClsType[_models.GalleryApplicationList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7348,7 +7348,7 @@ async def _create_or_update_initial( gallery_application_version: Union[_models.GalleryApplicationVersion, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7584,7 +7584,7 @@ async def _update_initial( gallery_application_version: Union[_models.GalleryApplicationVersionUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7842,7 +7842,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2020_09_30.models.GalleryApplicationVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7895,7 +7895,7 @@ async def _delete_initial( gallery_application_version_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8038,7 +8038,7 @@ def list_by_gallery_application( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-09-30")) cls: ClsType[_models.GalleryApplicationVersionList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8129,7 +8129,7 @@ async def _update_initial( sharing_update: Union[_models.SharingUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8357,7 +8357,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-09-30")) cls: ClsType[_models.SharedGalleryList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8431,7 +8431,7 @@ async def get(self, location: str, gallery_unique_name: str, **kwargs: Any) -> _ :rtype: ~azure.mgmt.compute.v2020_09_30.models.SharedGallery :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8523,7 +8523,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-09-30")) cls: ClsType[_models.SharedGalleryImageList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8603,7 +8603,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2020_09_30.models.SharedGalleryImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8701,7 +8701,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-09-30")) cls: ClsType[_models.SharedGalleryImageVersionList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8792,7 +8792,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2020_09_30.models.SharedGalleryImageVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_09_30/models/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_09_30/models/__init__.py index bc06adc36ee8a..757898ed45758 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_09_30/models/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_09_30/models/__init__.py @@ -5,135 +5,146 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._models_py3 import AccessUri -from ._models_py3 import ApiError -from ._models_py3 import ApiErrorBase -from ._models_py3 import CreationData -from ._models_py3 import DataDiskImageEncryption -from ._models_py3 import Disallowed -from ._models_py3 import Disk -from ._models_py3 import DiskAccess -from ._models_py3 import DiskAccessList -from ._models_py3 import DiskAccessUpdate -from ._models_py3 import DiskEncryptionSet -from ._models_py3 import DiskEncryptionSetList -from ._models_py3 import DiskEncryptionSetUpdate -from ._models_py3 import DiskImageEncryption -from ._models_py3 import DiskList -from ._models_py3 import DiskRestorePoint -from ._models_py3 import DiskRestorePointList -from ._models_py3 import DiskSku -from ._models_py3 import DiskUpdate -from ._models_py3 import Encryption -from ._models_py3 import EncryptionImages -from ._models_py3 import EncryptionSetIdentity -from ._models_py3 import EncryptionSettingsCollection -from ._models_py3 import EncryptionSettingsElement -from ._models_py3 import ExtendedLocation -from ._models_py3 import Gallery -from ._models_py3 import GalleryApplication -from ._models_py3 import GalleryApplicationList -from ._models_py3 import GalleryApplicationUpdate -from ._models_py3 import GalleryApplicationVersion -from ._models_py3 import GalleryApplicationVersionList -from ._models_py3 import GalleryApplicationVersionPublishingProfile -from ._models_py3 import GalleryApplicationVersionUpdate -from ._models_py3 import GalleryArtifactPublishingProfileBase -from ._models_py3 import GalleryArtifactSource -from ._models_py3 import GalleryArtifactVersionSource -from ._models_py3 import GalleryDataDiskImage -from ._models_py3 import GalleryDiskImage -from ._models_py3 import GalleryIdentifier -from ._models_py3 import GalleryImage -from ._models_py3 import GalleryImageFeature -from ._models_py3 import GalleryImageIdentifier -from ._models_py3 import GalleryImageList -from ._models_py3 import GalleryImageUpdate -from ._models_py3 import GalleryImageVersion -from ._models_py3 import GalleryImageVersionList -from ._models_py3 import GalleryImageVersionPublishingProfile -from ._models_py3 import GalleryImageVersionStorageProfile -from ._models_py3 import GalleryImageVersionUpdate -from ._models_py3 import GalleryList -from ._models_py3 import GalleryOSDiskImage -from ._models_py3 import GalleryUpdate -from ._models_py3 import GrantAccessData -from ._models_py3 import ImageDiskReference -from ._models_py3 import ImagePurchasePlan -from ._models_py3 import InnerError -from ._models_py3 import KeyForDiskEncryptionSet -from ._models_py3 import KeyVaultAndKeyReference -from ._models_py3 import KeyVaultAndSecretReference -from ._models_py3 import ManagedArtifact -from ._models_py3 import OSDiskImageEncryption -from ._models_py3 import PirResource -from ._models_py3 import PirSharedGalleryResource -from ._models_py3 import PrivateEndpoint -from ._models_py3 import PrivateEndpointConnection -from ._models_py3 import PrivateEndpointConnectionListResult -from ._models_py3 import PrivateLinkResource -from ._models_py3 import PrivateLinkResourceListResult -from ._models_py3 import PrivateLinkServiceConnectionState -from ._models_py3 import ProxyOnlyResource -from ._models_py3 import PurchasePlan -from ._models_py3 import RecommendedMachineConfiguration -from ._models_py3 import RegionalReplicationStatus -from ._models_py3 import ReplicationStatus -from ._models_py3 import Resource -from ._models_py3 import ResourceRange -from ._models_py3 import ResourceUriList -from ._models_py3 import ShareInfoElement -from ._models_py3 import SharedGallery -from ._models_py3 import SharedGalleryImage -from ._models_py3 import SharedGalleryImageList -from ._models_py3 import SharedGalleryImageVersion -from ._models_py3 import SharedGalleryImageVersionList -from ._models_py3 import SharedGalleryList -from ._models_py3 import SharingProfile -from ._models_py3 import SharingProfileGroup -from ._models_py3 import SharingUpdate -from ._models_py3 import Snapshot -from ._models_py3 import SnapshotList -from ._models_py3 import SnapshotSku -from ._models_py3 import SnapshotUpdate -from ._models_py3 import SourceVault -from ._models_py3 import TargetRegion -from ._models_py3 import UpdateResourceDefinition -from ._models_py3 import UserArtifactManage -from ._models_py3 import UserArtifactSource +from typing import TYPE_CHECKING -from ._compute_management_client_enums import AccessLevel -from ._compute_management_client_enums import AggregatedReplicationState -from ._compute_management_client_enums import DiskCreateOption -from ._compute_management_client_enums import DiskEncryptionSetIdentityType -from ._compute_management_client_enums import DiskEncryptionSetType -from ._compute_management_client_enums import DiskState -from ._compute_management_client_enums import DiskStorageAccountTypes -from ._compute_management_client_enums import EncryptionType -from ._compute_management_client_enums import ExtendedLocationTypes -from ._compute_management_client_enums import GalleryApplicationVersionPropertiesProvisioningState -from ._compute_management_client_enums import GalleryImagePropertiesProvisioningState -from ._compute_management_client_enums import GalleryImageVersionPropertiesProvisioningState -from ._compute_management_client_enums import GalleryPropertiesProvisioningState -from ._compute_management_client_enums import GallerySharingPermissionTypes -from ._compute_management_client_enums import HostCaching -from ._compute_management_client_enums import HyperVGeneration -from ._compute_management_client_enums import NetworkAccessPolicy -from ._compute_management_client_enums import OperatingSystemStateTypes -from ._compute_management_client_enums import OperatingSystemTypes -from ._compute_management_client_enums import PrivateEndpointConnectionProvisioningState -from ._compute_management_client_enums import PrivateEndpointServiceConnectionStatus -from ._compute_management_client_enums import ReplicationState -from ._compute_management_client_enums import ReplicationStatusTypes -from ._compute_management_client_enums import SelectPermissions -from ._compute_management_client_enums import SharedToValues -from ._compute_management_client_enums import SharingProfileGroupTypes -from ._compute_management_client_enums import SharingUpdateOperationTypes -from ._compute_management_client_enums import SnapshotStorageAccountTypes -from ._compute_management_client_enums import StorageAccountType +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + + +from ._models_py3 import ( # type: ignore + AccessUri, + ApiError, + ApiErrorBase, + CreationData, + DataDiskImageEncryption, + Disallowed, + Disk, + DiskAccess, + DiskAccessList, + DiskAccessUpdate, + DiskEncryptionSet, + DiskEncryptionSetList, + DiskEncryptionSetUpdate, + DiskImageEncryption, + DiskList, + DiskRestorePoint, + DiskRestorePointList, + DiskSku, + DiskUpdate, + Encryption, + EncryptionImages, + EncryptionSetIdentity, + EncryptionSettingsCollection, + EncryptionSettingsElement, + ExtendedLocation, + Gallery, + GalleryApplication, + GalleryApplicationList, + GalleryApplicationUpdate, + GalleryApplicationVersion, + GalleryApplicationVersionList, + GalleryApplicationVersionPublishingProfile, + GalleryApplicationVersionUpdate, + GalleryArtifactPublishingProfileBase, + GalleryArtifactSource, + GalleryArtifactVersionSource, + GalleryDataDiskImage, + GalleryDiskImage, + GalleryIdentifier, + GalleryImage, + GalleryImageFeature, + GalleryImageIdentifier, + GalleryImageList, + GalleryImageUpdate, + GalleryImageVersion, + GalleryImageVersionList, + GalleryImageVersionPublishingProfile, + GalleryImageVersionStorageProfile, + GalleryImageVersionUpdate, + GalleryList, + GalleryOSDiskImage, + GalleryUpdate, + GrantAccessData, + ImageDiskReference, + ImagePurchasePlan, + InnerError, + KeyForDiskEncryptionSet, + KeyVaultAndKeyReference, + KeyVaultAndSecretReference, + ManagedArtifact, + OSDiskImageEncryption, + PirResource, + PirSharedGalleryResource, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateEndpointConnectionListResult, + PrivateLinkResource, + PrivateLinkResourceListResult, + PrivateLinkServiceConnectionState, + ProxyOnlyResource, + PurchasePlan, + RecommendedMachineConfiguration, + RegionalReplicationStatus, + ReplicationStatus, + Resource, + ResourceRange, + ResourceUriList, + ShareInfoElement, + SharedGallery, + SharedGalleryImage, + SharedGalleryImageList, + SharedGalleryImageVersion, + SharedGalleryImageVersionList, + SharedGalleryList, + SharingProfile, + SharingProfileGroup, + SharingUpdate, + Snapshot, + SnapshotList, + SnapshotSku, + SnapshotUpdate, + SourceVault, + TargetRegion, + UpdateResourceDefinition, + UserArtifactManage, + UserArtifactSource, +) + +from ._compute_management_client_enums import ( # type: ignore + AccessLevel, + AggregatedReplicationState, + DiskCreateOption, + DiskEncryptionSetIdentityType, + DiskEncryptionSetType, + DiskState, + DiskStorageAccountTypes, + EncryptionType, + ExtendedLocationTypes, + GalleryApplicationVersionPropertiesProvisioningState, + GalleryImagePropertiesProvisioningState, + GalleryImageVersionPropertiesProvisioningState, + GalleryPropertiesProvisioningState, + GallerySharingPermissionTypes, + HostCaching, + HyperVGeneration, + NetworkAccessPolicy, + OperatingSystemStateTypes, + OperatingSystemTypes, + PrivateEndpointConnectionProvisioningState, + PrivateEndpointServiceConnectionStatus, + ReplicationState, + ReplicationStatusTypes, + SelectPermissions, + SharedToValues, + SharingProfileGroupTypes, + SharingUpdateOperationTypes, + SnapshotStorageAccountTypes, + StorageAccountType, +) 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__ = [ @@ -263,5 +274,5 @@ "SnapshotStorageAccountTypes", "StorageAccountType", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_09_30/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_09_30/models/_models_py3.py index cedb0b7b3594d..407b5352fd2e0 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_09_30/models/_models_py3.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_09_30/models/_models_py3.py @@ -1,5 +1,5 @@ -# 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. @@ -13,7 +13,6 @@ from ... import _serialization if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models @@ -363,7 +362,7 @@ def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kw self.tags = tags -class Disk(Resource): # pylint: disable=too-many-instance-attributes +class Disk(Resource): """Disk resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -993,7 +992,7 @@ def __init__(self, **kwargs: Any) -> None: self.type = None -class DiskRestorePoint(ProxyOnlyResource): # pylint: disable=too-many-instance-attributes +class DiskRestorePoint(ProxyOnlyResource): """Properties of disk restore point. Variables are only populated by the server, and will be ignored when sending a request. @@ -1145,7 +1144,7 @@ def __init__(self, *, name: Optional[Union[str, "_models.DiskStorageAccountTypes self.tier = None -class DiskUpdate(_serialization.Model): # pylint: disable=too-many-instance-attributes +class DiskUpdate(_serialization.Model): """Disk update resource. :ivar tags: Resource tags. @@ -1641,7 +1640,7 @@ def __init__( self.sharing_profile = sharing_profile -class GalleryApplication(Resource): # pylint: disable=too-many-instance-attributes +class GalleryApplication(Resource): """Specifies information about the gallery Application Definition that you want to create or update. @@ -2454,7 +2453,7 @@ def __init__(self, **kwargs: Any) -> None: self.unique_name = None -class GalleryImage(Resource): # pylint: disable=too-many-instance-attributes +class GalleryImage(Resource): """Specifies information about the gallery image definition that you want to create or update. Variables are only populated by the server, and will be ignored when sending a request. @@ -2722,7 +2721,7 @@ def __init__(self, *, value: List["_models.GalleryImage"], next_link: Optional[s self.next_link = next_link -class GalleryImageUpdate(UpdateResourceDefinition): # pylint: disable=too-many-instance-attributes +class GalleryImageUpdate(UpdateResourceDefinition): """Specifies information about the gallery image definition that you want to update. Variables are only populated by the server, and will be ignored when sending a request. @@ -4064,7 +4063,7 @@ class SharedGallery(PirSharedGalleryResource): """ -class SharedGalleryImage(PirSharedGalleryResource): # pylint: disable=too-many-instance-attributes +class SharedGalleryImage(PirSharedGalleryResource): """Specifies information about the gallery image definition that you want to create or update. Variables are only populated by the server, and will be ignored when sending a request. @@ -4486,7 +4485,7 @@ def __init__( self.groups = groups -class Snapshot(Resource): # pylint: disable=too-many-instance-attributes +class Snapshot(Resource): """Snapshot resource. Variables are only populated by the server, and will be ignored when sending a request. diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_09_30/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_09_30/operations/__init__.py index a3d6fa4cab6eb..913196ea384f4 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_09_30/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_09_30/operations/__init__.py @@ -5,24 +5,30 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._operations import DisksOperations -from ._operations import SnapshotsOperations -from ._operations import DiskEncryptionSetsOperations -from ._operations import DiskAccessesOperations -from ._operations import DiskRestorePointOperations -from ._operations import GalleriesOperations -from ._operations import GalleryImagesOperations -from ._operations import GalleryImageVersionsOperations -from ._operations import GalleryApplicationsOperations -from ._operations import GalleryApplicationVersionsOperations -from ._operations import GallerySharingProfileOperations -from ._operations import SharedGalleriesOperations -from ._operations import SharedGalleryImagesOperations -from ._operations import SharedGalleryImageVersionsOperations +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._operations import DisksOperations # type: ignore +from ._operations import SnapshotsOperations # type: ignore +from ._operations import DiskEncryptionSetsOperations # type: ignore +from ._operations import DiskAccessesOperations # type: ignore +from ._operations import DiskRestorePointOperations # type: ignore +from ._operations import GalleriesOperations # type: ignore +from ._operations import GalleryImagesOperations # type: ignore +from ._operations import GalleryImageVersionsOperations # type: ignore +from ._operations import GalleryApplicationsOperations # type: ignore +from ._operations import GalleryApplicationVersionsOperations # type: ignore +from ._operations import GallerySharingProfileOperations # type: ignore +from ._operations import SharedGalleriesOperations # type: ignore +from ._operations import SharedGalleryImagesOperations # type: ignore +from ._operations import SharedGalleryImageVersionsOperations # 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__ = [ @@ -41,5 +47,5 @@ "SharedGalleryImagesOperations", "SharedGalleryImageVersionsOperations", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_09_30/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_09_30/operations/_operations.py index 2909ed83368cd..5375c919428e4 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_09_30/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_09_30/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. @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -36,7 +36,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, HttpResponse], T, Dict[str, Any]], Any]] @@ -2363,7 +2363,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.Disk, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2547,7 +2547,7 @@ def get_long_running_output(pipeline_response): def _update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.DiskUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2742,7 +2742,7 @@ def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> _model :rtype: ~azure.mgmt.compute.v2020_09_30.models.Disk :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2785,7 +2785,7 @@ def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> _model return deserialized # type: ignore def _delete_initial(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2902,7 +2902,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-09-30")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2977,7 +2977,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Disk"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-09-30")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3044,7 +3044,7 @@ def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3234,7 +3234,7 @@ def get_long_running_output(pipeline_response): ) def _revoke_access_initial(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3361,7 +3361,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, snapshot_name: str, snapshot: Union[_models.Snapshot, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3549,7 +3549,7 @@ def _update_initial( snapshot: Union[_models.SnapshotUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3750,7 +3750,7 @@ def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> _m :rtype: ~azure.mgmt.compute.v2020_09_30.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3793,7 +3793,7 @@ def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> _m return deserialized # type: ignore def _delete_initial(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3910,7 +3910,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-09-30")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3985,7 +3985,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Snapshot"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-09-30")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4052,7 +4052,7 @@ def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4242,7 +4242,7 @@ def get_long_running_output(pipeline_response): ) def _revoke_access_initial(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4373,7 +4373,7 @@ def _create_or_update_initial( disk_encryption_set: Union[_models.DiskEncryptionSet, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4571,7 +4571,7 @@ def _update_initial( disk_encryption_set: Union[_models.DiskEncryptionSetUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4777,7 +4777,7 @@ def get(self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: :rtype: ~azure.mgmt.compute.v2020_09_30.models.DiskEncryptionSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4822,7 +4822,7 @@ def get(self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: def _delete_initial( self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4939,7 +4939,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-09-30")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5014,7 +5014,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.DiskEncryptionSet"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-09-30")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5096,7 +5096,7 @@ def list_associated_resources( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-09-30")) cls: ClsType[_models.ResourceUriList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5186,7 +5186,7 @@ def _create_or_update_initial( disk_access: Union[_models.DiskAccess, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5380,7 +5380,7 @@ def _update_initial( disk_access: Union[_models.DiskAccessUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5581,7 +5581,7 @@ def get(self, resource_group_name: str, disk_access_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.compute.v2020_09_30.models.DiskAccess :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5624,7 +5624,7 @@ def get(self, resource_group_name: str, disk_access_name: str, **kwargs: Any) -> return deserialized # type: ignore def _delete_initial(self, resource_group_name: str, disk_access_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5741,7 +5741,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-09-30")) cls: ClsType[_models.DiskAccessList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5816,7 +5816,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.DiskAccess"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-09-30")) cls: ClsType[_models.DiskAccessList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5892,7 +5892,7 @@ def get_private_link_resources( :rtype: ~azure.mgmt.compute.v2020_09_30.models.PrivateLinkResourceListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5942,7 +5942,7 @@ def _update_a_private_endpoint_connection_initial( # pylint: disable=name-too-l private_endpoint_connection: Union[_models.PrivateEndpointConnection, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6170,7 +6170,7 @@ def get_a_private_endpoint_connection( :rtype: ~azure.mgmt.compute.v2020_09_30.models.PrivateEndpointConnection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6216,7 +6216,7 @@ def get_a_private_endpoint_connection( def _delete_a_private_endpoint_connection_initial( # pylint: disable=name-too-long self, resource_group_name: str, disk_access_name: str, private_endpoint_connection_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6347,7 +6347,7 @@ def list_private_endpoint_connections( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-09-30")) cls: ClsType[_models.PrivateEndpointConnectionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6459,7 +6459,7 @@ def get( :rtype: ~azure.mgmt.compute.v2020_09_30.models.DiskRestorePoint :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6529,7 +6529,7 @@ def list_by_restore_point( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-09-30")) cls: ClsType[_models.DiskRestorePointList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6616,7 +6616,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, gallery_name: str, gallery: Union[_models.Gallery, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6806,7 +6806,7 @@ def _update_initial( gallery: Union[_models.GalleryUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7013,7 +7013,7 @@ def get( :rtype: ~azure.mgmt.compute.v2020_09_30.models.Gallery :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7057,7 +7057,7 @@ def get( return deserialized # type: ignore def _delete_initial(self, resource_group_name: str, gallery_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7172,7 +7172,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-09-30")) cls: ClsType[_models.GalleryList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7247,7 +7247,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Gallery"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-09-30")) cls: ClsType[_models.GalleryList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7336,7 +7336,7 @@ def _create_or_update_initial( gallery_image: Union[_models.GalleryImage, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7548,7 +7548,7 @@ def _update_initial( gallery_image: Union[_models.GalleryImageUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7767,7 +7767,7 @@ def get( :rtype: ~azure.mgmt.compute.v2020_09_30.models.GalleryImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7813,7 +7813,7 @@ def get( def _delete_initial( self, resource_group_name: str, gallery_name: str, gallery_image_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7940,7 +7940,7 @@ def list_by_gallery( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-09-30")) cls: ClsType[_models.GalleryImageList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8032,7 +8032,7 @@ def _create_or_update_initial( gallery_image_version: Union[_models.GalleryImageVersion, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8266,7 +8266,7 @@ def _update_initial( gallery_image_version: Union[_models.GalleryImageVersionUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8522,7 +8522,7 @@ def get( :rtype: ~azure.mgmt.compute.v2020_09_30.models.GalleryImageVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8575,7 +8575,7 @@ def _delete_initial( gallery_image_version_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8717,7 +8717,7 @@ def list_by_gallery_image( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-09-30")) cls: ClsType[_models.GalleryImageVersionList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8809,7 +8809,7 @@ def _create_or_update_initial( gallery_application: Union[_models.GalleryApplication, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9025,7 +9025,7 @@ def _update_initial( gallery_application: Union[_models.GalleryApplicationUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9251,7 +9251,7 @@ def get( :rtype: ~azure.mgmt.compute.v2020_09_30.models.GalleryApplication :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9297,7 +9297,7 @@ def get( def _delete_initial( self, resource_group_name: str, gallery_name: str, gallery_application_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9425,7 +9425,7 @@ def list_by_gallery( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-09-30")) cls: ClsType[_models.GalleryApplicationList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9517,7 +9517,7 @@ def _create_or_update_initial( gallery_application_version: Union[_models.GalleryApplicationVersion, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9753,7 +9753,7 @@ def _update_initial( gallery_application_version: Union[_models.GalleryApplicationVersionUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10011,7 +10011,7 @@ def get( :rtype: ~azure.mgmt.compute.v2020_09_30.models.GalleryApplicationVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10064,7 +10064,7 @@ def _delete_initial( gallery_application_version_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10207,7 +10207,7 @@ def list_by_gallery_application( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-09-30")) cls: ClsType[_models.GalleryApplicationVersionList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10298,7 +10298,7 @@ def _update_initial( sharing_update: Union[_models.SharingUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10522,7 +10522,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-09-30")) cls: ClsType[_models.SharedGalleryList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10596,7 +10596,7 @@ def get(self, location: str, gallery_unique_name: str, **kwargs: Any) -> _models :rtype: ~azure.mgmt.compute.v2020_09_30.models.SharedGallery :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10687,7 +10687,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-09-30")) cls: ClsType[_models.SharedGalleryImageList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10767,7 +10767,7 @@ def get( :rtype: ~azure.mgmt.compute.v2020_09_30.models.SharedGalleryImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10865,7 +10865,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-09-30")) cls: ClsType[_models.SharedGalleryImageVersionList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10956,7 +10956,7 @@ def get( :rtype: ~azure.mgmt.compute.v2020_09_30.models.SharedGalleryImageVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_10_01_preview/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_10_01_preview/__init__.py index 3b1b6244b2375..ab7c46e8991db 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_10_01_preview/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_10_01_preview/__init__.py @@ -5,15 +5,21 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._compute_management_client import ComputeManagementClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._compute_management_client import ComputeManagementClient # 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__ = [ "ComputeManagementClient", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_10_01_preview/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_10_01_preview/_compute_management_client.py index df146dc0ead95..0b939bb453c56 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_10_01_preview/_compute_management_client.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_10_01_preview/_compute_management_client.py @@ -26,11 +26,10 @@ ) if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class ComputeManagementClient: # pylint: disable=client-accepts-api-version-keyword +class ComputeManagementClient: """Compute Client. :ivar cloud_service_role_instances: CloudServiceRoleInstancesOperations operations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_10_01_preview/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_10_01_preview/_configuration.py index 26fdb9f93ef6d..91043cec46850 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_10_01_preview/_configuration.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_10_01_preview/_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 ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ComputeManagementClient. Note that all parameters used to create this instance are saved as instance diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_10_01_preview/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_10_01_preview/_version.py index d79b2760319c5..e5754a47ce68f 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_10_01_preview/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_10_01_preview/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "33.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_10_01_preview/aio/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_10_01_preview/aio/__init__.py index 0715f50185586..d3fd1ba93379a 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_10_01_preview/aio/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_10_01_preview/aio/__init__.py @@ -5,12 +5,18 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._compute_management_client import ComputeManagementClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._compute_management_client import ComputeManagementClient # 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__ = [ "ComputeManagementClient", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_10_01_preview/aio/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_10_01_preview/aio/_compute_management_client.py index 80db094ff6b36..25c31612ae268 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_10_01_preview/aio/_compute_management_client.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_10_01_preview/aio/_compute_management_client.py @@ -26,11 +26,10 @@ ) if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class ComputeManagementClient: # pylint: disable=client-accepts-api-version-keyword +class ComputeManagementClient: """Compute Client. :ivar cloud_service_role_instances: CloudServiceRoleInstancesOperations operations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_10_01_preview/aio/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_10_01_preview/aio/_configuration.py index ad31eb96480fd..944acd5ebdcc8 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_10_01_preview/aio/_configuration.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_10_01_preview/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 ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ComputeManagementClient. Note that all parameters used to create this instance are saved as instance diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_10_01_preview/aio/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_10_01_preview/aio/operations/__init__.py index 08833a7f370c0..5c8637f3b4bcb 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_10_01_preview/aio/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_10_01_preview/aio/operations/__init__.py @@ -5,14 +5,20 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._operations import CloudServiceRoleInstancesOperations -from ._operations import CloudServiceRolesOperations -from ._operations import CloudServicesOperations -from ._operations import CloudServicesUpdateDomainOperations +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._operations import CloudServiceRoleInstancesOperations # type: ignore +from ._operations import CloudServiceRolesOperations # type: ignore +from ._operations import CloudServicesOperations # type: ignore +from ._operations import CloudServicesUpdateDomainOperations # 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__ = [ @@ -21,5 +27,5 @@ "CloudServicesOperations", "CloudServicesUpdateDomainOperations", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_10_01_preview/aio/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_10_01_preview/aio/operations/_operations.py index 34d08d3b1829e..35aa55979b1f3 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_10_01_preview/aio/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_10_01_preview/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. @@ -17,7 +17,6 @@ IO, Literal, Optional, - Type, TypeVar, Union, cast, @@ -78,7 +77,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]] @@ -106,7 +105,7 @@ def __init__(self, *args, **kwargs) -> None: async def _delete_initial( self, role_instance_name: str, resource_group_name: str, cloud_service_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -240,7 +239,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2020_10_01_preview.models.RoleInstance :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -302,7 +301,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2020_10_01_preview.models.RoleInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -380,7 +379,7 @@ def list( ) cls: ClsType[_models.RoleInstanceListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -446,7 +445,7 @@ async def get_next(next_link=None): async def _restart_initial( self, role_instance_name: str, resource_group_name: str, cloud_service_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -559,7 +558,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _reimage_initial( self, role_instance_name: str, resource_group_name: str, cloud_service_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -672,7 +671,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _rebuild_initial( self, role_instance_name: str, resource_group_name: str, cloud_service_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -799,7 +798,7 @@ async def get_remote_desktop_file( :rtype: AsyncIterator[bytes] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -886,7 +885,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2020_10_01_preview.models.CloudServiceRole :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -955,7 +954,7 @@ def list( ) cls: ClsType[_models.CloudServiceRoleListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1045,7 +1044,7 @@ async def _create_or_update_initial( parameters: Optional[Union[_models.CloudService, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1247,7 +1246,7 @@ async def _update_initial( parameters: Optional[Union[_models.CloudServiceUpdate, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1443,7 +1442,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, cloud_service_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1560,7 +1559,7 @@ async def get(self, resource_group_name: str, cloud_service_name: str, **kwargs: :rtype: ~azure.mgmt.compute.v2020_10_01_preview.models.CloudService :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1618,7 +1617,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2020_10_01_preview.models.CloudServiceInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1681,7 +1680,7 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.CloudService"]: ) cls: ClsType[_models.CloudServiceListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1762,7 +1761,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model ) cls: ClsType[_models.CloudServiceListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1826,7 +1825,7 @@ async def get_next(next_link=None): async def _start_initial( self, resource_group_name: str, cloud_service_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1934,7 +1933,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _power_off_initial( self, resource_group_name: str, cloud_service_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2047,7 +2046,7 @@ async def _restart_initial( parameters: Optional[Union[_models.RoleInstances, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2236,7 +2235,7 @@ async def _reimage_initial( parameters: Optional[Union[_models.RoleInstances, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2428,7 +2427,7 @@ async def _rebuild_initial( parameters: Optional[Union[_models.RoleInstances, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2623,7 +2622,7 @@ async def _delete_instances_initial( parameters: Optional[Union[_models.RoleInstances, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2834,7 +2833,7 @@ async def _walk_update_domain_initial( parameters: Optional[Union[_models.UpdateDomain, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3053,7 +3052,7 @@ async def get_update_domain( :rtype: ~azure.mgmt.compute.v2020_10_01_preview.models.UpdateDomain :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3121,7 +3120,7 @@ def list_update_domains( ) cls: ClsType[_models.UpdateDomainListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_10_01_preview/models/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_10_01_preview/models/__init__.py index bd1e7f4399560..ccf1d3048de40 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_10_01_preview/models/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_10_01_preview/models/__init__.py @@ -5,51 +5,62 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._models_py3 import ApiError -from ._models_py3 import ApiErrorBase -from ._models_py3 import CloudService -from ._models_py3 import CloudServiceExtensionProfile -from ._models_py3 import CloudServiceExtensionProperties -from ._models_py3 import CloudServiceInstanceView -from ._models_py3 import CloudServiceListResult -from ._models_py3 import CloudServiceNetworkProfile -from ._models_py3 import CloudServiceOsProfile -from ._models_py3 import CloudServiceProperties -from ._models_py3 import CloudServiceRole -from ._models_py3 import CloudServiceRoleListResult -from ._models_py3 import CloudServiceRoleProfile -from ._models_py3 import CloudServiceRoleProfileProperties -from ._models_py3 import CloudServiceRoleProperties -from ._models_py3 import CloudServiceRoleSku -from ._models_py3 import CloudServiceUpdate -from ._models_py3 import CloudServiceVaultAndSecretReference -from ._models_py3 import CloudServiceVaultCertificate -from ._models_py3 import CloudServiceVaultSecretGroup -from ._models_py3 import Extension -from ._models_py3 import InnerError -from ._models_py3 import InstanceSku -from ._models_py3 import InstanceViewStatusesSummary -from ._models_py3 import LoadBalancerConfiguration -from ._models_py3 import LoadBalancerConfigurationProperties -from ._models_py3 import LoadBalancerFrontendIPConfiguration -from ._models_py3 import LoadBalancerFrontendIPConfigurationProperties -from ._models_py3 import ResourceInstanceViewStatus -from ._models_py3 import RoleInstance -from ._models_py3 import RoleInstanceListResult -from ._models_py3 import RoleInstanceNetworkProfile -from ._models_py3 import RoleInstanceProperties -from ._models_py3 import RoleInstanceView -from ._models_py3 import RoleInstances -from ._models_py3 import StatusCodeCount -from ._models_py3 import SubResource -from ._models_py3 import UpdateDomain -from ._models_py3 import UpdateDomainListResult +from typing import TYPE_CHECKING -from ._compute_management_client_enums import CloudServiceUpgradeMode -from ._compute_management_client_enums import StatusLevelTypes +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + + +from ._models_py3 import ( # type: ignore + ApiError, + ApiErrorBase, + CloudService, + CloudServiceExtensionProfile, + CloudServiceExtensionProperties, + CloudServiceInstanceView, + CloudServiceListResult, + CloudServiceNetworkProfile, + CloudServiceOsProfile, + CloudServiceProperties, + CloudServiceRole, + CloudServiceRoleListResult, + CloudServiceRoleProfile, + CloudServiceRoleProfileProperties, + CloudServiceRoleProperties, + CloudServiceRoleSku, + CloudServiceUpdate, + CloudServiceVaultAndSecretReference, + CloudServiceVaultCertificate, + CloudServiceVaultSecretGroup, + Extension, + InnerError, + InstanceSku, + InstanceViewStatusesSummary, + LoadBalancerConfiguration, + LoadBalancerConfigurationProperties, + LoadBalancerFrontendIPConfiguration, + LoadBalancerFrontendIPConfigurationProperties, + ResourceInstanceViewStatus, + RoleInstance, + RoleInstanceListResult, + RoleInstanceNetworkProfile, + RoleInstanceProperties, + RoleInstanceView, + RoleInstances, + StatusCodeCount, + SubResource, + UpdateDomain, + UpdateDomainListResult, +) + +from ._compute_management_client_enums import ( # type: ignore + CloudServiceUpgradeMode, + StatusLevelTypes, +) 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__ = [ @@ -95,5 +106,5 @@ "CloudServiceUpgradeMode", "StatusLevelTypes", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_10_01_preview/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_10_01_preview/models/_models_py3.py index 299197e5fc9cb..0699aacec4788 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_10_01_preview/models/_models_py3.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_10_01_preview/models/_models_py3.py @@ -1,5 +1,5 @@ -# 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. @@ -12,7 +12,6 @@ from ... import _serialization if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models @@ -449,7 +448,7 @@ def __init__( self.secrets = secrets -class CloudServiceProperties(_serialization.Model): # pylint: disable=too-many-instance-attributes +class CloudServiceProperties(_serialization.Model): """Cloud service properties. Variables are only populated by the server, and will be ignored when sending a request. diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_10_01_preview/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_10_01_preview/operations/__init__.py index 08833a7f370c0..5c8637f3b4bcb 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_10_01_preview/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_10_01_preview/operations/__init__.py @@ -5,14 +5,20 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._operations import CloudServiceRoleInstancesOperations -from ._operations import CloudServiceRolesOperations -from ._operations import CloudServicesOperations -from ._operations import CloudServicesUpdateDomainOperations +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._operations import CloudServiceRoleInstancesOperations # type: ignore +from ._operations import CloudServiceRolesOperations # type: ignore +from ._operations import CloudServicesOperations # type: ignore +from ._operations import CloudServicesUpdateDomainOperations # 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__ = [ @@ -21,5 +27,5 @@ "CloudServicesOperations", "CloudServicesUpdateDomainOperations", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_10_01_preview/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_10_01_preview/operations/_operations.py index a851a4d48bfac..ce8618c4ab844 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_10_01_preview/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_10_01_preview/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. @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Iterable, Iterator, Literal, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Iterable, Iterator, Literal, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -36,7 +36,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, HttpResponse], T, Dict[str, Any]], Any]] @@ -909,7 +909,7 @@ def __init__(self, *args, **kwargs): def _delete_initial( self, role_instance_name: str, resource_group_name: str, cloud_service_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1043,7 +1043,7 @@ def get( :rtype: ~azure.mgmt.compute.v2020_10_01_preview.models.RoleInstance :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1105,7 +1105,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2020_10_01_preview.models.RoleInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1183,7 +1183,7 @@ def list( ) cls: ClsType[_models.RoleInstanceListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1249,7 +1249,7 @@ def get_next(next_link=None): def _restart_initial( self, role_instance_name: str, resource_group_name: str, cloud_service_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1362,7 +1362,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _reimage_initial( self, role_instance_name: str, resource_group_name: str, cloud_service_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1475,7 +1475,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _rebuild_initial( self, role_instance_name: str, resource_group_name: str, cloud_service_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1602,7 +1602,7 @@ def get_remote_desktop_file( :rtype: Iterator[bytes] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1689,7 +1689,7 @@ def get( :rtype: ~azure.mgmt.compute.v2020_10_01_preview.models.CloudServiceRole :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1758,7 +1758,7 @@ def list( ) cls: ClsType[_models.CloudServiceRoleListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1848,7 +1848,7 @@ def _create_or_update_initial( parameters: Optional[Union[_models.CloudService, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2050,7 +2050,7 @@ def _update_initial( parameters: Optional[Union[_models.CloudServiceUpdate, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2244,7 +2244,7 @@ def get_long_running_output(pipeline_response): ) def _delete_initial(self, resource_group_name: str, cloud_service_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2359,7 +2359,7 @@ def get(self, resource_group_name: str, cloud_service_name: str, **kwargs: Any) :rtype: ~azure.mgmt.compute.v2020_10_01_preview.models.CloudService :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2417,7 +2417,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2020_10_01_preview.models.CloudServiceInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2480,7 +2480,7 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.CloudService"]: ) cls: ClsType[_models.CloudServiceListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2561,7 +2561,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Clo ) cls: ClsType[_models.CloudServiceListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2623,7 +2623,7 @@ def get_next(next_link=None): return ItemPaged(get_next, extract_data) def _start_initial(self, resource_group_name: str, cloud_service_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2727,7 +2727,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _power_off_initial(self, resource_group_name: str, cloud_service_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2838,7 +2838,7 @@ def _restart_initial( parameters: Optional[Union[_models.RoleInstances, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3027,7 +3027,7 @@ def _reimage_initial( parameters: Optional[Union[_models.RoleInstances, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3219,7 +3219,7 @@ def _rebuild_initial( parameters: Optional[Union[_models.RoleInstances, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3414,7 +3414,7 @@ def _delete_instances_initial( parameters: Optional[Union[_models.RoleInstances, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3625,7 +3625,7 @@ def _walk_update_domain_initial( parameters: Optional[Union[_models.UpdateDomain, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3844,7 +3844,7 @@ def get_update_domain( :rtype: ~azure.mgmt.compute.v2020_10_01_preview.models.UpdateDomain :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3912,7 +3912,7 @@ def list_update_domains( ) cls: ClsType[_models.UpdateDomainListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/__init__.py index 3b1b6244b2375..ab7c46e8991db 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/__init__.py @@ -5,15 +5,21 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._compute_management_client import ComputeManagementClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._compute_management_client import ComputeManagementClient # 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__ = [ "ComputeManagementClient", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/_compute_management_client.py index e25999cd41a9b..527459e95b2de 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/_compute_management_client.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/_compute_management_client.py @@ -49,11 +49,10 @@ ) if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class ComputeManagementClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes +class ComputeManagementClient: # pylint: disable=too-many-instance-attributes """Compute Client. :ivar disks: DisksOperations operations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/_configuration.py index 576357007ca4b..ac1fe8108d833 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/_configuration.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/_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 ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ComputeManagementClient. Note that all parameters used to create this instance are saved as instance diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/_version.py index d79b2760319c5..e5754a47ce68f 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "33.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/aio/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/aio/__init__.py index 0715f50185586..d3fd1ba93379a 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/aio/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/aio/__init__.py @@ -5,12 +5,18 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._compute_management_client import ComputeManagementClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._compute_management_client import ComputeManagementClient # 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__ = [ "ComputeManagementClient", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/aio/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/aio/_compute_management_client.py index 7ba59983bced5..30abc90db34b6 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/aio/_compute_management_client.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/aio/_compute_management_client.py @@ -49,11 +49,10 @@ ) if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class ComputeManagementClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes +class ComputeManagementClient: # pylint: disable=too-many-instance-attributes """Compute Client. :ivar disks: DisksOperations operations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/aio/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/aio/_configuration.py index d44c7062a565b..c88b1b8666de2 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/aio/_configuration.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/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 ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ComputeManagementClient. Note that all parameters used to create this instance are saved as instance diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/aio/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/aio/operations/__init__.py index 3bd1bb1af95e7..a07b449878746 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/aio/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/aio/operations/__init__.py @@ -5,37 +5,43 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._operations import DisksOperations -from ._operations import SnapshotsOperations -from ._operations import DiskEncryptionSetsOperations -from ._operations import DiskAccessesOperations -from ._operations import DiskRestorePointOperations -from ._operations import Operations -from ._operations import AvailabilitySetsOperations -from ._operations import ProximityPlacementGroupsOperations -from ._operations import DedicatedHostGroupsOperations -from ._operations import DedicatedHostsOperations -from ._operations import SshPublicKeysOperations -from ._operations import VirtualMachineExtensionImagesOperations -from ._operations import VirtualMachineExtensionsOperations -from ._operations import VirtualMachineImagesOperations -from ._operations import VirtualMachineImagesEdgeZoneOperations -from ._operations import UsageOperations -from ._operations import VirtualMachinesOperations -from ._operations import VirtualMachineScaleSetsOperations -from ._operations import VirtualMachineSizesOperations -from ._operations import ImagesOperations -from ._operations import VirtualMachineScaleSetExtensionsOperations -from ._operations import VirtualMachineScaleSetRollingUpgradesOperations -from ._operations import VirtualMachineScaleSetVMExtensionsOperations -from ._operations import VirtualMachineScaleSetVMsOperations -from ._operations import LogAnalyticsOperations -from ._operations import VirtualMachineRunCommandsOperations -from ._operations import VirtualMachineScaleSetVMRunCommandsOperations +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._operations import DisksOperations # type: ignore +from ._operations import SnapshotsOperations # type: ignore +from ._operations import DiskEncryptionSetsOperations # type: ignore +from ._operations import DiskAccessesOperations # type: ignore +from ._operations import DiskRestorePointOperations # type: ignore +from ._operations import Operations # type: ignore +from ._operations import AvailabilitySetsOperations # type: ignore +from ._operations import ProximityPlacementGroupsOperations # type: ignore +from ._operations import DedicatedHostGroupsOperations # type: ignore +from ._operations import DedicatedHostsOperations # type: ignore +from ._operations import SshPublicKeysOperations # type: ignore +from ._operations import VirtualMachineExtensionImagesOperations # type: ignore +from ._operations import VirtualMachineExtensionsOperations # type: ignore +from ._operations import VirtualMachineImagesOperations # type: ignore +from ._operations import VirtualMachineImagesEdgeZoneOperations # type: ignore +from ._operations import UsageOperations # type: ignore +from ._operations import VirtualMachinesOperations # type: ignore +from ._operations import VirtualMachineScaleSetsOperations # type: ignore +from ._operations import VirtualMachineSizesOperations # type: ignore +from ._operations import ImagesOperations # type: ignore +from ._operations import VirtualMachineScaleSetExtensionsOperations # type: ignore +from ._operations import VirtualMachineScaleSetRollingUpgradesOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMExtensionsOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMsOperations # type: ignore +from ._operations import LogAnalyticsOperations # type: ignore +from ._operations import VirtualMachineRunCommandsOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMRunCommandsOperations # 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__ = [ @@ -67,5 +73,5 @@ "VirtualMachineRunCommandsOperations", "VirtualMachineScaleSetVMRunCommandsOperations", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/aio/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/aio/operations/_operations.py index 465db8bd41bf8..eacffff85fe07 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/aio/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/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. @@ -18,7 +18,6 @@ List, Literal, Optional, - Type, TypeVar, Union, cast, @@ -241,7 +240,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]] @@ -269,7 +268,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.Disk, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -453,7 +452,7 @@ def get_long_running_output(pipeline_response): async def _update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.DiskUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -648,7 +647,7 @@ async def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.compute.v2020_12_01.models.Disk :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -691,7 +690,7 @@ async def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> return deserialized # type: ignore async def _delete_initial(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -808,7 +807,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -883,7 +882,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Disk"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -950,7 +949,7 @@ async def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1145,7 +1144,7 @@ def get_long_running_output(pipeline_response): async def _revoke_access_initial( self, resource_group_name: str, disk_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1274,7 +1273,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, snapshot_name: str, snapshot: Union[_models.Snapshot, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1465,7 +1464,7 @@ async def _update_initial( snapshot: Union[_models.SnapshotUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1669,7 +1668,7 @@ async def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) :rtype: ~azure.mgmt.compute.v2020_12_01.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1714,7 +1713,7 @@ async def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) async def _delete_initial( self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1832,7 +1831,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1908,7 +1907,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Snapshot"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1975,7 +1974,7 @@ async def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2170,7 +2169,7 @@ def get_long_running_output(pipeline_response): async def _revoke_access_initial( self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2303,7 +2302,7 @@ async def _create_or_update_initial( disk_encryption_set: Union[_models.DiskEncryptionSet, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2504,7 +2503,7 @@ async def _update_initial( disk_encryption_set: Union[_models.DiskEncryptionSetUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2715,7 +2714,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2020_12_01.models.DiskEncryptionSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2760,7 +2759,7 @@ async def get( async def _delete_initial( self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2882,7 +2881,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2958,7 +2957,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.DiskEncryptionSet"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3040,7 +3039,7 @@ def list_associated_resources( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.ResourceUriList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3130,7 +3129,7 @@ async def _create_or_update_initial( disk_access: Union[_models.DiskAccess, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3327,7 +3326,7 @@ async def _update_initial( disk_access: Union[_models.DiskAccessUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3531,7 +3530,7 @@ async def get(self, resource_group_name: str, disk_access_name: str, **kwargs: A :rtype: ~azure.mgmt.compute.v2020_12_01.models.DiskAccess :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3576,7 +3575,7 @@ async def get(self, resource_group_name: str, disk_access_name: str, **kwargs: A async def _delete_initial( self, resource_group_name: str, disk_access_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3696,7 +3695,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.DiskAccessList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3772,7 +3771,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.DiskAccess"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.DiskAccessList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3848,7 +3847,7 @@ async def get_private_link_resources( :rtype: ~azure.mgmt.compute.v2020_12_01.models.PrivateLinkResourceListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3898,7 +3897,7 @@ async def _update_a_private_endpoint_connection_initial( # pylint: disable=name private_endpoint_connection: Union[_models.PrivateEndpointConnection, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4126,7 +4125,7 @@ async def get_a_private_endpoint_connection( :rtype: ~azure.mgmt.compute.v2020_12_01.models.PrivateEndpointConnection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4172,7 +4171,7 @@ async def get_a_private_endpoint_connection( async def _delete_a_private_endpoint_connection_initial( # pylint: disable=name-too-long self, resource_group_name: str, disk_access_name: str, private_endpoint_connection_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4303,7 +4302,7 @@ def list_private_endpoint_connections( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.PrivateEndpointConnectionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4415,7 +4414,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2020_12_01.models.DiskRestorePoint :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4486,7 +4485,7 @@ def list_by_restore_point( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.DiskRestorePointList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4558,7 +4557,7 @@ async def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4792,7 +4791,7 @@ async def _revoke_access_initial( disk_restore_point_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4951,7 +4950,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.ComputeOperationValue"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.ComputeOperationListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5104,7 +5103,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2020_12_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5231,7 +5230,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2020_12_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5286,9 +5285,7 @@ async def update( return deserialized # type: ignore @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, availability_set_name: str, **kwargs: Any - ) -> None: + async def delete(self, resource_group_name: str, availability_set_name: str, **kwargs: Any) -> None: """Delete an availability set. :param resource_group_name: The name of the resource group. Required. @@ -5299,7 +5296,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5349,7 +5346,7 @@ async def get(self, resource_group_name: str, availability_set_name: str, **kwar :rtype: ~azure.mgmt.compute.v2020_12_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5411,7 +5408,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5489,7 +5486,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5572,7 +5569,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5730,7 +5727,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2020_12_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5860,7 +5857,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2020_12_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5915,9 +5912,7 @@ async def update( return deserialized # type: ignore @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, proximity_placement_group_name: str, **kwargs: Any - ) -> None: + async def delete(self, resource_group_name: str, proximity_placement_group_name: str, **kwargs: Any) -> None: """Delete a proximity placement group. :param resource_group_name: The name of the resource group. Required. @@ -5928,7 +5923,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5988,7 +5983,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2020_12_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6047,7 +6042,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Proximit api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6127,7 +6122,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6288,7 +6283,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2020_12_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6415,7 +6410,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2020_12_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6470,9 +6465,7 @@ async def update( return deserialized # type: ignore @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, host_group_name: str, **kwargs: Any - ) -> None: + async def delete(self, resource_group_name: str, host_group_name: str, **kwargs: Any) -> None: """Delete a dedicated host group. :param resource_group_name: The name of the resource group. Required. @@ -6483,7 +6476,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6544,7 +6537,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2020_12_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6607,7 +6600,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6684,7 +6677,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Dedicate api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6773,7 +6766,7 @@ async def _create_or_update_initial( parameters: Union[_models.DedicatedHost, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6977,7 +6970,7 @@ async def _update_initial( parameters: Union[_models.DedicatedHostUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7176,7 +7169,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7306,7 +7299,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2020_12_01.models.DedicatedHost :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7372,7 +7365,7 @@ def list_by_host_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.DedicatedHostListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7472,7 +7465,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.SshPubli api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7553,7 +7546,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7687,7 +7680,7 @@ async def create( :rtype: ~azure.mgmt.compute.v2020_12_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7815,7 +7808,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2020_12_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7870,9 +7863,7 @@ async def update( return deserialized # type: ignore @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, ssh_public_key_name: str, **kwargs: Any - ) -> None: + async def delete(self, resource_group_name: str, ssh_public_key_name: str, **kwargs: Any) -> None: """Delete an SSH public key. :param resource_group_name: The name of the resource group. Required. @@ -7883,7 +7874,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7935,7 +7926,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2020_12_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7993,7 +7984,7 @@ async def generate_key_pair( :rtype: ~azure.mgmt.compute.v2020_12_01.models.SshPublicKeyGenerateKeyPairResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8074,7 +8065,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2020_12_01.models.VirtualMachineExtensionImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8132,7 +8123,7 @@ async def list_types( :rtype: list[~azure.mgmt.compute.v2020_12_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8204,7 +8195,7 @@ async def list_versions( :rtype: list[~azure.mgmt.compute.v2020_12_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8279,7 +8270,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineExtension, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8489,7 +8480,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineExtensionUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8695,7 +8686,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_name: str, vm_extension_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8825,7 +8816,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2020_12_01.models.VirtualMachineExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8885,7 +8876,7 @@ async def list( :rtype: ~azure.mgmt.compute.v2020_12_01.models.VirtualMachineExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8969,7 +8960,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2020_12_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9048,7 +9039,7 @@ async def list( :rtype: list[~azure.mgmt.compute.v2020_12_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9109,7 +9100,7 @@ async def list_offers( :rtype: list[~azure.mgmt.compute.v2020_12_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9161,7 +9152,7 @@ async def list_publishers(self, location: str, **kwargs: Any) -> List[_models.Vi :rtype: list[~azure.mgmt.compute.v2020_12_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9218,7 +9209,7 @@ async def list_skus( :rtype: list[~azure.mgmt.compute.v2020_12_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9304,7 +9295,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2020_12_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9389,7 +9380,7 @@ async def list( :rtype: list[~azure.mgmt.compute.v2020_12_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9454,7 +9445,7 @@ async def list_offers( :rtype: list[~azure.mgmt.compute.v2020_12_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9511,7 +9502,7 @@ async def list_publishers( :rtype: list[~azure.mgmt.compute.v2020_12_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9572,7 +9563,7 @@ async def list_skus( :rtype: list[~azure.mgmt.compute.v2020_12_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9654,7 +9645,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.Usage"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.ListUsagesResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9754,7 +9745,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> AsyncIterable["_mode api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9822,7 +9813,7 @@ async def _capture_initial( parameters: Union[_models.VirtualMachineCaptureParameters, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10020,7 +10011,7 @@ async def _create_or_update_initial( parameters: Union[_models.VirtualMachine, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10215,7 +10206,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10403,7 +10394,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_name: str, *, force_deletion: Optional[bool] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10526,7 +10517,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2020_12_01.models.VirtualMachine :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10583,7 +10574,7 @@ async def instance_view( :rtype: ~azure.mgmt.compute.v2020_12_01.models.VirtualMachineInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10628,7 +10619,7 @@ async def instance_view( async def _convert_to_managed_disks_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10731,7 +10722,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _deallocate_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10832,9 +10823,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace_async - async def generalize( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, vm_name: str, **kwargs: Any - ) -> None: + async def generalize(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> None: """Sets the OS state of the virtual machine to generalized. It is recommended to sysprep the virtual machine before performing this operation. :code:`
`For Windows, please refer to `Create a managed image of a generalized VM in Azure @@ -10850,7 +10839,7 @@ async def generalize( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10906,7 +10895,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10986,7 +10975,7 @@ def list_all(self, *, status_only: Optional[str] = None, **kwargs: Any) -> Async api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11069,7 +11058,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11134,7 +11123,7 @@ async def get_next(next_link=None): async def _power_off_initial( self, resource_group_name: str, vm_name: str, *, skip_shutdown: bool = False, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11243,7 +11232,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _reapply_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11343,7 +11332,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _restart_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11443,7 +11432,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _start_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11543,7 +11532,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _redeploy_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11649,7 +11638,7 @@ async def _reimage_initial( parameters: Optional[Union[_models.VirtualMachineReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11854,7 +11843,7 @@ async def retrieve_boot_diagnostics_data( :rtype: ~azure.mgmt.compute.v2020_12_01.models.RetrieveBootDiagnosticsDataResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11900,7 +11889,7 @@ async def retrieve_boot_diagnostics_data( async def _perform_maintenance_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12002,9 +11991,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace_async - async def simulate_eviction( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, vm_name: str, **kwargs: Any - ) -> None: + async def simulate_eviction(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> None: """The operation to simulate the eviction of spot virtual machine. :param resource_group_name: The name of the resource group. Required. @@ -12015,7 +12002,7 @@ async def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12056,7 +12043,7 @@ async def simulate_eviction( # pylint: disable=inconsistent-return-statements async def _assess_patches_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12172,7 +12159,7 @@ async def _install_patches_initial( install_patches_input: Union[_models.VirtualMachineInstallPatchesParameters, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12370,7 +12357,7 @@ async def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12597,7 +12584,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> AsyncIterable["_mode api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12665,7 +12652,7 @@ async def _create_or_update_initial( parameters: Union[_models.VirtualMachineScaleSet, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12857,7 +12844,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineScaleSetUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13046,7 +13033,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, *, force_deletion: Optional[bool] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13166,7 +13153,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2020_12_01.models.VirtualMachineScaleSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13215,7 +13202,7 @@ async def _deallocate_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13412,7 +13399,7 @@ async def _delete_instances_initial( force_deletion: Optional[bool] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13620,7 +13607,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2020_12_01.models.VirtualMachineScaleSetInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13680,7 +13667,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13759,7 +13746,7 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.VirtualMachineScaleS api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.VirtualMachineScaleSetListWithLinkResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13842,7 +13829,7 @@ def list_skus( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.VirtualMachineScaleSetListSkusResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13908,6 +13895,7 @@ async def get_next(next_link=None): def get_os_upgrade_history( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> AsyncIterable["_models.UpgradeOperationHistoricalStatusInfo"]: + # pylint: disable=line-too-long """Gets list of OS upgrades on a VM scale set instance. :param resource_group_name: The name of the resource group. Required. @@ -13926,7 +13914,7 @@ def get_os_upgrade_history( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.VirtualMachineScaleSetListOSUpgradeHistory] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13997,7 +13985,7 @@ async def _power_off_initial( skip_shutdown: bool = False, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14210,7 +14198,7 @@ async def _restart_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14399,7 +14387,7 @@ async def _start_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14588,7 +14576,7 @@ async def _redeploy_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14780,7 +14768,7 @@ async def _perform_maintenance_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14978,7 +14966,7 @@ async def _update_instances_initial( vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15164,7 +15152,7 @@ async def _reimage_initial( vm_scale_set_reimage_input: Optional[Union[_models.VirtualMachineScaleSetReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15357,7 +15345,7 @@ async def _reimage_all_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15560,7 +15548,7 @@ async def force_recovery_service_fabric_platform_update_domain_walk( # pylint: :rtype: ~azure.mgmt.compute.v2020_12_01.models.RecoveryWalkResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15604,7 +15592,7 @@ async def force_recovery_service_fabric_platform_update_domain_walk( # pylint: return deserialized # type: ignore @overload - async def convert_to_single_placement_group( # pylint: disable=inconsistent-return-statements + async def convert_to_single_placement_group( self, resource_group_name: str, vm_scale_set_name: str, @@ -15632,7 +15620,7 @@ async def convert_to_single_placement_group( # pylint: disable=inconsistent-ret """ @overload - async def convert_to_single_placement_group( # pylint: disable=inconsistent-return-statements + async def convert_to_single_placement_group( self, resource_group_name: str, vm_scale_set_name: str, @@ -15659,7 +15647,7 @@ async def convert_to_single_placement_group( # pylint: disable=inconsistent-ret """ @distributed_trace_async - async def convert_to_single_placement_group( # pylint: disable=inconsistent-return-statements + async def convert_to_single_placement_group( self, resource_group_name: str, vm_scale_set_name: str, @@ -15682,7 +15670,7 @@ async def convert_to_single_placement_group( # pylint: disable=inconsistent-ret :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15739,7 +15727,7 @@ async def _set_orchestration_service_state_initial( parameters: Union[_models.OrchestrationServiceStateInput, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15957,7 +15945,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.VirtualMa api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16042,7 +16030,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, image_name: str, parameters: Union[_models.Image, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16224,7 +16212,7 @@ async def _update_initial( parameters: Union[_models.ImageUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16404,7 +16392,7 @@ def get_long_running_output(pipeline_response): ) async def _delete_initial(self, resource_group_name: str, image_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16519,7 +16507,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2020_12_01.models.Image :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16578,7 +16566,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16654,7 +16642,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Image"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16743,7 +16731,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtension, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16954,7 +16942,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtensionUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17161,7 +17149,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, vmss_extension_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17291,7 +17279,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2020_12_01.models.VirtualMachineScaleSetExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17357,7 +17345,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.VirtualMachineScaleSetExtensionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17443,7 +17431,7 @@ def __init__(self, *args, **kwargs) -> None: async def _cancel_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17547,7 +17535,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_os_upgrade_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17653,7 +17641,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_extension_upgrade_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17770,7 +17758,7 @@ async def get_latest( :rtype: ~azure.mgmt.compute.v2020_12_01.models.RollingUpgradeStatusInfo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17842,7 +17830,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetVMExtension, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18062,7 +18050,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetVMExtensionUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18277,7 +18265,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, vm_extension_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18413,7 +18401,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2020_12_01.models.VirtualMachineScaleSetVMExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18482,7 +18470,7 @@ async def list( :rtype: ~azure.mgmt.compute.v2020_12_01.models.VirtualMachineScaleSetVMExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18559,7 +18547,7 @@ async def _reimage_initial( ] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18758,7 +18746,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _reimage_all_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18867,7 +18855,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _deallocate_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18982,7 +18970,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineScaleSetVM, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19192,7 +19180,7 @@ async def _delete_initial( force_deletion: Optional[bool] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19333,7 +19321,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2020_12_01.models.VirtualMachineScaleSetVM :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19393,7 +19381,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2020_12_01.models.VirtualMachineScaleSetVMInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19475,7 +19463,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.VirtualMachineScaleSetVMListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19549,7 +19537,7 @@ async def _power_off_initial( skip_shutdown: bool = False, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19671,7 +19659,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _restart_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19779,7 +19767,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19887,7 +19875,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _redeploy_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20021,7 +20009,7 @@ async def retrieve_boot_diagnostics_data( :rtype: ~azure.mgmt.compute.v2020_12_01.models.RetrieveBootDiagnosticsDataResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20068,7 +20056,7 @@ async def retrieve_boot_diagnostics_data( async def _perform_maintenance_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20174,7 +20162,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace_async - async def simulate_eviction( # pylint: disable=inconsistent-return-statements + async def simulate_eviction( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: """The operation to simulate the eviction of spot virtual machine in a VM scale set. @@ -20189,7 +20177,7 @@ async def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20236,7 +20224,7 @@ async def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20458,7 +20446,7 @@ def __init__(self, *args, **kwargs) -> None: async def _export_request_rate_by_interval_initial( self, location: str, parameters: Union[_models.RequestRateByIntervalInput, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20636,7 +20624,7 @@ def get_long_running_output(pipeline_response): async def _export_throttled_requests_initial( self, location: str, parameters: Union[_models.ThrottledRequestsInput, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20847,7 +20835,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.RunComman api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.RunCommandListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20920,7 +20908,7 @@ async def get(self, location: str, command_id: str, **kwargs: Any) -> _models.Ru :rtype: ~azure.mgmt.compute.v2020_12_01.models.RunCommandDocument :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20970,7 +20958,7 @@ async def _create_or_update_initial( run_command: Union[_models.VirtualMachineRunCommand, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21179,7 +21167,7 @@ async def _update_initial( run_command: Union[_models.VirtualMachineRunCommandUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21384,7 +21372,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_name: str, run_command_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21514,7 +21502,7 @@ async def get_by_virtual_machine( :rtype: ~azure.mgmt.compute.v2020_12_01.models.VirtualMachineRunCommand :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21582,7 +21570,7 @@ def list_by_virtual_machine( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.VirtualMachineRunCommandsListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21675,7 +21663,7 @@ async def _create_or_update_initial( run_command: Union[_models.VirtualMachineRunCommand, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21893,7 +21881,7 @@ async def _update_initial( run_command: Union[_models.VirtualMachineRunCommandUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22106,7 +22094,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, run_command_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22242,7 +22230,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2020_12_01.models.VirtualMachineRunCommand :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22319,7 +22307,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.VirtualMachineRunCommandsListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/models/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/models/__init__.py index 4fe0da05387c0..f359eb1591f8f 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/models/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/models/__init__.py @@ -5,316 +5,327 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._models_py3 import AccessUri -from ._models_py3 import AdditionalCapabilities -from ._models_py3 import AdditionalUnattendContent -from ._models_py3 import ApiEntityReference -from ._models_py3 import ApiError -from ._models_py3 import ApiErrorBase -from ._models_py3 import AutomaticOSUpgradePolicy -from ._models_py3 import AutomaticOSUpgradeProperties -from ._models_py3 import AutomaticRepairsPolicy -from ._models_py3 import AvailabilitySet -from ._models_py3 import AvailabilitySetListResult -from ._models_py3 import AvailabilitySetUpdate -from ._models_py3 import AvailablePatchSummary -from ._models_py3 import BillingProfile -from ._models_py3 import BootDiagnostics -from ._models_py3 import BootDiagnosticsInstanceView -from ._models_py3 import ComputeOperationListResult -from ._models_py3 import ComputeOperationValue -from ._models_py3 import CreationData -from ._models_py3 import DataDisk -from ._models_py3 import DataDiskImage -from ._models_py3 import DedicatedHost -from ._models_py3 import DedicatedHostAllocatableVM -from ._models_py3 import DedicatedHostAvailableCapacity -from ._models_py3 import DedicatedHostGroup -from ._models_py3 import DedicatedHostGroupInstanceView -from ._models_py3 import DedicatedHostGroupListResult -from ._models_py3 import DedicatedHostGroupUpdate -from ._models_py3 import DedicatedHostInstanceView -from ._models_py3 import DedicatedHostInstanceViewWithName -from ._models_py3 import DedicatedHostListResult -from ._models_py3 import DedicatedHostUpdate -from ._models_py3 import DiagnosticsProfile -from ._models_py3 import DiffDiskSettings -from ._models_py3 import DisallowedConfiguration -from ._models_py3 import Disk -from ._models_py3 import DiskAccess -from ._models_py3 import DiskAccessList -from ._models_py3 import DiskAccessUpdate -from ._models_py3 import DiskEncryptionSet -from ._models_py3 import DiskEncryptionSetList -from ._models_py3 import DiskEncryptionSetParameters -from ._models_py3 import DiskEncryptionSetUpdate -from ._models_py3 import DiskEncryptionSettings -from ._models_py3 import DiskInstanceView -from ._models_py3 import DiskList -from ._models_py3 import DiskRestorePoint -from ._models_py3 import DiskRestorePointList -from ._models_py3 import DiskSecurityProfile -from ._models_py3 import DiskSku -from ._models_py3 import DiskUpdate -from ._models_py3 import Encryption -from ._models_py3 import EncryptionSetIdentity -from ._models_py3 import EncryptionSettingsCollection -from ._models_py3 import EncryptionSettingsElement -from ._models_py3 import ExtendedLocation -from ._models_py3 import GrantAccessData -from ._models_py3 import HardwareProfile -from ._models_py3 import Image -from ._models_py3 import ImageDataDisk -from ._models_py3 import ImageDisk -from ._models_py3 import ImageDiskReference -from ._models_py3 import ImageListResult -from ._models_py3 import ImageOSDisk -from ._models_py3 import ImageReference -from ._models_py3 import ImageStorageProfile -from ._models_py3 import ImageUpdate -from ._models_py3 import InnerError -from ._models_py3 import InstanceViewStatus -from ._models_py3 import KeyForDiskEncryptionSet -from ._models_py3 import KeyVaultAndKeyReference -from ._models_py3 import KeyVaultAndSecretReference -from ._models_py3 import KeyVaultKeyReference -from ._models_py3 import KeyVaultSecretReference -from ._models_py3 import LastPatchInstallationSummary -from ._models_py3 import LinuxConfiguration -from ._models_py3 import LinuxParameters -from ._models_py3 import LinuxPatchSettings -from ._models_py3 import ListUsagesResult -from ._models_py3 import LogAnalyticsInputBase -from ._models_py3 import LogAnalyticsOperationResult -from ._models_py3 import LogAnalyticsOutput -from ._models_py3 import MaintenanceRedeployStatus -from ._models_py3 import ManagedDiskParameters -from ._models_py3 import NetworkInterfaceReference -from ._models_py3 import NetworkProfile -from ._models_py3 import OSDisk -from ._models_py3 import OSDiskImage -from ._models_py3 import OSProfile -from ._models_py3 import OrchestrationServiceStateInput -from ._models_py3 import OrchestrationServiceSummary -from ._models_py3 import PatchInstallationDetail -from ._models_py3 import PatchSettings -from ._models_py3 import Plan -from ._models_py3 import PrivateEndpoint -from ._models_py3 import PrivateEndpointConnection -from ._models_py3 import PrivateEndpointConnectionListResult -from ._models_py3 import PrivateLinkResource -from ._models_py3 import PrivateLinkResourceListResult -from ._models_py3 import PrivateLinkServiceConnectionState -from ._models_py3 import PropertyUpdatesInProgress -from ._models_py3 import ProximityPlacementGroup -from ._models_py3 import ProximityPlacementGroupListResult -from ._models_py3 import ProximityPlacementGroupUpdate -from ._models_py3 import ProxyOnlyResource -from ._models_py3 import PurchasePlan -from ._models_py3 import PurchasePlanAutoGenerated -from ._models_py3 import RecoveryWalkResponse -from ._models_py3 import RequestRateByIntervalInput -from ._models_py3 import Resource -from ._models_py3 import ResourceUriList -from ._models_py3 import RetrieveBootDiagnosticsDataResult -from ._models_py3 import RollbackStatusInfo -from ._models_py3 import RollingUpgradePolicy -from ._models_py3 import RollingUpgradeProgressInfo -from ._models_py3 import RollingUpgradeRunningStatus -from ._models_py3 import RollingUpgradeStatusInfo -from ._models_py3 import RunCommandDocument -from ._models_py3 import RunCommandDocumentBase -from ._models_py3 import RunCommandInput -from ._models_py3 import RunCommandInputParameter -from ._models_py3 import RunCommandListResult -from ._models_py3 import RunCommandParameterDefinition -from ._models_py3 import RunCommandResult -from ._models_py3 import ScaleInPolicy -from ._models_py3 import ScheduledEventsProfile -from ._models_py3 import SecurityProfile -from ._models_py3 import ShareInfoElement -from ._models_py3 import Sku -from ._models_py3 import Snapshot -from ._models_py3 import SnapshotList -from ._models_py3 import SnapshotSku -from ._models_py3 import SnapshotUpdate -from ._models_py3 import SourceVault -from ._models_py3 import SshConfiguration -from ._models_py3 import SshPublicKey -from ._models_py3 import SshPublicKeyGenerateKeyPairResult -from ._models_py3 import SshPublicKeyResource -from ._models_py3 import SshPublicKeyUpdateResource -from ._models_py3 import SshPublicKeysGroupListResult -from ._models_py3 import StorageProfile -from ._models_py3 import SubResource -from ._models_py3 import SubResourceReadOnly -from ._models_py3 import SubResourceWithColocationStatus -from ._models_py3 import TerminateNotificationProfile -from ._models_py3 import ThrottledRequestsInput -from ._models_py3 import UefiSettings -from ._models_py3 import UpdateResource -from ._models_py3 import UpgradeOperationHistoricalStatusInfo -from ._models_py3 import UpgradeOperationHistoricalStatusInfoProperties -from ._models_py3 import UpgradeOperationHistoryStatus -from ._models_py3 import UpgradePolicy -from ._models_py3 import Usage -from ._models_py3 import UsageName -from ._models_py3 import UserAssignedIdentitiesValue -from ._models_py3 import VMScaleSetConvertToSinglePlacementGroupInput -from ._models_py3 import VaultCertificate -from ._models_py3 import VaultSecretGroup -from ._models_py3 import VirtualHardDisk -from ._models_py3 import VirtualMachine -from ._models_py3 import VirtualMachineAgentInstanceView -from ._models_py3 import VirtualMachineAssessPatchesResult -from ._models_py3 import VirtualMachineCaptureParameters -from ._models_py3 import VirtualMachineCaptureResult -from ._models_py3 import VirtualMachineExtension -from ._models_py3 import VirtualMachineExtensionHandlerInstanceView -from ._models_py3 import VirtualMachineExtensionImage -from ._models_py3 import VirtualMachineExtensionInstanceView -from ._models_py3 import VirtualMachineExtensionUpdate -from ._models_py3 import VirtualMachineExtensionsListResult -from ._models_py3 import VirtualMachineHealthStatus -from ._models_py3 import VirtualMachineIdentity -from ._models_py3 import VirtualMachineImage -from ._models_py3 import VirtualMachineImageFeature -from ._models_py3 import VirtualMachineImageResource -from ._models_py3 import VirtualMachineInstallPatchesParameters -from ._models_py3 import VirtualMachineInstallPatchesResult -from ._models_py3 import VirtualMachineInstanceView -from ._models_py3 import VirtualMachineListResult -from ._models_py3 import VirtualMachinePatchStatus -from ._models_py3 import VirtualMachineReimageParameters -from ._models_py3 import VirtualMachineRunCommand -from ._models_py3 import VirtualMachineRunCommandInstanceView -from ._models_py3 import VirtualMachineRunCommandScriptSource -from ._models_py3 import VirtualMachineRunCommandUpdate -from ._models_py3 import VirtualMachineRunCommandsListResult -from ._models_py3 import VirtualMachineScaleSet -from ._models_py3 import VirtualMachineScaleSetDataDisk -from ._models_py3 import VirtualMachineScaleSetExtension -from ._models_py3 import VirtualMachineScaleSetExtensionListResult -from ._models_py3 import VirtualMachineScaleSetExtensionProfile -from ._models_py3 import VirtualMachineScaleSetExtensionUpdate -from ._models_py3 import VirtualMachineScaleSetIPConfiguration -from ._models_py3 import VirtualMachineScaleSetIdentity -from ._models_py3 import VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue -from ._models_py3 import VirtualMachineScaleSetInstanceView -from ._models_py3 import VirtualMachineScaleSetInstanceViewStatusesSummary -from ._models_py3 import VirtualMachineScaleSetIpTag -from ._models_py3 import VirtualMachineScaleSetListOSUpgradeHistory -from ._models_py3 import VirtualMachineScaleSetListResult -from ._models_py3 import VirtualMachineScaleSetListSkusResult -from ._models_py3 import VirtualMachineScaleSetListWithLinkResult -from ._models_py3 import VirtualMachineScaleSetManagedDiskParameters -from ._models_py3 import VirtualMachineScaleSetNetworkConfiguration -from ._models_py3 import VirtualMachineScaleSetNetworkConfigurationDnsSettings -from ._models_py3 import VirtualMachineScaleSetNetworkProfile -from ._models_py3 import VirtualMachineScaleSetOSDisk -from ._models_py3 import VirtualMachineScaleSetOSProfile -from ._models_py3 import VirtualMachineScaleSetPublicIPAddressConfiguration -from ._models_py3 import VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings -from ._models_py3 import VirtualMachineScaleSetReimageParameters -from ._models_py3 import VirtualMachineScaleSetSku -from ._models_py3 import VirtualMachineScaleSetSkuCapacity -from ._models_py3 import VirtualMachineScaleSetStorageProfile -from ._models_py3 import VirtualMachineScaleSetUpdate -from ._models_py3 import VirtualMachineScaleSetUpdateIPConfiguration -from ._models_py3 import VirtualMachineScaleSetUpdateNetworkConfiguration -from ._models_py3 import VirtualMachineScaleSetUpdateNetworkProfile -from ._models_py3 import VirtualMachineScaleSetUpdateOSDisk -from ._models_py3 import VirtualMachineScaleSetUpdateOSProfile -from ._models_py3 import VirtualMachineScaleSetUpdatePublicIPAddressConfiguration -from ._models_py3 import VirtualMachineScaleSetUpdateStorageProfile -from ._models_py3 import VirtualMachineScaleSetUpdateVMProfile -from ._models_py3 import VirtualMachineScaleSetVM -from ._models_py3 import VirtualMachineScaleSetVMExtension -from ._models_py3 import VirtualMachineScaleSetVMExtensionUpdate -from ._models_py3 import VirtualMachineScaleSetVMExtensionsListResult -from ._models_py3 import VirtualMachineScaleSetVMExtensionsSummary -from ._models_py3 import VirtualMachineScaleSetVMInstanceIDs -from ._models_py3 import VirtualMachineScaleSetVMInstanceRequiredIDs -from ._models_py3 import VirtualMachineScaleSetVMInstanceView -from ._models_py3 import VirtualMachineScaleSetVMListResult -from ._models_py3 import VirtualMachineScaleSetVMNetworkProfileConfiguration -from ._models_py3 import VirtualMachineScaleSetVMProfile -from ._models_py3 import VirtualMachineScaleSetVMProtectionPolicy -from ._models_py3 import VirtualMachineScaleSetVMReimageParameters -from ._models_py3 import VirtualMachineSize -from ._models_py3 import VirtualMachineSizeListResult -from ._models_py3 import VirtualMachineSoftwarePatchProperties -from ._models_py3 import VirtualMachineStatusCodeCount -from ._models_py3 import VirtualMachineUpdate -from ._models_py3 import WinRMConfiguration -from ._models_py3 import WinRMListener -from ._models_py3 import WindowsConfiguration -from ._models_py3 import WindowsParameters +from typing import TYPE_CHECKING -from ._compute_management_client_enums import AccessLevel -from ._compute_management_client_enums import AvailabilitySetSkuTypes -from ._compute_management_client_enums import CachingTypes -from ._compute_management_client_enums import DedicatedHostLicenseTypes -from ._compute_management_client_enums import DiffDiskOptions -from ._compute_management_client_enums import DiffDiskPlacement -from ._compute_management_client_enums import DiskCreateOption -from ._compute_management_client_enums import DiskCreateOptionTypes -from ._compute_management_client_enums import DiskDetachOptionTypes -from ._compute_management_client_enums import DiskEncryptionSetIdentityType -from ._compute_management_client_enums import DiskEncryptionSetType -from ._compute_management_client_enums import DiskSecurityTypes -from ._compute_management_client_enums import DiskState -from ._compute_management_client_enums import DiskStorageAccountTypes -from ._compute_management_client_enums import EncryptionType -from ._compute_management_client_enums import ExecutionState -from ._compute_management_client_enums import ExtendedLocationTypes -from ._compute_management_client_enums import HyperVGeneration -from ._compute_management_client_enums import HyperVGenerationType -from ._compute_management_client_enums import HyperVGenerationTypes -from ._compute_management_client_enums import IPVersion -from ._compute_management_client_enums import IntervalInMins -from ._compute_management_client_enums import LinuxVMGuestPatchMode -from ._compute_management_client_enums import MaintenanceOperationResultCodeTypes -from ._compute_management_client_enums import NetworkAccessPolicy -from ._compute_management_client_enums import OperatingSystemStateTypes -from ._compute_management_client_enums import OperatingSystemTypes -from ._compute_management_client_enums import OrchestrationMode -from ._compute_management_client_enums import OrchestrationServiceNames -from ._compute_management_client_enums import OrchestrationServiceState -from ._compute_management_client_enums import OrchestrationServiceStateAction -from ._compute_management_client_enums import PatchAssessmentState -from ._compute_management_client_enums import PatchInstallationState -from ._compute_management_client_enums import PatchOperationStatus -from ._compute_management_client_enums import PrivateEndpointConnectionProvisioningState -from ._compute_management_client_enums import PrivateEndpointServiceConnectionStatus -from ._compute_management_client_enums import ProtocolTypes -from ._compute_management_client_enums import ProximityPlacementGroupType -from ._compute_management_client_enums import ResourceIdentityType -from ._compute_management_client_enums import RollingUpgradeActionType -from ._compute_management_client_enums import RollingUpgradeStatusCode -from ._compute_management_client_enums import SecurityTypes -from ._compute_management_client_enums import SettingNames -from ._compute_management_client_enums import SnapshotStorageAccountTypes -from ._compute_management_client_enums import StatusLevelTypes -from ._compute_management_client_enums import StorageAccountTypes -from ._compute_management_client_enums import UpgradeMode -from ._compute_management_client_enums import UpgradeOperationInvoker -from ._compute_management_client_enums import UpgradeState -from ._compute_management_client_enums import VMGuestPatchClassificationLinux -from ._compute_management_client_enums import VMGuestPatchClassificationWindows -from ._compute_management_client_enums import VMGuestPatchRebootBehavior -from ._compute_management_client_enums import VMGuestPatchRebootSetting -from ._compute_management_client_enums import VMGuestPatchRebootStatus -from ._compute_management_client_enums import VirtualMachineEvictionPolicyTypes -from ._compute_management_client_enums import VirtualMachinePriorityTypes -from ._compute_management_client_enums import VirtualMachineScaleSetScaleInRules -from ._compute_management_client_enums import VirtualMachineScaleSetSkuScaleType -from ._compute_management_client_enums import VirtualMachineSizeTypes -from ._compute_management_client_enums import VmDiskTypes -from ._compute_management_client_enums import WindowsVMGuestPatchMode +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + + +from ._models_py3 import ( # type: ignore + AccessUri, + AdditionalCapabilities, + AdditionalUnattendContent, + ApiEntityReference, + ApiError, + ApiErrorBase, + AutomaticOSUpgradePolicy, + AutomaticOSUpgradeProperties, + AutomaticRepairsPolicy, + AvailabilitySet, + AvailabilitySetListResult, + AvailabilitySetUpdate, + AvailablePatchSummary, + BillingProfile, + BootDiagnostics, + BootDiagnosticsInstanceView, + ComputeOperationListResult, + ComputeOperationValue, + CreationData, + DataDisk, + DataDiskImage, + DedicatedHost, + DedicatedHostAllocatableVM, + DedicatedHostAvailableCapacity, + DedicatedHostGroup, + DedicatedHostGroupInstanceView, + DedicatedHostGroupListResult, + DedicatedHostGroupUpdate, + DedicatedHostInstanceView, + DedicatedHostInstanceViewWithName, + DedicatedHostListResult, + DedicatedHostUpdate, + DiagnosticsProfile, + DiffDiskSettings, + DisallowedConfiguration, + Disk, + DiskAccess, + DiskAccessList, + DiskAccessUpdate, + DiskEncryptionSet, + DiskEncryptionSetList, + DiskEncryptionSetParameters, + DiskEncryptionSetUpdate, + DiskEncryptionSettings, + DiskInstanceView, + DiskList, + DiskRestorePoint, + DiskRestorePointList, + DiskSecurityProfile, + DiskSku, + DiskUpdate, + Encryption, + EncryptionSetIdentity, + EncryptionSettingsCollection, + EncryptionSettingsElement, + ExtendedLocation, + GrantAccessData, + HardwareProfile, + Image, + ImageDataDisk, + ImageDisk, + ImageDiskReference, + ImageListResult, + ImageOSDisk, + ImageReference, + ImageStorageProfile, + ImageUpdate, + InnerError, + InstanceViewStatus, + KeyForDiskEncryptionSet, + KeyVaultAndKeyReference, + KeyVaultAndSecretReference, + KeyVaultKeyReference, + KeyVaultSecretReference, + LastPatchInstallationSummary, + LinuxConfiguration, + LinuxParameters, + LinuxPatchSettings, + ListUsagesResult, + LogAnalyticsInputBase, + LogAnalyticsOperationResult, + LogAnalyticsOutput, + MaintenanceRedeployStatus, + ManagedDiskParameters, + NetworkInterfaceReference, + NetworkProfile, + OSDisk, + OSDiskImage, + OSProfile, + OrchestrationServiceStateInput, + OrchestrationServiceSummary, + PatchInstallationDetail, + PatchSettings, + Plan, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateEndpointConnectionListResult, + PrivateLinkResource, + PrivateLinkResourceListResult, + PrivateLinkServiceConnectionState, + PropertyUpdatesInProgress, + ProximityPlacementGroup, + ProximityPlacementGroupListResult, + ProximityPlacementGroupUpdate, + ProxyOnlyResource, + PurchasePlan, + PurchasePlanAutoGenerated, + RecoveryWalkResponse, + RequestRateByIntervalInput, + Resource, + ResourceUriList, + RetrieveBootDiagnosticsDataResult, + RollbackStatusInfo, + RollingUpgradePolicy, + RollingUpgradeProgressInfo, + RollingUpgradeRunningStatus, + RollingUpgradeStatusInfo, + RunCommandDocument, + RunCommandDocumentBase, + RunCommandInput, + RunCommandInputParameter, + RunCommandListResult, + RunCommandParameterDefinition, + RunCommandResult, + ScaleInPolicy, + ScheduledEventsProfile, + SecurityProfile, + ShareInfoElement, + Sku, + Snapshot, + SnapshotList, + SnapshotSku, + SnapshotUpdate, + SourceVault, + SshConfiguration, + SshPublicKey, + SshPublicKeyGenerateKeyPairResult, + SshPublicKeyResource, + SshPublicKeyUpdateResource, + SshPublicKeysGroupListResult, + StorageProfile, + SubResource, + SubResourceReadOnly, + SubResourceWithColocationStatus, + TerminateNotificationProfile, + ThrottledRequestsInput, + UefiSettings, + UpdateResource, + UpgradeOperationHistoricalStatusInfo, + UpgradeOperationHistoricalStatusInfoProperties, + UpgradeOperationHistoryStatus, + UpgradePolicy, + Usage, + UsageName, + UserAssignedIdentitiesValue, + VMScaleSetConvertToSinglePlacementGroupInput, + VaultCertificate, + VaultSecretGroup, + VirtualHardDisk, + VirtualMachine, + VirtualMachineAgentInstanceView, + VirtualMachineAssessPatchesResult, + VirtualMachineCaptureParameters, + VirtualMachineCaptureResult, + VirtualMachineExtension, + VirtualMachineExtensionHandlerInstanceView, + VirtualMachineExtensionImage, + VirtualMachineExtensionInstanceView, + VirtualMachineExtensionUpdate, + VirtualMachineExtensionsListResult, + VirtualMachineHealthStatus, + VirtualMachineIdentity, + VirtualMachineImage, + VirtualMachineImageFeature, + VirtualMachineImageResource, + VirtualMachineInstallPatchesParameters, + VirtualMachineInstallPatchesResult, + VirtualMachineInstanceView, + VirtualMachineListResult, + VirtualMachinePatchStatus, + VirtualMachineReimageParameters, + VirtualMachineRunCommand, + VirtualMachineRunCommandInstanceView, + VirtualMachineRunCommandScriptSource, + VirtualMachineRunCommandUpdate, + VirtualMachineRunCommandsListResult, + VirtualMachineScaleSet, + VirtualMachineScaleSetDataDisk, + VirtualMachineScaleSetExtension, + VirtualMachineScaleSetExtensionListResult, + VirtualMachineScaleSetExtensionProfile, + VirtualMachineScaleSetExtensionUpdate, + VirtualMachineScaleSetIPConfiguration, + VirtualMachineScaleSetIdentity, + VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue, + VirtualMachineScaleSetInstanceView, + VirtualMachineScaleSetInstanceViewStatusesSummary, + VirtualMachineScaleSetIpTag, + VirtualMachineScaleSetListOSUpgradeHistory, + VirtualMachineScaleSetListResult, + VirtualMachineScaleSetListSkusResult, + VirtualMachineScaleSetListWithLinkResult, + VirtualMachineScaleSetManagedDiskParameters, + VirtualMachineScaleSetNetworkConfiguration, + VirtualMachineScaleSetNetworkConfigurationDnsSettings, + VirtualMachineScaleSetNetworkProfile, + VirtualMachineScaleSetOSDisk, + VirtualMachineScaleSetOSProfile, + VirtualMachineScaleSetPublicIPAddressConfiguration, + VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings, + VirtualMachineScaleSetReimageParameters, + VirtualMachineScaleSetSku, + VirtualMachineScaleSetSkuCapacity, + VirtualMachineScaleSetStorageProfile, + VirtualMachineScaleSetUpdate, + VirtualMachineScaleSetUpdateIPConfiguration, + VirtualMachineScaleSetUpdateNetworkConfiguration, + VirtualMachineScaleSetUpdateNetworkProfile, + VirtualMachineScaleSetUpdateOSDisk, + VirtualMachineScaleSetUpdateOSProfile, + VirtualMachineScaleSetUpdatePublicIPAddressConfiguration, + VirtualMachineScaleSetUpdateStorageProfile, + VirtualMachineScaleSetUpdateVMProfile, + VirtualMachineScaleSetVM, + VirtualMachineScaleSetVMExtension, + VirtualMachineScaleSetVMExtensionUpdate, + VirtualMachineScaleSetVMExtensionsListResult, + VirtualMachineScaleSetVMExtensionsSummary, + VirtualMachineScaleSetVMInstanceIDs, + VirtualMachineScaleSetVMInstanceRequiredIDs, + VirtualMachineScaleSetVMInstanceView, + VirtualMachineScaleSetVMListResult, + VirtualMachineScaleSetVMNetworkProfileConfiguration, + VirtualMachineScaleSetVMProfile, + VirtualMachineScaleSetVMProtectionPolicy, + VirtualMachineScaleSetVMReimageParameters, + VirtualMachineSize, + VirtualMachineSizeListResult, + VirtualMachineSoftwarePatchProperties, + VirtualMachineStatusCodeCount, + VirtualMachineUpdate, + WinRMConfiguration, + WinRMListener, + WindowsConfiguration, + WindowsParameters, +) + +from ._compute_management_client_enums import ( # type: ignore + AccessLevel, + AvailabilitySetSkuTypes, + CachingTypes, + DedicatedHostLicenseTypes, + DiffDiskOptions, + DiffDiskPlacement, + DiskCreateOption, + DiskCreateOptionTypes, + DiskDetachOptionTypes, + DiskEncryptionSetIdentityType, + DiskEncryptionSetType, + DiskSecurityTypes, + DiskState, + DiskStorageAccountTypes, + EncryptionType, + ExecutionState, + ExtendedLocationTypes, + HyperVGeneration, + HyperVGenerationType, + HyperVGenerationTypes, + IPVersion, + IntervalInMins, + LinuxVMGuestPatchMode, + MaintenanceOperationResultCodeTypes, + NetworkAccessPolicy, + OperatingSystemStateTypes, + OperatingSystemTypes, + OrchestrationMode, + OrchestrationServiceNames, + OrchestrationServiceState, + OrchestrationServiceStateAction, + PatchAssessmentState, + PatchInstallationState, + PatchOperationStatus, + PrivateEndpointConnectionProvisioningState, + PrivateEndpointServiceConnectionStatus, + ProtocolTypes, + ProximityPlacementGroupType, + ResourceIdentityType, + RollingUpgradeActionType, + RollingUpgradeStatusCode, + SecurityTypes, + SettingNames, + SnapshotStorageAccountTypes, + StatusLevelTypes, + StorageAccountTypes, + UpgradeMode, + UpgradeOperationInvoker, + UpgradeState, + VMGuestPatchClassificationLinux, + VMGuestPatchClassificationWindows, + VMGuestPatchRebootBehavior, + VMGuestPatchRebootSetting, + VMGuestPatchRebootStatus, + VirtualMachineEvictionPolicyTypes, + VirtualMachinePriorityTypes, + VirtualMachineScaleSetScaleInRules, + VirtualMachineScaleSetSkuScaleType, + VirtualMachineSizeTypes, + VmDiskTypes, + WindowsVMGuestPatchMode, +) 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__ = [ @@ -625,5 +636,5 @@ "VmDiskTypes", "WindowsVMGuestPatchMode", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/models/_models_py3.py index 6112a924d81ce..debe52a87b27c 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/models/_models_py3.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/models/_models_py3.py @@ -1,5 +1,5 @@ -# 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. @@ -16,10 +16,9 @@ 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 if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object @@ -399,7 +398,7 @@ def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kw self.tags = tags -class AvailabilitySet(Resource): # pylint: disable=too-many-instance-attributes +class AvailabilitySet(Resource): """Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see `Manage the @@ -999,7 +998,7 @@ def __init__( self.logical_sector_size = logical_sector_size -class DataDisk(_serialization.Model): # pylint: disable=too-many-instance-attributes +class DataDisk(_serialization.Model): """Describes a data disk. Variables are only populated by the server, and will be ignored when sending a request. @@ -1195,7 +1194,7 @@ def __init__(self, **kwargs: Any) -> None: self.lun = None -class DedicatedHost(Resource): # pylint: disable=too-many-instance-attributes +class DedicatedHost(Resource): """Specifies information about the Dedicated host. Variables are only populated by the server, and will be ignored when sending a request. @@ -1915,7 +1914,7 @@ def __init__(self, *, vm_disk_type: Optional[Union[str, "_models.VmDiskTypes"]] self.vm_disk_type = vm_disk_type -class Disk(Resource): # pylint: disable=too-many-instance-attributes +class Disk(Resource): """Disk resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -2335,7 +2334,7 @@ def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> N self.tags = tags -class DiskEncryptionSet(Resource): # pylint: disable=too-many-instance-attributes +class DiskEncryptionSet(Resource): """disk encryption set resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -2722,7 +2721,7 @@ def __init__(self, **kwargs: Any) -> None: self.type = None -class DiskRestorePoint(ProxyOnlyResource): # pylint: disable=too-many-instance-attributes +class DiskRestorePoint(ProxyOnlyResource): """Properties of disk restore point. Variables are only populated by the server, and will be ignored when sending a request. @@ -2906,7 +2905,7 @@ def __init__(self, *, name: Optional[Union[str, "_models.DiskStorageAccountTypes self.tier = None -class DiskUpdate(_serialization.Model): # pylint: disable=too-many-instance-attributes +class DiskUpdate(_serialization.Model): """Disk update resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -4384,7 +4383,7 @@ def __init__(self, *, secret_url: str, source_vault: "_models.SubResource", **kw self.source_vault = source_vault -class LastPatchInstallationSummary(_serialization.Model): # pylint: disable=too-many-instance-attributes +class LastPatchInstallationSummary(_serialization.Model): """Describes the properties of the last installed patch summary. Variables are only populated by the server, and will be ignored when sending a request. @@ -5034,7 +5033,7 @@ def __init__(self, **kwargs: Any) -> None: self.service_state = None -class OSDisk(_serialization.Model): # pylint: disable=too-many-instance-attributes +class OSDisk(_serialization.Model): """Specifies information about the operating system disk used by the virtual machine. :code:`
`:code:`
` For more information about disks, see `About disks and VHDs for Azure virtual machines @@ -7020,7 +7019,7 @@ def __init__( self.capacity = capacity -class Snapshot(Resource): # pylint: disable=too-many-instance-attributes +class Snapshot(Resource): """Snapshot resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -8244,7 +8243,7 @@ def __init__(self, *, uri: Optional[str] = None, **kwargs: Any) -> None: self.uri = uri -class VirtualMachine(Resource): # pylint: disable=too-many-instance-attributes +class VirtualMachine(Resource): """Describes a Virtual Machine. Variables are only populated by the server, and will be ignored when sending a request. @@ -8782,7 +8781,7 @@ def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylin self.resources = None -class VirtualMachineExtension(Resource): # pylint: disable=too-many-instance-attributes +class VirtualMachineExtension(Resource): """Describes a Virtual Machine Extension. Variables are only populated by the server, and will be ignored when sending a request. @@ -9354,7 +9353,7 @@ def __init__( self.extended_location = extended_location -class VirtualMachineImage(VirtualMachineImageResource): # pylint: disable=too-many-instance-attributes +class VirtualMachineImage(VirtualMachineImageResource): """Describes a Virtual Machine Image. All required parameters must be populated in order to send to server. @@ -9564,7 +9563,7 @@ def __init__( self.linux_parameters = linux_parameters -class VirtualMachineInstallPatchesResult(_serialization.Model): # pylint: disable=too-many-instance-attributes +class VirtualMachineInstallPatchesResult(_serialization.Model): """The result summary of an installation operation. Variables are only populated by the server, and will be ignored when sending a request. @@ -9654,7 +9653,7 @@ def __init__(self, **kwargs: Any) -> None: self.error = None -class VirtualMachineInstanceView(_serialization.Model): # pylint: disable=too-many-instance-attributes +class VirtualMachineInstanceView(_serialization.Model): """The instance view of a virtual machine. Variables are only populated by the server, and will be ignored when sending a request. @@ -9913,7 +9912,7 @@ def __init__(self, *, temp_disk: Optional[bool] = None, **kwargs: Any) -> None: self.temp_disk = temp_disk -class VirtualMachineRunCommand(Resource): # pylint: disable=too-many-instance-attributes +class VirtualMachineRunCommand(Resource): """Describes a Virtual Machine run command. Variables are only populated by the server, and will be ignored when sending a request. @@ -10196,7 +10195,7 @@ def __init__( self.next_link = next_link -class VirtualMachineRunCommandUpdate(UpdateResource): # pylint: disable=too-many-instance-attributes +class VirtualMachineRunCommandUpdate(UpdateResource): """Describes a Virtual Machine run command. Variables are only populated by the server, and will be ignored when sending a request. @@ -10309,7 +10308,7 @@ def __init__( self.instance_view = None -class VirtualMachineScaleSet(Resource): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSet(Resource): """Describes a Virtual Machine Scale Set. Variables are only populated by the server, and will be ignored when sending a request. @@ -10659,7 +10658,7 @@ def __init__( self.disk_m_bps_read_write = disk_m_bps_read_write -class VirtualMachineScaleSetExtension(SubResourceReadOnly): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetExtension(SubResourceReadOnly): """Describes a Virtual Machine Scale Set Extension. Variables are only populated by the server, and will be ignored when sending a request. @@ -10856,7 +10855,7 @@ def __init__( self.extensions_time_budget = extensions_time_budget -class VirtualMachineScaleSetExtensionUpdate(SubResourceReadOnly): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetExtensionUpdate(SubResourceReadOnly): """Describes a Virtual Machine Scale Set Extension. Variables are only populated by the server, and will be ignored when sending a request. @@ -12204,7 +12203,7 @@ def __init__( self.data_disks = data_disks -class VirtualMachineScaleSetUpdate(UpdateResource): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetUpdate(UpdateResource): """Describes a Virtual Machine Scale Set. :ivar tags: Resource tags. @@ -12896,7 +12895,7 @@ def __init__( self.scheduled_events_profile = scheduled_events_profile -class VirtualMachineScaleSetVM(Resource): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetVM(Resource): """Describes a virtual machine scale set virtual machine. Variables are only populated by the server, and will be ignored when sending a request. @@ -13140,7 +13139,7 @@ def __init__( # pylint: disable=too-many-locals self.protection_policy = protection_policy -class VirtualMachineScaleSetVMExtension(SubResourceReadOnly): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetVMExtension(SubResourceReadOnly): """Describes a VMSS VM Extension. Variables are only populated by the server, and will be ignored when sending a request. @@ -13311,7 +13310,7 @@ def __init__(self, **kwargs: Any) -> None: self.statuses_summary = None -class VirtualMachineScaleSetVMExtensionUpdate(SubResourceReadOnly): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetVMExtensionUpdate(SubResourceReadOnly): """Describes a VMSS VM Extension. Variables are only populated by the server, and will be ignored when sending a request. @@ -13466,7 +13465,7 @@ def __init__(self, *, instance_ids: List[str], **kwargs: Any) -> None: self.instance_ids = instance_ids -class VirtualMachineScaleSetVMInstanceView(_serialization.Model): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetVMInstanceView(_serialization.Model): """The instance view of a virtual machine scale set VM. Variables are only populated by the server, and will be ignored when sending a request. @@ -13650,7 +13649,7 @@ def __init__( self.network_interface_configurations = network_interface_configurations -class VirtualMachineScaleSetVMProfile(_serialization.Model): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetVMProfile(_serialization.Model): """Describes a virtual machine scale set virtual machine profile. :ivar os_profile: Specifies the operating system settings for the virtual machines in the scale @@ -14019,7 +14018,7 @@ def __init__(self, **kwargs: Any) -> None: self.count = None -class VirtualMachineUpdate(UpdateResource): # pylint: disable=too-many-instance-attributes +class VirtualMachineUpdate(UpdateResource): """Describes a Virtual Machine Update. Variables are only populated by the server, and will be ignored when sending a request. diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/operations/__init__.py index 3bd1bb1af95e7..a07b449878746 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/operations/__init__.py @@ -5,37 +5,43 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._operations import DisksOperations -from ._operations import SnapshotsOperations -from ._operations import DiskEncryptionSetsOperations -from ._operations import DiskAccessesOperations -from ._operations import DiskRestorePointOperations -from ._operations import Operations -from ._operations import AvailabilitySetsOperations -from ._operations import ProximityPlacementGroupsOperations -from ._operations import DedicatedHostGroupsOperations -from ._operations import DedicatedHostsOperations -from ._operations import SshPublicKeysOperations -from ._operations import VirtualMachineExtensionImagesOperations -from ._operations import VirtualMachineExtensionsOperations -from ._operations import VirtualMachineImagesOperations -from ._operations import VirtualMachineImagesEdgeZoneOperations -from ._operations import UsageOperations -from ._operations import VirtualMachinesOperations -from ._operations import VirtualMachineScaleSetsOperations -from ._operations import VirtualMachineSizesOperations -from ._operations import ImagesOperations -from ._operations import VirtualMachineScaleSetExtensionsOperations -from ._operations import VirtualMachineScaleSetRollingUpgradesOperations -from ._operations import VirtualMachineScaleSetVMExtensionsOperations -from ._operations import VirtualMachineScaleSetVMsOperations -from ._operations import LogAnalyticsOperations -from ._operations import VirtualMachineRunCommandsOperations -from ._operations import VirtualMachineScaleSetVMRunCommandsOperations +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._operations import DisksOperations # type: ignore +from ._operations import SnapshotsOperations # type: ignore +from ._operations import DiskEncryptionSetsOperations # type: ignore +from ._operations import DiskAccessesOperations # type: ignore +from ._operations import DiskRestorePointOperations # type: ignore +from ._operations import Operations # type: ignore +from ._operations import AvailabilitySetsOperations # type: ignore +from ._operations import ProximityPlacementGroupsOperations # type: ignore +from ._operations import DedicatedHostGroupsOperations # type: ignore +from ._operations import DedicatedHostsOperations # type: ignore +from ._operations import SshPublicKeysOperations # type: ignore +from ._operations import VirtualMachineExtensionImagesOperations # type: ignore +from ._operations import VirtualMachineExtensionsOperations # type: ignore +from ._operations import VirtualMachineImagesOperations # type: ignore +from ._operations import VirtualMachineImagesEdgeZoneOperations # type: ignore +from ._operations import UsageOperations # type: ignore +from ._operations import VirtualMachinesOperations # type: ignore +from ._operations import VirtualMachineScaleSetsOperations # type: ignore +from ._operations import VirtualMachineSizesOperations # type: ignore +from ._operations import ImagesOperations # type: ignore +from ._operations import VirtualMachineScaleSetExtensionsOperations # type: ignore +from ._operations import VirtualMachineScaleSetRollingUpgradesOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMExtensionsOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMsOperations # type: ignore +from ._operations import LogAnalyticsOperations # type: ignore +from ._operations import VirtualMachineRunCommandsOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMRunCommandsOperations # 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__ = [ @@ -67,5 +73,5 @@ "VirtualMachineRunCommandsOperations", "VirtualMachineScaleSetVMRunCommandsOperations", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/operations/_operations.py index 716356e557fcf..a13eaa7f51863 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/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. @@ -8,22 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import ( - Any, - Callable, - Dict, - IO, - Iterable, - Iterator, - List, - Literal, - Optional, - Type, - TypeVar, - Union, - cast, - overload, -) +from typing import Any, Callable, Dict, IO, Iterable, Iterator, List, Literal, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -51,7 +36,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, HttpResponse], T, Dict[str, Any]], Any]] @@ -6137,7 +6122,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.Disk, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6321,7 +6306,7 @@ def get_long_running_output(pipeline_response): def _update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.DiskUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6516,7 +6501,7 @@ def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> _model :rtype: ~azure.mgmt.compute.v2020_12_01.models.Disk :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6559,7 +6544,7 @@ def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> _model return deserialized # type: ignore def _delete_initial(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6676,7 +6661,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6751,7 +6736,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Disk"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6818,7 +6803,7 @@ def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7008,7 +6993,7 @@ def get_long_running_output(pipeline_response): ) def _revoke_access_initial(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7135,7 +7120,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, snapshot_name: str, snapshot: Union[_models.Snapshot, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7323,7 +7308,7 @@ def _update_initial( snapshot: Union[_models.SnapshotUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7524,7 +7509,7 @@ def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> _m :rtype: ~azure.mgmt.compute.v2020_12_01.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7567,7 +7552,7 @@ def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> _m return deserialized # type: ignore def _delete_initial(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7684,7 +7669,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7759,7 +7744,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Snapshot"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7826,7 +7811,7 @@ def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8016,7 +8001,7 @@ def get_long_running_output(pipeline_response): ) def _revoke_access_initial(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8147,7 +8132,7 @@ def _create_or_update_initial( disk_encryption_set: Union[_models.DiskEncryptionSet, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8345,7 +8330,7 @@ def _update_initial( disk_encryption_set: Union[_models.DiskEncryptionSetUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8551,7 +8536,7 @@ def get(self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: :rtype: ~azure.mgmt.compute.v2020_12_01.models.DiskEncryptionSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8596,7 +8581,7 @@ def get(self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: def _delete_initial( self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8713,7 +8698,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8788,7 +8773,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.DiskEncryptionSet"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8870,7 +8855,7 @@ def list_associated_resources( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.ResourceUriList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8960,7 +8945,7 @@ def _create_or_update_initial( disk_access: Union[_models.DiskAccess, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9154,7 +9139,7 @@ def _update_initial( disk_access: Union[_models.DiskAccessUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9355,7 +9340,7 @@ def get(self, resource_group_name: str, disk_access_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.compute.v2020_12_01.models.DiskAccess :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9398,7 +9383,7 @@ def get(self, resource_group_name: str, disk_access_name: str, **kwargs: Any) -> return deserialized # type: ignore def _delete_initial(self, resource_group_name: str, disk_access_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9515,7 +9500,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.DiskAccessList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9590,7 +9575,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.DiskAccess"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.DiskAccessList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9666,7 +9651,7 @@ def get_private_link_resources( :rtype: ~azure.mgmt.compute.v2020_12_01.models.PrivateLinkResourceListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9716,7 +9701,7 @@ def _update_a_private_endpoint_connection_initial( # pylint: disable=name-too-l private_endpoint_connection: Union[_models.PrivateEndpointConnection, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9944,7 +9929,7 @@ def get_a_private_endpoint_connection( :rtype: ~azure.mgmt.compute.v2020_12_01.models.PrivateEndpointConnection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9990,7 +9975,7 @@ def get_a_private_endpoint_connection( def _delete_a_private_endpoint_connection_initial( # pylint: disable=name-too-long self, resource_group_name: str, disk_access_name: str, private_endpoint_connection_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10121,7 +10106,7 @@ def list_private_endpoint_connections( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.PrivateEndpointConnectionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10233,7 +10218,7 @@ def get( :rtype: ~azure.mgmt.compute.v2020_12_01.models.DiskRestorePoint :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10303,7 +10288,7 @@ def list_by_restore_point( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.DiskRestorePointList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10375,7 +10360,7 @@ def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10606,7 +10591,7 @@ def _revoke_access_initial( disk_restore_point_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10765,7 +10750,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.ComputeOperationValue"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.ComputeOperationListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10918,7 +10903,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2020_12_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11045,7 +11030,7 @@ def update( :rtype: ~azure.mgmt.compute.v2020_12_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11113,7 +11098,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11163,7 +11148,7 @@ def get(self, resource_group_name: str, availability_set_name: str, **kwargs: An :rtype: ~azure.mgmt.compute.v2020_12_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11224,7 +11209,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11301,7 +11286,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Ava api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11383,7 +11368,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11541,7 +11526,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2020_12_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11671,7 +11656,7 @@ def update( :rtype: ~azure.mgmt.compute.v2020_12_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11739,7 +11724,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11799,7 +11784,7 @@ def get( :rtype: ~azure.mgmt.compute.v2020_12_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11858,7 +11843,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.ProximityPlac api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11938,7 +11923,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12099,7 +12084,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2020_12_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12226,7 +12211,7 @@ def update( :rtype: ~azure.mgmt.compute.v2020_12_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12294,7 +12279,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12355,7 +12340,7 @@ def get( :rtype: ~azure.mgmt.compute.v2020_12_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12415,7 +12400,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12491,7 +12476,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.DedicatedHost api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12580,7 +12565,7 @@ def _create_or_update_initial( parameters: Union[_models.DedicatedHost, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12781,7 +12766,7 @@ def _update_initial( parameters: Union[_models.DedicatedHostUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12977,7 +12962,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13107,7 +13092,7 @@ def get( :rtype: ~azure.mgmt.compute.v2020_12_01.models.DedicatedHost :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13172,7 +13157,7 @@ def list_by_host_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.DedicatedHostListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13272,7 +13257,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.SshPublicKeyR api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13353,7 +13338,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13487,7 +13472,7 @@ def create( :rtype: ~azure.mgmt.compute.v2020_12_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13615,7 +13600,7 @@ def update( :rtype: ~azure.mgmt.compute.v2020_12_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13683,7 +13668,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13733,7 +13718,7 @@ def get(self, resource_group_name: str, ssh_public_key_name: str, **kwargs: Any) :rtype: ~azure.mgmt.compute.v2020_12_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13791,7 +13776,7 @@ def generate_key_pair( :rtype: ~azure.mgmt.compute.v2020_12_01.models.SshPublicKeyGenerateKeyPairResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13872,7 +13857,7 @@ def get( :rtype: ~azure.mgmt.compute.v2020_12_01.models.VirtualMachineExtensionImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13930,7 +13915,7 @@ def list_types( :rtype: list[~azure.mgmt.compute.v2020_12_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14002,7 +13987,7 @@ def list_versions( :rtype: list[~azure.mgmt.compute.v2020_12_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14077,7 +14062,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineExtension, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14287,7 +14272,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineExtensionUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14493,7 +14478,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_name: str, vm_extension_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14623,7 +14608,7 @@ def get( :rtype: ~azure.mgmt.compute.v2020_12_01.models.VirtualMachineExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14683,7 +14668,7 @@ def list( :rtype: ~azure.mgmt.compute.v2020_12_01.models.VirtualMachineExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14767,7 +14752,7 @@ def get( :rtype: ~azure.mgmt.compute.v2020_12_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14846,7 +14831,7 @@ def list( :rtype: list[~azure.mgmt.compute.v2020_12_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14907,7 +14892,7 @@ def list_offers( :rtype: list[~azure.mgmt.compute.v2020_12_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14959,7 +14944,7 @@ def list_publishers(self, location: str, **kwargs: Any) -> List[_models.VirtualM :rtype: list[~azure.mgmt.compute.v2020_12_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15016,7 +15001,7 @@ def list_skus( :rtype: list[~azure.mgmt.compute.v2020_12_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15102,7 +15087,7 @@ def get( :rtype: ~azure.mgmt.compute.v2020_12_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15187,7 +15172,7 @@ def list( :rtype: list[~azure.mgmt.compute.v2020_12_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15252,7 +15237,7 @@ def list_offers( :rtype: list[~azure.mgmt.compute.v2020_12_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15309,7 +15294,7 @@ def list_publishers( :rtype: list[~azure.mgmt.compute.v2020_12_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15370,7 +15355,7 @@ def list_skus( :rtype: list[~azure.mgmt.compute.v2020_12_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15452,7 +15437,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.Usage"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.ListUsagesResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15551,7 +15536,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> Iterable["_models.Vi api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15619,7 +15604,7 @@ def _capture_initial( parameters: Union[_models.VirtualMachineCaptureParameters, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15817,7 +15802,7 @@ def _create_or_update_initial( parameters: Union[_models.VirtualMachine, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16009,7 +15994,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16194,7 +16179,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_name: str, *, force_deletion: Optional[bool] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16317,7 +16302,7 @@ def get( :rtype: ~azure.mgmt.compute.v2020_12_01.models.VirtualMachine :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16374,7 +16359,7 @@ def instance_view( :rtype: ~azure.mgmt.compute.v2020_12_01.models.VirtualMachineInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16419,7 +16404,7 @@ def instance_view( def _convert_to_managed_disks_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16520,7 +16505,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _deallocate_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16639,7 +16624,7 @@ def generalize( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16694,7 +16679,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Vir api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16773,7 +16758,7 @@ def list_all(self, *, status_only: Optional[str] = None, **kwargs: Any) -> Itera api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16855,7 +16840,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16920,7 +16905,7 @@ def get_next(next_link=None): def _power_off_initial( self, resource_group_name: str, vm_name: str, *, skip_shutdown: bool = False, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17029,7 +17014,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _reapply_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17129,7 +17114,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _restart_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17229,7 +17214,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _start_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17329,7 +17314,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _redeploy_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17435,7 +17420,7 @@ def _reimage_initial( parameters: Optional[Union[_models.VirtualMachineReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17640,7 +17625,7 @@ def retrieve_boot_diagnostics_data( :rtype: ~azure.mgmt.compute.v2020_12_01.models.RetrieveBootDiagnosticsDataResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17684,7 +17669,7 @@ def retrieve_boot_diagnostics_data( return deserialized # type: ignore def _perform_maintenance_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17797,7 +17782,7 @@ def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17836,7 +17821,7 @@ def simulate_eviction( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore def _assess_patches_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17952,7 +17937,7 @@ def _install_patches_initial( install_patches_input: Union[_models.VirtualMachineInstallPatchesParameters, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18150,7 +18135,7 @@ def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18374,7 +18359,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> Iterable["_models.Vi api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18442,7 +18427,7 @@ def _create_or_update_initial( parameters: Union[_models.VirtualMachineScaleSet, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18634,7 +18619,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineScaleSetUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18823,7 +18808,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, *, force_deletion: Optional[bool] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18941,7 +18926,7 @@ def get(self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) - :rtype: ~azure.mgmt.compute.v2020_12_01.models.VirtualMachineScaleSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18990,7 +18975,7 @@ def _deallocate_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19187,7 +19172,7 @@ def _delete_instances_initial( force_deletion: Optional[bool] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19395,7 +19380,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2020_12_01.models.VirtualMachineScaleSetInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19455,7 +19440,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Vir api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19534,7 +19519,7 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.VirtualMachineScaleSet"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.VirtualMachineScaleSetListWithLinkResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19617,7 +19602,7 @@ def list_skus( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.VirtualMachineScaleSetListSkusResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19701,7 +19686,7 @@ def get_os_upgrade_history( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.VirtualMachineScaleSetListOSUpgradeHistory] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19772,7 +19757,7 @@ def _power_off_initial( skip_shutdown: bool = False, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19985,7 +19970,7 @@ def _restart_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20174,7 +20159,7 @@ def _start_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20363,7 +20348,7 @@ def _redeploy_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20555,7 +20540,7 @@ def _perform_maintenance_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20753,7 +20738,7 @@ def _update_instances_initial( vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20939,7 +20924,7 @@ def _reimage_initial( vm_scale_set_reimage_input: Optional[Union[_models.VirtualMachineScaleSetReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21132,7 +21117,7 @@ def _reimage_all_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21335,7 +21320,7 @@ def force_recovery_service_fabric_platform_update_domain_walk( # pylint: disabl :rtype: ~azure.mgmt.compute.v2020_12_01.models.RecoveryWalkResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21379,7 +21364,7 @@ def force_recovery_service_fabric_platform_update_domain_walk( # pylint: disabl return deserialized # type: ignore @overload - def convert_to_single_placement_group( # pylint: disable=inconsistent-return-statements + def convert_to_single_placement_group( self, resource_group_name: str, vm_scale_set_name: str, @@ -21407,7 +21392,7 @@ def convert_to_single_placement_group( # pylint: disable=inconsistent-return-st """ @overload - def convert_to_single_placement_group( # pylint: disable=inconsistent-return-statements + def convert_to_single_placement_group( self, resource_group_name: str, vm_scale_set_name: str, @@ -21457,7 +21442,7 @@ def convert_to_single_placement_group( # pylint: disable=inconsistent-return-st :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21514,7 +21499,7 @@ def _set_orchestration_service_state_initial( parameters: Union[_models.OrchestrationServiceStateInput, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21731,7 +21716,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.VirtualMachine api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21816,7 +21801,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, image_name: str, parameters: Union[_models.Image, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21998,7 +21983,7 @@ def _update_initial( parameters: Union[_models.ImageUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22178,7 +22163,7 @@ def get_long_running_output(pipeline_response): ) def _delete_initial(self, resource_group_name: str, image_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22293,7 +22278,7 @@ def get( :rtype: ~azure.mgmt.compute.v2020_12_01.models.Image :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22352,7 +22337,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22428,7 +22413,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Image"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22517,7 +22502,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtension, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22728,7 +22713,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtensionUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22935,7 +22920,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, vmss_extension_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23065,7 +23050,7 @@ def get( :rtype: ~azure.mgmt.compute.v2020_12_01.models.VirtualMachineScaleSetExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23131,7 +23116,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.VirtualMachineScaleSetExtensionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23215,7 +23200,7 @@ def __init__(self, *args, **kwargs): self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") def _cancel_initial(self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23317,7 +23302,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_os_upgrade_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23423,7 +23408,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_extension_upgrade_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23540,7 +23525,7 @@ def get_latest( :rtype: ~azure.mgmt.compute.v2020_12_01.models.RollingUpgradeStatusInfo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23612,7 +23597,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetVMExtension, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23832,7 +23817,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetVMExtensionUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24047,7 +24032,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, vm_extension_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24183,7 +24168,7 @@ def get( :rtype: ~azure.mgmt.compute.v2020_12_01.models.VirtualMachineScaleSetVMExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24252,7 +24237,7 @@ def list( :rtype: ~azure.mgmt.compute.v2020_12_01.models.VirtualMachineScaleSetVMExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24329,7 +24314,7 @@ def _reimage_initial( ] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24528,7 +24513,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _reimage_all_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24637,7 +24622,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _deallocate_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24752,7 +24737,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineScaleSetVM, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24962,7 +24947,7 @@ def _delete_initial( force_deletion: Optional[bool] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25103,7 +25088,7 @@ def get( :rtype: ~azure.mgmt.compute.v2020_12_01.models.VirtualMachineScaleSetVM :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25163,7 +25148,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2020_12_01.models.VirtualMachineScaleSetVMInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25245,7 +25230,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.VirtualMachineScaleSetVMListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25319,7 +25304,7 @@ def _power_off_initial( skip_shutdown: bool = False, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25441,7 +25426,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _restart_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25549,7 +25534,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25657,7 +25642,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _redeploy_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25791,7 +25776,7 @@ def retrieve_boot_diagnostics_data( :rtype: ~azure.mgmt.compute.v2020_12_01.models.RetrieveBootDiagnosticsDataResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25838,7 +25823,7 @@ def retrieve_boot_diagnostics_data( def _perform_maintenance_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25959,7 +25944,7 @@ def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26006,7 +25991,7 @@ def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26225,7 +26210,7 @@ def __init__(self, *args, **kwargs): def _export_request_rate_by_interval_initial( self, location: str, parameters: Union[_models.RequestRateByIntervalInput, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26402,7 +26387,7 @@ def get_long_running_output(pipeline_response): def _export_throttled_requests_initial( self, location: str, parameters: Union[_models.ThrottledRequestsInput, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26612,7 +26597,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.RunCommandDocu api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.RunCommandListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26685,7 +26670,7 @@ def get(self, location: str, command_id: str, **kwargs: Any) -> _models.RunComma :rtype: ~azure.mgmt.compute.v2020_12_01.models.RunCommandDocument :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26735,7 +26720,7 @@ def _create_or_update_initial( run_command: Union[_models.VirtualMachineRunCommand, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26944,7 +26929,7 @@ def _update_initial( run_command: Union[_models.VirtualMachineRunCommandUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -27149,7 +27134,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_name: str, run_command_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -27279,7 +27264,7 @@ def get_by_virtual_machine( :rtype: ~azure.mgmt.compute.v2020_12_01.models.VirtualMachineRunCommand :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -27347,7 +27332,7 @@ def list_by_virtual_machine( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.VirtualMachineRunCommandsListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -27440,7 +27425,7 @@ def _create_or_update_initial( run_command: Union[_models.VirtualMachineRunCommand, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -27658,7 +27643,7 @@ def _update_initial( run_command: Union[_models.VirtualMachineRunCommandUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -27871,7 +27856,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, run_command_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -28007,7 +27992,7 @@ def get( :rtype: ~azure.mgmt.compute.v2020_12_01.models.VirtualMachineRunCommand :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -28084,7 +28069,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2020-12-01")) cls: ClsType[_models.VirtualMachineRunCommandsListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_03_01/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_03_01/__init__.py index 3b1b6244b2375..ab7c46e8991db 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_03_01/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_03_01/__init__.py @@ -5,15 +5,21 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._compute_management_client import ComputeManagementClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._compute_management_client import ComputeManagementClient # 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__ = [ "ComputeManagementClient", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_03_01/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_03_01/_compute_management_client.py index 57c40f91a42d0..66235ff5730c7 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_03_01/_compute_management_client.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_03_01/_compute_management_client.py @@ -51,11 +51,10 @@ ) if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class ComputeManagementClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes +class ComputeManagementClient: # pylint: disable=too-many-instance-attributes """Compute Client. :ivar cloud_service_role_instances: CloudServiceRoleInstancesOperations operations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_03_01/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_03_01/_configuration.py index 489db95b5a261..fc448dc5f4c04 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_03_01/_configuration.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_03_01/_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 ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ComputeManagementClient. Note that all parameters used to create this instance are saved as instance diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_03_01/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_03_01/_version.py index d79b2760319c5..e5754a47ce68f 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_03_01/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_03_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "33.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_03_01/aio/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_03_01/aio/__init__.py index 0715f50185586..d3fd1ba93379a 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_03_01/aio/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_03_01/aio/__init__.py @@ -5,12 +5,18 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._compute_management_client import ComputeManagementClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._compute_management_client import ComputeManagementClient # 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__ = [ "ComputeManagementClient", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_03_01/aio/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_03_01/aio/_compute_management_client.py index 318a5b1c1a071..61c976b705726 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_03_01/aio/_compute_management_client.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_03_01/aio/_compute_management_client.py @@ -51,11 +51,10 @@ ) if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class ComputeManagementClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes +class ComputeManagementClient: # pylint: disable=too-many-instance-attributes """Compute Client. :ivar cloud_service_role_instances: CloudServiceRoleInstancesOperations operations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_03_01/aio/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_03_01/aio/_configuration.py index 7a87e1f886000..ce7bf1db2e935 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_03_01/aio/_configuration.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_03_01/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 ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ComputeManagementClient. Note that all parameters used to create this instance are saved as instance diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_03_01/aio/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_03_01/aio/operations/__init__.py index 5dd95643cf370..b836deaddfd46 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_03_01/aio/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_03_01/aio/operations/__init__.py @@ -5,39 +5,45 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._operations import CloudServiceRoleInstancesOperations -from ._operations import CloudServiceRolesOperations -from ._operations import CloudServicesOperations -from ._operations import CloudServicesUpdateDomainOperations -from ._operations import CloudServiceOperatingSystemsOperations -from ._operations import Operations -from ._operations import AvailabilitySetsOperations -from ._operations import ProximityPlacementGroupsOperations -from ._operations import DedicatedHostGroupsOperations -from ._operations import DedicatedHostsOperations -from ._operations import SshPublicKeysOperations -from ._operations import VirtualMachineExtensionImagesOperations -from ._operations import VirtualMachineExtensionsOperations -from ._operations import VirtualMachineImagesOperations -from ._operations import VirtualMachineImagesEdgeZoneOperations -from ._operations import UsageOperations -from ._operations import VirtualMachinesOperations -from ._operations import VirtualMachineScaleSetsOperations -from ._operations import VirtualMachineSizesOperations -from ._operations import ImagesOperations -from ._operations import RestorePointCollectionsOperations -from ._operations import RestorePointsOperations -from ._operations import VirtualMachineScaleSetExtensionsOperations -from ._operations import VirtualMachineScaleSetRollingUpgradesOperations -from ._operations import VirtualMachineScaleSetVMExtensionsOperations -from ._operations import VirtualMachineScaleSetVMsOperations -from ._operations import LogAnalyticsOperations -from ._operations import VirtualMachineRunCommandsOperations -from ._operations import VirtualMachineScaleSetVMRunCommandsOperations +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._operations import CloudServiceRoleInstancesOperations # type: ignore +from ._operations import CloudServiceRolesOperations # type: ignore +from ._operations import CloudServicesOperations # type: ignore +from ._operations import CloudServicesUpdateDomainOperations # type: ignore +from ._operations import CloudServiceOperatingSystemsOperations # type: ignore +from ._operations import Operations # type: ignore +from ._operations import AvailabilitySetsOperations # type: ignore +from ._operations import ProximityPlacementGroupsOperations # type: ignore +from ._operations import DedicatedHostGroupsOperations # type: ignore +from ._operations import DedicatedHostsOperations # type: ignore +from ._operations import SshPublicKeysOperations # type: ignore +from ._operations import VirtualMachineExtensionImagesOperations # type: ignore +from ._operations import VirtualMachineExtensionsOperations # type: ignore +from ._operations import VirtualMachineImagesOperations # type: ignore +from ._operations import VirtualMachineImagesEdgeZoneOperations # type: ignore +from ._operations import UsageOperations # type: ignore +from ._operations import VirtualMachinesOperations # type: ignore +from ._operations import VirtualMachineScaleSetsOperations # type: ignore +from ._operations import VirtualMachineSizesOperations # type: ignore +from ._operations import ImagesOperations # type: ignore +from ._operations import RestorePointCollectionsOperations # type: ignore +from ._operations import RestorePointsOperations # type: ignore +from ._operations import VirtualMachineScaleSetExtensionsOperations # type: ignore +from ._operations import VirtualMachineScaleSetRollingUpgradesOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMExtensionsOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMsOperations # type: ignore +from ._operations import LogAnalyticsOperations # type: ignore +from ._operations import VirtualMachineRunCommandsOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMRunCommandsOperations # 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__ = [ @@ -71,5 +77,5 @@ "VirtualMachineRunCommandsOperations", "VirtualMachineScaleSetVMRunCommandsOperations", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_03_01/aio/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_03_01/aio/operations/_operations.py index e347264480efa..fbc9cd15d4e33 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_03_01/aio/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_03_01/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. @@ -8,21 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import ( - Any, - AsyncIterable, - AsyncIterator, - Callable, - Dict, - IO, - List, - Optional, - Type, - TypeVar, - Union, - cast, - overload, -) +from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, List, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -241,7 +227,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]] @@ -269,7 +255,7 @@ def __init__(self, *args, **kwargs) -> None: async def _delete_initial( self, role_instance_name: str, resource_group_name: str, cloud_service_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -399,7 +385,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_03_01.models.RoleInstance :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -459,7 +445,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2021_03_01.models.RoleInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -533,7 +519,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.RoleInstanceListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -599,7 +585,7 @@ async def get_next(next_link=None): async def _restart_initial( self, role_instance_name: str, resource_group_name: str, cloud_service_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -708,7 +694,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _reimage_initial( self, role_instance_name: str, resource_group_name: str, cloud_service_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -817,7 +803,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _rebuild_initial( self, role_instance_name: str, resource_group_name: str, cloud_service_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -940,7 +926,7 @@ async def get_remote_desktop_file( :rtype: AsyncIterator[bytes] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1025,7 +1011,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_03_01.models.CloudServiceRole :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1090,7 +1076,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.CloudServiceRoleListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1180,7 +1166,7 @@ async def _create_or_update_initial( parameters: Optional[Union[_models.CloudService, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1375,7 +1361,7 @@ async def _update_initial( parameters: Optional[Union[_models.CloudServiceUpdate, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1563,7 +1549,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, cloud_service_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1676,7 +1662,7 @@ async def get(self, resource_group_name: str, cloud_service_name: str, **kwargs: :rtype: ~azure.mgmt.compute.v2021_03_01.models.CloudService :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1732,7 +1718,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2021_03_01.models.CloudServiceInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1791,7 +1777,7 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.CloudService"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.CloudServiceListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1870,7 +1856,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.CloudServiceListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1934,7 +1920,7 @@ async def get_next(next_link=None): async def _start_initial( self, resource_group_name: str, cloud_service_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2038,7 +2024,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _power_off_initial( self, resource_group_name: str, cloud_service_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2147,7 +2133,7 @@ async def _restart_initial( parameters: Optional[Union[_models.RoleInstances, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2332,7 +2318,7 @@ async def _reimage_initial( parameters: Optional[Union[_models.RoleInstances, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2520,7 +2506,7 @@ async def _rebuild_initial( parameters: Optional[Union[_models.RoleInstances, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2711,7 +2697,7 @@ async def _delete_instances_initial( parameters: Optional[Union[_models.RoleInstances, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2918,7 +2904,7 @@ async def _walk_update_domain_initial( parameters: Optional[Union[_models.UpdateDomain, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3133,7 +3119,7 @@ async def get_update_domain( :rtype: ~azure.mgmt.compute.v2021_03_01.models.UpdateDomain :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3197,7 +3183,7 @@ def list_update_domains( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.UpdateDomainListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3293,7 +3279,7 @@ async def get_os_version(self, location: str, os_version_name: str, **kwargs: An :rtype: ~azure.mgmt.compute.v2021_03_01.models.OSVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3354,7 +3340,7 @@ def list_os_versions(self, location: str, **kwargs: Any) -> AsyncIterable["_mode api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.OSVersionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3428,7 +3414,7 @@ async def get_os_family(self, location: str, os_family_name: str, **kwargs: Any) :rtype: ~azure.mgmt.compute.v2021_03_01.models.OSFamily :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3489,7 +3475,7 @@ def list_os_families(self, location: str, **kwargs: Any) -> AsyncIterable["_mode api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.OSFamilyListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3587,7 +3573,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.ComputeOperationValue"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.ComputeOperationListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3740,7 +3726,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2021_03_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3867,7 +3853,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2021_03_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3922,9 +3908,7 @@ async def update( return deserialized # type: ignore @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, availability_set_name: str, **kwargs: Any - ) -> None: + async def delete(self, resource_group_name: str, availability_set_name: str, **kwargs: Any) -> None: """Delete an availability set. :param resource_group_name: The name of the resource group. Required. @@ -3935,7 +3919,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3985,7 +3969,7 @@ async def get(self, resource_group_name: str, availability_set_name: str, **kwar :rtype: ~azure.mgmt.compute.v2021_03_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4047,7 +4031,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4125,7 +4109,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4208,7 +4192,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4366,7 +4350,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2021_03_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4496,7 +4480,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2021_03_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4551,9 +4535,7 @@ async def update( return deserialized # type: ignore @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, proximity_placement_group_name: str, **kwargs: Any - ) -> None: + async def delete(self, resource_group_name: str, proximity_placement_group_name: str, **kwargs: Any) -> None: """Delete a proximity placement group. :param resource_group_name: The name of the resource group. Required. @@ -4564,7 +4546,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4624,7 +4606,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_03_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4683,7 +4665,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Proximit api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4763,7 +4745,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4924,7 +4906,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2021_03_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5051,7 +5033,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2021_03_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5106,9 +5088,7 @@ async def update( return deserialized # type: ignore @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, host_group_name: str, **kwargs: Any - ) -> None: + async def delete(self, resource_group_name: str, host_group_name: str, **kwargs: Any) -> None: """Delete a dedicated host group. :param resource_group_name: The name of the resource group. Required. @@ -5119,7 +5099,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5181,7 +5161,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_03_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5244,7 +5224,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5321,7 +5301,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Dedicate api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5410,7 +5390,7 @@ async def _create_or_update_initial( parameters: Union[_models.DedicatedHost, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5614,7 +5594,7 @@ async def _update_initial( parameters: Union[_models.DedicatedHostUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5813,7 +5793,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5944,7 +5924,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_03_01.models.DedicatedHost :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6010,7 +5990,7 @@ def list_by_host_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.DedicatedHostListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6110,7 +6090,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.SshPubli api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6191,7 +6171,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6325,7 +6305,7 @@ async def create( :rtype: ~azure.mgmt.compute.v2021_03_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6453,7 +6433,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2021_03_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6508,9 +6488,7 @@ async def update( return deserialized # type: ignore @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, ssh_public_key_name: str, **kwargs: Any - ) -> None: + async def delete(self, resource_group_name: str, ssh_public_key_name: str, **kwargs: Any) -> None: """Delete an SSH public key. :param resource_group_name: The name of the resource group. Required. @@ -6521,7 +6499,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6573,7 +6551,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_03_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6631,7 +6609,7 @@ async def generate_key_pair( :rtype: ~azure.mgmt.compute.v2021_03_01.models.SshPublicKeyGenerateKeyPairResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6712,7 +6690,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_03_01.models.VirtualMachineExtensionImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6770,7 +6748,7 @@ async def list_types( :rtype: list[~azure.mgmt.compute.v2021_03_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6842,7 +6820,7 @@ async def list_versions( :rtype: list[~azure.mgmt.compute.v2021_03_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6917,7 +6895,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineExtension, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7127,7 +7105,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineExtensionUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7333,7 +7311,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_name: str, vm_extension_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7463,7 +7441,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_03_01.models.VirtualMachineExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7523,7 +7501,7 @@ async def list( :rtype: ~azure.mgmt.compute.v2021_03_01.models.VirtualMachineExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7607,7 +7585,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_03_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7686,7 +7664,7 @@ async def list( :rtype: list[~azure.mgmt.compute.v2021_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7747,7 +7725,7 @@ async def list_offers( :rtype: list[~azure.mgmt.compute.v2021_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7799,7 +7777,7 @@ async def list_publishers(self, location: str, **kwargs: Any) -> List[_models.Vi :rtype: list[~azure.mgmt.compute.v2021_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7856,7 +7834,7 @@ async def list_skus( :rtype: list[~azure.mgmt.compute.v2021_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7942,7 +7920,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_03_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8028,7 +8006,7 @@ async def list( :rtype: list[~azure.mgmt.compute.v2021_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8094,7 +8072,7 @@ async def list_offers( :rtype: list[~azure.mgmt.compute.v2021_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8152,7 +8130,7 @@ async def list_publishers( :rtype: list[~azure.mgmt.compute.v2021_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8214,7 +8192,7 @@ async def list_skus( :rtype: list[~azure.mgmt.compute.v2021_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8297,7 +8275,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.Usage"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.ListUsagesResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8397,7 +8375,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> AsyncIterable["_mode api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8465,7 +8443,7 @@ async def _capture_initial( parameters: Union[_models.VirtualMachineCaptureParameters, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8663,7 +8641,7 @@ async def _create_or_update_initial( parameters: Union[_models.VirtualMachine, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8858,7 +8836,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9046,7 +9024,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_name: str, *, force_deletion: Optional[bool] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9177,7 +9155,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_03_01.models.VirtualMachine :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9234,7 +9212,7 @@ async def instance_view( :rtype: ~azure.mgmt.compute.v2021_03_01.models.VirtualMachineInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9279,7 +9257,7 @@ async def instance_view( async def _convert_to_managed_disks_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9382,7 +9360,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _deallocate_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9483,9 +9461,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace_async - async def generalize( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, vm_name: str, **kwargs: Any - ) -> None: + async def generalize(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> None: """Sets the OS state of the virtual machine to generalized. It is recommended to sysprep the virtual machine before performing this operation. :code:`
`For Windows, please refer to `Create a managed image of a generalized VM in Azure @@ -9501,7 +9477,7 @@ async def generalize( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9557,7 +9533,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9637,7 +9613,7 @@ def list_all(self, *, status_only: Optional[str] = None, **kwargs: Any) -> Async api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9720,7 +9696,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9785,7 +9761,7 @@ async def get_next(next_link=None): async def _power_off_initial( self, resource_group_name: str, vm_name: str, *, skip_shutdown: bool = False, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9894,7 +9870,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _reapply_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9995,7 +9971,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _restart_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10095,7 +10071,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _start_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10195,7 +10171,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _redeploy_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10301,7 +10277,7 @@ async def _reimage_initial( parameters: Optional[Union[_models.VirtualMachineReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10506,7 +10482,7 @@ async def retrieve_boot_diagnostics_data( :rtype: ~azure.mgmt.compute.v2021_03_01.models.RetrieveBootDiagnosticsDataResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10553,7 +10529,7 @@ async def retrieve_boot_diagnostics_data( async def _perform_maintenance_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10655,9 +10631,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace_async - async def simulate_eviction( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, vm_name: str, **kwargs: Any - ) -> None: + async def simulate_eviction(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> None: """The operation to simulate the eviction of spot virtual machine. :param resource_group_name: The name of the resource group. Required. @@ -10668,7 +10642,7 @@ async def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10709,7 +10683,7 @@ async def simulate_eviction( # pylint: disable=inconsistent-return-statements async def _assess_patches_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10826,7 +10800,7 @@ async def _install_patches_initial( install_patches_input: Union[_models.VirtualMachineInstallPatchesParameters, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11025,7 +10999,7 @@ async def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11252,7 +11226,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> AsyncIterable["_mode api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11321,7 +11295,7 @@ async def _create_or_update_initial( parameters: Union[_models.VirtualMachineScaleSet, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11513,7 +11487,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineScaleSetUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11702,7 +11676,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, *, force_deletion: Optional[bool] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11831,7 +11805,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_03_01.models.VirtualMachineScaleSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11881,7 +11855,7 @@ async def _deallocate_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12078,7 +12052,7 @@ async def _delete_instances_initial( force_deletion: Optional[bool] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12286,7 +12260,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2021_03_01.models.VirtualMachineScaleSetInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12346,7 +12320,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12425,7 +12399,7 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.VirtualMachineScaleS api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.VirtualMachineScaleSetListWithLinkResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12508,7 +12482,7 @@ def list_skus( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.VirtualMachineScaleSetListSkusResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12574,6 +12548,7 @@ async def get_next(next_link=None): def get_os_upgrade_history( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> AsyncIterable["_models.UpgradeOperationHistoricalStatusInfo"]: + # pylint: disable=line-too-long """Gets list of OS upgrades on a VM scale set instance. :param resource_group_name: The name of the resource group. Required. @@ -12592,7 +12567,7 @@ def get_os_upgrade_history( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.VirtualMachineScaleSetListOSUpgradeHistory] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12663,7 +12638,7 @@ async def _power_off_initial( skip_shutdown: bool = False, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12876,7 +12851,7 @@ async def _restart_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13065,7 +13040,7 @@ async def _start_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13254,7 +13229,7 @@ async def _redeploy_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13446,7 +13421,7 @@ async def _perform_maintenance_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13644,7 +13619,7 @@ async def _update_instances_initial( vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13830,7 +13805,7 @@ async def _reimage_initial( vm_scale_set_reimage_input: Optional[Union[_models.VirtualMachineScaleSetReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14023,7 +13998,7 @@ async def _reimage_all_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14226,7 +14201,7 @@ async def force_recovery_service_fabric_platform_update_domain_walk( # pylint: :rtype: ~azure.mgmt.compute.v2021_03_01.models.RecoveryWalkResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14270,7 +14245,7 @@ async def force_recovery_service_fabric_platform_update_domain_walk( # pylint: return deserialized # type: ignore @overload - async def convert_to_single_placement_group( # pylint: disable=inconsistent-return-statements + async def convert_to_single_placement_group( self, resource_group_name: str, vm_scale_set_name: str, @@ -14298,7 +14273,7 @@ async def convert_to_single_placement_group( # pylint: disable=inconsistent-ret """ @overload - async def convert_to_single_placement_group( # pylint: disable=inconsistent-return-statements + async def convert_to_single_placement_group( self, resource_group_name: str, vm_scale_set_name: str, @@ -14325,7 +14300,7 @@ async def convert_to_single_placement_group( # pylint: disable=inconsistent-ret """ @distributed_trace_async - async def convert_to_single_placement_group( # pylint: disable=inconsistent-return-statements + async def convert_to_single_placement_group( self, resource_group_name: str, vm_scale_set_name: str, @@ -14348,7 +14323,7 @@ async def convert_to_single_placement_group( # pylint: disable=inconsistent-ret :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14405,7 +14380,7 @@ async def _set_orchestration_service_state_initial( parameters: Union[_models.OrchestrationServiceStateInput, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14623,7 +14598,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.VirtualMa api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14708,7 +14683,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, image_name: str, parameters: Union[_models.Image, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14890,7 +14865,7 @@ async def _update_initial( parameters: Union[_models.ImageUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15070,7 +15045,7 @@ def get_long_running_output(pipeline_response): ) async def _delete_initial(self, resource_group_name: str, image_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15185,7 +15160,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_03_01.models.Image :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15244,7 +15219,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15320,7 +15295,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Image"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15482,7 +15457,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2021_03_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15613,7 +15588,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2021_03_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15671,7 +15646,7 @@ async def update( async def _delete_initial( self, resource_group_name: str, restore_point_collection_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15798,7 +15773,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_03_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15860,7 +15835,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.RestorePointCollectionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15940,7 +15915,7 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.RestorePointCollecti api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.RestorePointCollectionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16030,7 +16005,7 @@ async def _create_initial( parameters: Union[_models.RestorePoint, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16230,7 +16205,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, restore_point_collection_name: str, restore_point_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16352,7 +16327,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_03_01.models.RestorePoint :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16425,7 +16400,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtension, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16636,7 +16611,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtensionUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16843,7 +16818,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, vmss_extension_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16973,7 +16948,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_03_01.models.VirtualMachineScaleSetExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17039,7 +17014,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.VirtualMachineScaleSetExtensionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17125,7 +17100,7 @@ def __init__(self, *args, **kwargs) -> None: async def _cancel_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17229,7 +17204,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_os_upgrade_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17335,7 +17310,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_extension_upgrade_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17452,7 +17427,7 @@ async def get_latest( :rtype: ~azure.mgmt.compute.v2021_03_01.models.RollingUpgradeStatusInfo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17524,7 +17499,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetVMExtension, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17745,7 +17720,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetVMExtensionUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17961,7 +17936,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, vm_extension_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18098,7 +18073,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_03_01.models.VirtualMachineScaleSetVMExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18168,7 +18143,7 @@ async def list( :rtype: ~azure.mgmt.compute.v2021_03_01.models.VirtualMachineScaleSetVMExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18246,7 +18221,7 @@ async def _reimage_initial( ] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18445,7 +18420,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _reimage_all_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18554,7 +18529,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _deallocate_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18669,7 +18644,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineScaleSetVM, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18879,7 +18854,7 @@ async def _delete_initial( force_deletion: Optional[bool] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19021,7 +18996,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_03_01.models.VirtualMachineScaleSetVM :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19081,7 +19056,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2021_03_01.models.VirtualMachineScaleSetVMInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19163,7 +19138,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.VirtualMachineScaleSetVMListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19237,7 +19212,7 @@ async def _power_off_initial( skip_shutdown: bool = False, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19359,7 +19334,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _restart_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19467,7 +19442,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19575,7 +19550,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _redeploy_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19709,7 +19684,7 @@ async def retrieve_boot_diagnostics_data( :rtype: ~azure.mgmt.compute.v2021_03_01.models.RetrieveBootDiagnosticsDataResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19757,7 +19732,7 @@ async def retrieve_boot_diagnostics_data( async def _perform_maintenance_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19863,7 +19838,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace_async - async def simulate_eviction( # pylint: disable=inconsistent-return-statements + async def simulate_eviction( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: """The operation to simulate the eviction of spot virtual machine in a VM scale set. @@ -19878,7 +19853,7 @@ async def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19925,7 +19900,7 @@ async def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20147,7 +20122,7 @@ def __init__(self, *args, **kwargs) -> None: async def _export_request_rate_by_interval_initial( self, location: str, parameters: Union[_models.RequestRateByIntervalInput, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20325,7 +20300,7 @@ def get_long_running_output(pipeline_response): async def _export_throttled_requests_initial( self, location: str, parameters: Union[_models.ThrottledRequestsInput, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20536,7 +20511,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.RunComman api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.RunCommandListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20609,7 +20584,7 @@ async def get(self, location: str, command_id: str, **kwargs: Any) -> _models.Ru :rtype: ~azure.mgmt.compute.v2021_03_01.models.RunCommandDocument :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20659,7 +20634,7 @@ async def _create_or_update_initial( run_command: Union[_models.VirtualMachineRunCommand, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20869,7 +20844,7 @@ async def _update_initial( run_command: Union[_models.VirtualMachineRunCommandUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21075,7 +21050,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_name: str, run_command_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21206,7 +21181,7 @@ async def get_by_virtual_machine( :rtype: ~azure.mgmt.compute.v2021_03_01.models.VirtualMachineRunCommand :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21275,7 +21250,7 @@ def list_by_virtual_machine( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.VirtualMachineRunCommandsListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21369,7 +21344,7 @@ async def _create_or_update_initial( run_command: Union[_models.VirtualMachineRunCommand, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21588,7 +21563,7 @@ async def _update_initial( run_command: Union[_models.VirtualMachineRunCommandUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21802,7 +21777,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, run_command_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21939,7 +21914,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_03_01.models.VirtualMachineRunCommand :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22017,7 +21992,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.VirtualMachineRunCommandsListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_03_01/models/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_03_01/models/__init__.py index 3a24cbd4c04fc..d5dd7ab5ab1d3 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_03_01/models/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_03_01/models/__init__.py @@ -5,341 +5,352 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._models_py3 import AdditionalCapabilities -from ._models_py3 import AdditionalUnattendContent -from ._models_py3 import ApiEntityReference -from ._models_py3 import ApiError -from ._models_py3 import ApiErrorAutoGenerated -from ._models_py3 import ApiErrorAutoGenerated2 -from ._models_py3 import ApiErrorBase -from ._models_py3 import AutomaticOSUpgradePolicy -from ._models_py3 import AutomaticOSUpgradeProperties -from ._models_py3 import AutomaticRepairsPolicy -from ._models_py3 import AvailabilitySet -from ._models_py3 import AvailabilitySetListResult -from ._models_py3 import AvailabilitySetUpdate -from ._models_py3 import AvailablePatchSummary -from ._models_py3 import BillingProfile -from ._models_py3 import BootDiagnostics -from ._models_py3 import BootDiagnosticsInstanceView -from ._models_py3 import CloudErrorAutoGenerated -from ._models_py3 import CloudErrorAutoGenerated2 -from ._models_py3 import CloudService -from ._models_py3 import CloudServiceExtensionProfile -from ._models_py3 import CloudServiceExtensionProperties -from ._models_py3 import CloudServiceInstanceView -from ._models_py3 import CloudServiceListResult -from ._models_py3 import CloudServiceNetworkProfile -from ._models_py3 import CloudServiceOsProfile -from ._models_py3 import CloudServiceProperties -from ._models_py3 import CloudServiceRole -from ._models_py3 import CloudServiceRoleListResult -from ._models_py3 import CloudServiceRoleProfile -from ._models_py3 import CloudServiceRoleProfileProperties -from ._models_py3 import CloudServiceRoleProperties -from ._models_py3 import CloudServiceRoleSku -from ._models_py3 import CloudServiceUpdate -from ._models_py3 import CloudServiceVaultAndSecretReference -from ._models_py3 import CloudServiceVaultCertificate -from ._models_py3 import CloudServiceVaultSecretGroup -from ._models_py3 import ComputeOperationListResult -from ._models_py3 import ComputeOperationValue -from ._models_py3 import DataDisk -from ._models_py3 import DataDiskImage -from ._models_py3 import DedicatedHost -from ._models_py3 import DedicatedHostAllocatableVM -from ._models_py3 import DedicatedHostAvailableCapacity -from ._models_py3 import DedicatedHostGroup -from ._models_py3 import DedicatedHostGroupInstanceView -from ._models_py3 import DedicatedHostGroupListResult -from ._models_py3 import DedicatedHostGroupUpdate -from ._models_py3 import DedicatedHostInstanceView -from ._models_py3 import DedicatedHostInstanceViewWithName -from ._models_py3 import DedicatedHostListResult -from ._models_py3 import DedicatedHostUpdate -from ._models_py3 import DiagnosticsProfile -from ._models_py3 import DiffDiskSettings -from ._models_py3 import DisallowedConfiguration -from ._models_py3 import DiskEncryptionSetParameters -from ._models_py3 import DiskEncryptionSettings -from ._models_py3 import DiskInstanceView -from ._models_py3 import ExtendedLocation -from ._models_py3 import Extension -from ._models_py3 import HardwareProfile -from ._models_py3 import Image -from ._models_py3 import ImageDataDisk -from ._models_py3 import ImageDisk -from ._models_py3 import ImageListResult -from ._models_py3 import ImageOSDisk -from ._models_py3 import ImageReference -from ._models_py3 import ImageStorageProfile -from ._models_py3 import ImageUpdate -from ._models_py3 import InnerError -from ._models_py3 import InstanceSku -from ._models_py3 import InstanceViewStatus -from ._models_py3 import InstanceViewStatusesSummary -from ._models_py3 import KeyVaultKeyReference -from ._models_py3 import KeyVaultSecretReference -from ._models_py3 import LastPatchInstallationSummary -from ._models_py3 import LinuxConfiguration -from ._models_py3 import LinuxParameters -from ._models_py3 import LinuxPatchSettings -from ._models_py3 import ListUsagesResult -from ._models_py3 import LoadBalancerConfiguration -from ._models_py3 import LoadBalancerConfigurationProperties -from ._models_py3 import LoadBalancerFrontendIPConfiguration -from ._models_py3 import LoadBalancerFrontendIPConfigurationProperties -from ._models_py3 import LogAnalyticsInputBase -from ._models_py3 import LogAnalyticsOperationResult -from ._models_py3 import LogAnalyticsOutput -from ._models_py3 import MaintenanceRedeployStatus -from ._models_py3 import ManagedDiskParameters -from ._models_py3 import NetworkInterfaceReference -from ._models_py3 import NetworkProfile -from ._models_py3 import OSDisk -from ._models_py3 import OSDiskImage -from ._models_py3 import OSFamily -from ._models_py3 import OSFamilyListResult -from ._models_py3 import OSFamilyProperties -from ._models_py3 import OSProfile -from ._models_py3 import OSVersion -from ._models_py3 import OSVersionListResult -from ._models_py3 import OSVersionProperties -from ._models_py3 import OSVersionPropertiesBase -from ._models_py3 import OrchestrationServiceStateInput -from ._models_py3 import OrchestrationServiceSummary -from ._models_py3 import PatchInstallationDetail -from ._models_py3 import PatchSettings -from ._models_py3 import Plan -from ._models_py3 import ProximityPlacementGroup -from ._models_py3 import ProximityPlacementGroupListResult -from ._models_py3 import ProximityPlacementGroupUpdate -from ._models_py3 import ProxyResource -from ._models_py3 import PublicIPAddressSku -from ._models_py3 import PurchasePlan -from ._models_py3 import RecoveryWalkResponse -from ._models_py3 import RequestRateByIntervalInput -from ._models_py3 import Resource -from ._models_py3 import ResourceInstanceViewStatus -from ._models_py3 import RestorePoint -from ._models_py3 import RestorePointCollection -from ._models_py3 import RestorePointCollectionListResult -from ._models_py3 import RestorePointCollectionSourceProperties -from ._models_py3 import RestorePointCollectionUpdate -from ._models_py3 import RestorePointSourceMetadata -from ._models_py3 import RestorePointSourceVMDataDisk -from ._models_py3 import RestorePointSourceVMOSDisk -from ._models_py3 import RestorePointSourceVMStorageProfile -from ._models_py3 import RetrieveBootDiagnosticsDataResult -from ._models_py3 import RoleInstance -from ._models_py3 import RoleInstanceListResult -from ._models_py3 import RoleInstanceNetworkProfile -from ._models_py3 import RoleInstanceProperties -from ._models_py3 import RoleInstanceView -from ._models_py3 import RoleInstances -from ._models_py3 import RollbackStatusInfo -from ._models_py3 import RollingUpgradePolicy -from ._models_py3 import RollingUpgradeProgressInfo -from ._models_py3 import RollingUpgradeRunningStatus -from ._models_py3 import RollingUpgradeStatusInfo -from ._models_py3 import RunCommandDocument -from ._models_py3 import RunCommandDocumentBase -from ._models_py3 import RunCommandInput -from ._models_py3 import RunCommandInputParameter -from ._models_py3 import RunCommandListResult -from ._models_py3 import RunCommandParameterDefinition -from ._models_py3 import RunCommandResult -from ._models_py3 import ScaleInPolicy -from ._models_py3 import ScheduledEventsProfile -from ._models_py3 import SecurityProfile -from ._models_py3 import Sku -from ._models_py3 import SshConfiguration -from ._models_py3 import SshPublicKey -from ._models_py3 import SshPublicKeyGenerateKeyPairResult -from ._models_py3 import SshPublicKeyResource -from ._models_py3 import SshPublicKeyUpdateResource -from ._models_py3 import SshPublicKeysGroupListResult -from ._models_py3 import StatusCodeCount -from ._models_py3 import StorageProfile -from ._models_py3 import SubResource -from ._models_py3 import SubResourceReadOnly -from ._models_py3 import SubResourceWithColocationStatus -from ._models_py3 import TerminateNotificationProfile -from ._models_py3 import ThrottledRequestsInput -from ._models_py3 import UefiSettings -from ._models_py3 import UpdateDomain -from ._models_py3 import UpdateDomainListResult -from ._models_py3 import UpdateResource -from ._models_py3 import UpgradeOperationHistoricalStatusInfo -from ._models_py3 import UpgradeOperationHistoricalStatusInfoProperties -from ._models_py3 import UpgradeOperationHistoryStatus -from ._models_py3 import UpgradePolicy -from ._models_py3 import Usage -from ._models_py3 import UsageName -from ._models_py3 import UserAssignedIdentitiesValue -from ._models_py3 import VMScaleSetConvertToSinglePlacementGroupInput -from ._models_py3 import VaultCertificate -from ._models_py3 import VaultSecretGroup -from ._models_py3 import VirtualHardDisk -from ._models_py3 import VirtualMachine -from ._models_py3 import VirtualMachineAgentInstanceView -from ._models_py3 import VirtualMachineAssessPatchesResult -from ._models_py3 import VirtualMachineCaptureParameters -from ._models_py3 import VirtualMachineCaptureResult -from ._models_py3 import VirtualMachineExtension -from ._models_py3 import VirtualMachineExtensionHandlerInstanceView -from ._models_py3 import VirtualMachineExtensionImage -from ._models_py3 import VirtualMachineExtensionInstanceView -from ._models_py3 import VirtualMachineExtensionUpdate -from ._models_py3 import VirtualMachineExtensionsListResult -from ._models_py3 import VirtualMachineHealthStatus -from ._models_py3 import VirtualMachineIdentity -from ._models_py3 import VirtualMachineImage -from ._models_py3 import VirtualMachineImageFeature -from ._models_py3 import VirtualMachineImageResource -from ._models_py3 import VirtualMachineInstallPatchesParameters -from ._models_py3 import VirtualMachineInstallPatchesResult -from ._models_py3 import VirtualMachineInstanceView -from ._models_py3 import VirtualMachineIpTag -from ._models_py3 import VirtualMachineListResult -from ._models_py3 import VirtualMachineNetworkInterfaceConfiguration -from ._models_py3 import VirtualMachineNetworkInterfaceDnsSettingsConfiguration -from ._models_py3 import VirtualMachineNetworkInterfaceIPConfiguration -from ._models_py3 import VirtualMachinePatchStatus -from ._models_py3 import VirtualMachinePublicIPAddressConfiguration -from ._models_py3 import VirtualMachinePublicIPAddressDnsSettingsConfiguration -from ._models_py3 import VirtualMachineReimageParameters -from ._models_py3 import VirtualMachineRunCommand -from ._models_py3 import VirtualMachineRunCommandInstanceView -from ._models_py3 import VirtualMachineRunCommandScriptSource -from ._models_py3 import VirtualMachineRunCommandUpdate -from ._models_py3 import VirtualMachineRunCommandsListResult -from ._models_py3 import VirtualMachineScaleSet -from ._models_py3 import VirtualMachineScaleSetDataDisk -from ._models_py3 import VirtualMachineScaleSetExtension -from ._models_py3 import VirtualMachineScaleSetExtensionListResult -from ._models_py3 import VirtualMachineScaleSetExtensionProfile -from ._models_py3 import VirtualMachineScaleSetExtensionUpdate -from ._models_py3 import VirtualMachineScaleSetIPConfiguration -from ._models_py3 import VirtualMachineScaleSetIdentity -from ._models_py3 import VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue -from ._models_py3 import VirtualMachineScaleSetInstanceView -from ._models_py3 import VirtualMachineScaleSetInstanceViewStatusesSummary -from ._models_py3 import VirtualMachineScaleSetIpTag -from ._models_py3 import VirtualMachineScaleSetListOSUpgradeHistory -from ._models_py3 import VirtualMachineScaleSetListResult -from ._models_py3 import VirtualMachineScaleSetListSkusResult -from ._models_py3 import VirtualMachineScaleSetListWithLinkResult -from ._models_py3 import VirtualMachineScaleSetManagedDiskParameters -from ._models_py3 import VirtualMachineScaleSetNetworkConfiguration -from ._models_py3 import VirtualMachineScaleSetNetworkConfigurationDnsSettings -from ._models_py3 import VirtualMachineScaleSetNetworkProfile -from ._models_py3 import VirtualMachineScaleSetOSDisk -from ._models_py3 import VirtualMachineScaleSetOSProfile -from ._models_py3 import VirtualMachineScaleSetPublicIPAddressConfiguration -from ._models_py3 import VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings -from ._models_py3 import VirtualMachineScaleSetReimageParameters -from ._models_py3 import VirtualMachineScaleSetSku -from ._models_py3 import VirtualMachineScaleSetSkuCapacity -from ._models_py3 import VirtualMachineScaleSetStorageProfile -from ._models_py3 import VirtualMachineScaleSetUpdate -from ._models_py3 import VirtualMachineScaleSetUpdateIPConfiguration -from ._models_py3 import VirtualMachineScaleSetUpdateNetworkConfiguration -from ._models_py3 import VirtualMachineScaleSetUpdateNetworkProfile -from ._models_py3 import VirtualMachineScaleSetUpdateOSDisk -from ._models_py3 import VirtualMachineScaleSetUpdateOSProfile -from ._models_py3 import VirtualMachineScaleSetUpdatePublicIPAddressConfiguration -from ._models_py3 import VirtualMachineScaleSetUpdateStorageProfile -from ._models_py3 import VirtualMachineScaleSetUpdateVMProfile -from ._models_py3 import VirtualMachineScaleSetVM -from ._models_py3 import VirtualMachineScaleSetVMExtension -from ._models_py3 import VirtualMachineScaleSetVMExtensionUpdate -from ._models_py3 import VirtualMachineScaleSetVMExtensionsListResult -from ._models_py3 import VirtualMachineScaleSetVMExtensionsSummary -from ._models_py3 import VirtualMachineScaleSetVMInstanceIDs -from ._models_py3 import VirtualMachineScaleSetVMInstanceRequiredIDs -from ._models_py3 import VirtualMachineScaleSetVMInstanceView -from ._models_py3 import VirtualMachineScaleSetVMListResult -from ._models_py3 import VirtualMachineScaleSetVMNetworkProfileConfiguration -from ._models_py3 import VirtualMachineScaleSetVMProfile -from ._models_py3 import VirtualMachineScaleSetVMProtectionPolicy -from ._models_py3 import VirtualMachineScaleSetVMReimageParameters -from ._models_py3 import VirtualMachineSize -from ._models_py3 import VirtualMachineSizeListResult -from ._models_py3 import VirtualMachineSoftwarePatchProperties -from ._models_py3 import VirtualMachineStatusCodeCount -from ._models_py3 import VirtualMachineUpdate -from ._models_py3 import WinRMConfiguration -from ._models_py3 import WinRMListener -from ._models_py3 import WindowsConfiguration -from ._models_py3 import WindowsParameters +from typing import TYPE_CHECKING -from ._compute_management_client_enums import AvailabilitySetSkuTypes -from ._compute_management_client_enums import CachingTypes -from ._compute_management_client_enums import CloudServiceUpgradeMode -from ._compute_management_client_enums import ConsistencyModeTypes -from ._compute_management_client_enums import DedicatedHostLicenseTypes -from ._compute_management_client_enums import DeleteOptions -from ._compute_management_client_enums import DiffDiskOptions -from ._compute_management_client_enums import DiffDiskPlacement -from ._compute_management_client_enums import DiskCreateOptionTypes -from ._compute_management_client_enums import DiskDeleteOptionTypes -from ._compute_management_client_enums import DiskDetachOptionTypes -from ._compute_management_client_enums import ExecutionState -from ._compute_management_client_enums import ExpandTypesForGetVMScaleSets -from ._compute_management_client_enums import ExtendedLocationTypes -from ._compute_management_client_enums import HyperVGenerationType -from ._compute_management_client_enums import HyperVGenerationTypes -from ._compute_management_client_enums import IPVersion -from ._compute_management_client_enums import IPVersions -from ._compute_management_client_enums import InstanceViewTypes -from ._compute_management_client_enums import IntervalInMins -from ._compute_management_client_enums import LinuxPatchAssessmentMode -from ._compute_management_client_enums import LinuxVMGuestPatchMode -from ._compute_management_client_enums import MaintenanceOperationResultCodeTypes -from ._compute_management_client_enums import NetworkApiVersion -from ._compute_management_client_enums import OperatingSystemStateTypes -from ._compute_management_client_enums import OperatingSystemType -from ._compute_management_client_enums import OperatingSystemTypes -from ._compute_management_client_enums import OrchestrationMode -from ._compute_management_client_enums import OrchestrationServiceNames -from ._compute_management_client_enums import OrchestrationServiceState -from ._compute_management_client_enums import OrchestrationServiceStateAction -from ._compute_management_client_enums import PatchAssessmentState -from ._compute_management_client_enums import PatchInstallationState -from ._compute_management_client_enums import PatchOperationStatus -from ._compute_management_client_enums import ProtocolTypes -from ._compute_management_client_enums import ProximityPlacementGroupType -from ._compute_management_client_enums import PublicIPAddressSkuName -from ._compute_management_client_enums import PublicIPAddressSkuTier -from ._compute_management_client_enums import PublicIPAllocationMethod -from ._compute_management_client_enums import ResourceIdentityType -from ._compute_management_client_enums import RestorePointCollectionExpandOptions -from ._compute_management_client_enums import RollingUpgradeActionType -from ._compute_management_client_enums import RollingUpgradeStatusCode -from ._compute_management_client_enums import SecurityTypes -from ._compute_management_client_enums import SettingNames -from ._compute_management_client_enums import StatusLevelTypes -from ._compute_management_client_enums import StorageAccountTypes -from ._compute_management_client_enums import UpgradeMode -from ._compute_management_client_enums import UpgradeOperationInvoker -from ._compute_management_client_enums import UpgradeState -from ._compute_management_client_enums import VMGuestPatchClassificationLinux -from ._compute_management_client_enums import VMGuestPatchClassificationWindows -from ._compute_management_client_enums import VMGuestPatchRebootBehavior -from ._compute_management_client_enums import VMGuestPatchRebootSetting -from ._compute_management_client_enums import VMGuestPatchRebootStatus -from ._compute_management_client_enums import VirtualMachineEvictionPolicyTypes -from ._compute_management_client_enums import VirtualMachinePriorityTypes -from ._compute_management_client_enums import VirtualMachineScaleSetScaleInRules -from ._compute_management_client_enums import VirtualMachineScaleSetSkuScaleType -from ._compute_management_client_enums import VirtualMachineSizeTypes -from ._compute_management_client_enums import VmDiskTypes -from ._compute_management_client_enums import WindowsPatchAssessmentMode -from ._compute_management_client_enums import WindowsVMGuestPatchMode +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + + +from ._models_py3 import ( # type: ignore + AdditionalCapabilities, + AdditionalUnattendContent, + ApiEntityReference, + ApiError, + ApiErrorAutoGenerated, + ApiErrorAutoGenerated2, + ApiErrorBase, + AutomaticOSUpgradePolicy, + AutomaticOSUpgradeProperties, + AutomaticRepairsPolicy, + AvailabilitySet, + AvailabilitySetListResult, + AvailabilitySetUpdate, + AvailablePatchSummary, + BillingProfile, + BootDiagnostics, + BootDiagnosticsInstanceView, + CloudErrorAutoGenerated, + CloudErrorAutoGenerated2, + CloudService, + CloudServiceExtensionProfile, + CloudServiceExtensionProperties, + CloudServiceInstanceView, + CloudServiceListResult, + CloudServiceNetworkProfile, + CloudServiceOsProfile, + CloudServiceProperties, + CloudServiceRole, + CloudServiceRoleListResult, + CloudServiceRoleProfile, + CloudServiceRoleProfileProperties, + CloudServiceRoleProperties, + CloudServiceRoleSku, + CloudServiceUpdate, + CloudServiceVaultAndSecretReference, + CloudServiceVaultCertificate, + CloudServiceVaultSecretGroup, + ComputeOperationListResult, + ComputeOperationValue, + DataDisk, + DataDiskImage, + DedicatedHost, + DedicatedHostAllocatableVM, + DedicatedHostAvailableCapacity, + DedicatedHostGroup, + DedicatedHostGroupInstanceView, + DedicatedHostGroupListResult, + DedicatedHostGroupUpdate, + DedicatedHostInstanceView, + DedicatedHostInstanceViewWithName, + DedicatedHostListResult, + DedicatedHostUpdate, + DiagnosticsProfile, + DiffDiskSettings, + DisallowedConfiguration, + DiskEncryptionSetParameters, + DiskEncryptionSettings, + DiskInstanceView, + ExtendedLocation, + Extension, + HardwareProfile, + Image, + ImageDataDisk, + ImageDisk, + ImageListResult, + ImageOSDisk, + ImageReference, + ImageStorageProfile, + ImageUpdate, + InnerError, + InstanceSku, + InstanceViewStatus, + InstanceViewStatusesSummary, + KeyVaultKeyReference, + KeyVaultSecretReference, + LastPatchInstallationSummary, + LinuxConfiguration, + LinuxParameters, + LinuxPatchSettings, + ListUsagesResult, + LoadBalancerConfiguration, + LoadBalancerConfigurationProperties, + LoadBalancerFrontendIPConfiguration, + LoadBalancerFrontendIPConfigurationProperties, + LogAnalyticsInputBase, + LogAnalyticsOperationResult, + LogAnalyticsOutput, + MaintenanceRedeployStatus, + ManagedDiskParameters, + NetworkInterfaceReference, + NetworkProfile, + OSDisk, + OSDiskImage, + OSFamily, + OSFamilyListResult, + OSFamilyProperties, + OSProfile, + OSVersion, + OSVersionListResult, + OSVersionProperties, + OSVersionPropertiesBase, + OrchestrationServiceStateInput, + OrchestrationServiceSummary, + PatchInstallationDetail, + PatchSettings, + Plan, + ProximityPlacementGroup, + ProximityPlacementGroupListResult, + ProximityPlacementGroupUpdate, + ProxyResource, + PublicIPAddressSku, + PurchasePlan, + RecoveryWalkResponse, + RequestRateByIntervalInput, + Resource, + ResourceInstanceViewStatus, + RestorePoint, + RestorePointCollection, + RestorePointCollectionListResult, + RestorePointCollectionSourceProperties, + RestorePointCollectionUpdate, + RestorePointSourceMetadata, + RestorePointSourceVMDataDisk, + RestorePointSourceVMOSDisk, + RestorePointSourceVMStorageProfile, + RetrieveBootDiagnosticsDataResult, + RoleInstance, + RoleInstanceListResult, + RoleInstanceNetworkProfile, + RoleInstanceProperties, + RoleInstanceView, + RoleInstances, + RollbackStatusInfo, + RollingUpgradePolicy, + RollingUpgradeProgressInfo, + RollingUpgradeRunningStatus, + RollingUpgradeStatusInfo, + RunCommandDocument, + RunCommandDocumentBase, + RunCommandInput, + RunCommandInputParameter, + RunCommandListResult, + RunCommandParameterDefinition, + RunCommandResult, + ScaleInPolicy, + ScheduledEventsProfile, + SecurityProfile, + Sku, + SshConfiguration, + SshPublicKey, + SshPublicKeyGenerateKeyPairResult, + SshPublicKeyResource, + SshPublicKeyUpdateResource, + SshPublicKeysGroupListResult, + StatusCodeCount, + StorageProfile, + SubResource, + SubResourceReadOnly, + SubResourceWithColocationStatus, + TerminateNotificationProfile, + ThrottledRequestsInput, + UefiSettings, + UpdateDomain, + UpdateDomainListResult, + UpdateResource, + UpgradeOperationHistoricalStatusInfo, + UpgradeOperationHistoricalStatusInfoProperties, + UpgradeOperationHistoryStatus, + UpgradePolicy, + Usage, + UsageName, + UserAssignedIdentitiesValue, + VMScaleSetConvertToSinglePlacementGroupInput, + VaultCertificate, + VaultSecretGroup, + VirtualHardDisk, + VirtualMachine, + VirtualMachineAgentInstanceView, + VirtualMachineAssessPatchesResult, + VirtualMachineCaptureParameters, + VirtualMachineCaptureResult, + VirtualMachineExtension, + VirtualMachineExtensionHandlerInstanceView, + VirtualMachineExtensionImage, + VirtualMachineExtensionInstanceView, + VirtualMachineExtensionUpdate, + VirtualMachineExtensionsListResult, + VirtualMachineHealthStatus, + VirtualMachineIdentity, + VirtualMachineImage, + VirtualMachineImageFeature, + VirtualMachineImageResource, + VirtualMachineInstallPatchesParameters, + VirtualMachineInstallPatchesResult, + VirtualMachineInstanceView, + VirtualMachineIpTag, + VirtualMachineListResult, + VirtualMachineNetworkInterfaceConfiguration, + VirtualMachineNetworkInterfaceDnsSettingsConfiguration, + VirtualMachineNetworkInterfaceIPConfiguration, + VirtualMachinePatchStatus, + VirtualMachinePublicIPAddressConfiguration, + VirtualMachinePublicIPAddressDnsSettingsConfiguration, + VirtualMachineReimageParameters, + VirtualMachineRunCommand, + VirtualMachineRunCommandInstanceView, + VirtualMachineRunCommandScriptSource, + VirtualMachineRunCommandUpdate, + VirtualMachineRunCommandsListResult, + VirtualMachineScaleSet, + VirtualMachineScaleSetDataDisk, + VirtualMachineScaleSetExtension, + VirtualMachineScaleSetExtensionListResult, + VirtualMachineScaleSetExtensionProfile, + VirtualMachineScaleSetExtensionUpdate, + VirtualMachineScaleSetIPConfiguration, + VirtualMachineScaleSetIdentity, + VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue, + VirtualMachineScaleSetInstanceView, + VirtualMachineScaleSetInstanceViewStatusesSummary, + VirtualMachineScaleSetIpTag, + VirtualMachineScaleSetListOSUpgradeHistory, + VirtualMachineScaleSetListResult, + VirtualMachineScaleSetListSkusResult, + VirtualMachineScaleSetListWithLinkResult, + VirtualMachineScaleSetManagedDiskParameters, + VirtualMachineScaleSetNetworkConfiguration, + VirtualMachineScaleSetNetworkConfigurationDnsSettings, + VirtualMachineScaleSetNetworkProfile, + VirtualMachineScaleSetOSDisk, + VirtualMachineScaleSetOSProfile, + VirtualMachineScaleSetPublicIPAddressConfiguration, + VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings, + VirtualMachineScaleSetReimageParameters, + VirtualMachineScaleSetSku, + VirtualMachineScaleSetSkuCapacity, + VirtualMachineScaleSetStorageProfile, + VirtualMachineScaleSetUpdate, + VirtualMachineScaleSetUpdateIPConfiguration, + VirtualMachineScaleSetUpdateNetworkConfiguration, + VirtualMachineScaleSetUpdateNetworkProfile, + VirtualMachineScaleSetUpdateOSDisk, + VirtualMachineScaleSetUpdateOSProfile, + VirtualMachineScaleSetUpdatePublicIPAddressConfiguration, + VirtualMachineScaleSetUpdateStorageProfile, + VirtualMachineScaleSetUpdateVMProfile, + VirtualMachineScaleSetVM, + VirtualMachineScaleSetVMExtension, + VirtualMachineScaleSetVMExtensionUpdate, + VirtualMachineScaleSetVMExtensionsListResult, + VirtualMachineScaleSetVMExtensionsSummary, + VirtualMachineScaleSetVMInstanceIDs, + VirtualMachineScaleSetVMInstanceRequiredIDs, + VirtualMachineScaleSetVMInstanceView, + VirtualMachineScaleSetVMListResult, + VirtualMachineScaleSetVMNetworkProfileConfiguration, + VirtualMachineScaleSetVMProfile, + VirtualMachineScaleSetVMProtectionPolicy, + VirtualMachineScaleSetVMReimageParameters, + VirtualMachineSize, + VirtualMachineSizeListResult, + VirtualMachineSoftwarePatchProperties, + VirtualMachineStatusCodeCount, + VirtualMachineUpdate, + WinRMConfiguration, + WinRMListener, + WindowsConfiguration, + WindowsParameters, +) + +from ._compute_management_client_enums import ( # type: ignore + AvailabilitySetSkuTypes, + CachingTypes, + CloudServiceUpgradeMode, + ConsistencyModeTypes, + DedicatedHostLicenseTypes, + DeleteOptions, + DiffDiskOptions, + DiffDiskPlacement, + DiskCreateOptionTypes, + DiskDeleteOptionTypes, + DiskDetachOptionTypes, + ExecutionState, + ExpandTypesForGetVMScaleSets, + ExtendedLocationTypes, + HyperVGenerationType, + HyperVGenerationTypes, + IPVersion, + IPVersions, + InstanceViewTypes, + IntervalInMins, + LinuxPatchAssessmentMode, + LinuxVMGuestPatchMode, + MaintenanceOperationResultCodeTypes, + NetworkApiVersion, + OperatingSystemStateTypes, + OperatingSystemType, + OperatingSystemTypes, + OrchestrationMode, + OrchestrationServiceNames, + OrchestrationServiceState, + OrchestrationServiceStateAction, + PatchAssessmentState, + PatchInstallationState, + PatchOperationStatus, + ProtocolTypes, + ProximityPlacementGroupType, + PublicIPAddressSkuName, + PublicIPAddressSkuTier, + PublicIPAllocationMethod, + ResourceIdentityType, + RestorePointCollectionExpandOptions, + RollingUpgradeActionType, + RollingUpgradeStatusCode, + SecurityTypes, + SettingNames, + StatusLevelTypes, + StorageAccountTypes, + UpgradeMode, + UpgradeOperationInvoker, + UpgradeState, + VMGuestPatchClassificationLinux, + VMGuestPatchClassificationWindows, + VMGuestPatchRebootBehavior, + VMGuestPatchRebootSetting, + VMGuestPatchRebootStatus, + VirtualMachineEvictionPolicyTypes, + VirtualMachinePriorityTypes, + VirtualMachineScaleSetScaleInRules, + VirtualMachineScaleSetSkuScaleType, + VirtualMachineSizeTypes, + VmDiskTypes, + WindowsPatchAssessmentMode, + WindowsVMGuestPatchMode, +) 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__ = [ @@ -675,5 +686,5 @@ "WindowsPatchAssessmentMode", "WindowsVMGuestPatchMode", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_03_01/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_03_01/models/_models_py3.py index 70db473ad42c5..375dce6992429 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_03_01/models/_models_py3.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_03_01/models/_models_py3.py @@ -1,5 +1,5 @@ -# 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. @@ -16,10 +16,9 @@ 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 if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object @@ -482,7 +481,7 @@ def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kw self.tags = tags -class AvailabilitySet(Resource): # pylint: disable=too-many-instance-attributes +class AvailabilitySet(Resource): """Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see `Availability sets @@ -1298,7 +1297,7 @@ def __init__( self.secrets = secrets -class CloudServiceProperties(_serialization.Model): # pylint: disable=too-many-instance-attributes +class CloudServiceProperties(_serialization.Model): """Cloud service properties. Variables are only populated by the server, and will be ignored when sending a request. @@ -1827,7 +1826,7 @@ def __init__(self, **kwargs: Any) -> None: self.provider = None -class DataDisk(_serialization.Model): # pylint: disable=too-many-instance-attributes +class DataDisk(_serialization.Model): """Describes a data disk. Variables are only populated by the server, and will be ignored when sending a request. @@ -2038,7 +2037,7 @@ def __init__(self, **kwargs: Any) -> None: self.lun = None -class DedicatedHost(Resource): # pylint: disable=too-many-instance-attributes +class DedicatedHost(Resource): """Specifies information about the Dedicated host. Variables are only populated by the server, and will be ignored when sending a request. @@ -3887,7 +3886,7 @@ def __init__(self, *, secret_url: str, source_vault: "_models.SubResource", **kw self.source_vault = source_vault -class LastPatchInstallationSummary(_serialization.Model): # pylint: disable=too-many-instance-attributes +class LastPatchInstallationSummary(_serialization.Model): """Describes the properties of the last installed patch summary. Variables are only populated by the server, and will be ignored when sending a request. @@ -4757,7 +4756,7 @@ def __init__(self, **kwargs: Any) -> None: self.service_state = None -class OSDisk(_serialization.Model): # pylint: disable=too-many-instance-attributes +class OSDisk(_serialization.Model): """Specifies information about the operating system disk used by the virtual machine. :code:`
`:code:`
` For more information about disks, see `About disks and VHDs for Azure virtual machines `_. @@ -8434,7 +8433,7 @@ def __init__(self, *, uri: Optional[str] = None, **kwargs: Any) -> None: self.uri = uri -class VirtualMachine(Resource): # pylint: disable=too-many-instance-attributes +class VirtualMachine(Resource): """Describes a Virtual Machine. Variables are only populated by the server, and will be ignored when sending a request. @@ -8990,7 +8989,7 @@ def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylin self.resources = None -class VirtualMachineExtension(Resource): # pylint: disable=too-many-instance-attributes +class VirtualMachineExtension(Resource): """Describes a Virtual Machine Extension. Variables are only populated by the server, and will be ignored when sending a request. @@ -9562,7 +9561,7 @@ def __init__( self.extended_location = extended_location -class VirtualMachineImage(VirtualMachineImageResource): # pylint: disable=too-many-instance-attributes +class VirtualMachineImage(VirtualMachineImageResource): """Describes a Virtual Machine Image. All required parameters must be populated in order to send to server. @@ -9772,7 +9771,7 @@ def __init__( self.linux_parameters = linux_parameters -class VirtualMachineInstallPatchesResult(_serialization.Model): # pylint: disable=too-many-instance-attributes +class VirtualMachineInstallPatchesResult(_serialization.Model): """The result summary of an installation operation. Variables are only populated by the server, and will be ignored when sending a request. @@ -9862,7 +9861,7 @@ def __init__(self, **kwargs: Any) -> None: self.error = None -class VirtualMachineInstanceView(_serialization.Model): # pylint: disable=too-many-instance-attributes +class VirtualMachineInstanceView(_serialization.Model): """The instance view of a virtual machine. Variables are only populated by the server, and will be ignored when sending a request. @@ -10525,7 +10524,7 @@ def __init__(self, *, temp_disk: Optional[bool] = None, **kwargs: Any) -> None: self.temp_disk = temp_disk -class VirtualMachineRunCommand(Resource): # pylint: disable=too-many-instance-attributes +class VirtualMachineRunCommand(Resource): """Describes a Virtual Machine run command. Variables are only populated by the server, and will be ignored when sending a request. @@ -10808,7 +10807,7 @@ def __init__( self.next_link = next_link -class VirtualMachineRunCommandUpdate(UpdateResource): # pylint: disable=too-many-instance-attributes +class VirtualMachineRunCommandUpdate(UpdateResource): """Describes a Virtual Machine run command. Variables are only populated by the server, and will be ignored when sending a request. @@ -10921,7 +10920,7 @@ def __init__( self.instance_view = None -class VirtualMachineScaleSet(Resource): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSet(Resource): """Describes a Virtual Machine Scale Set. Variables are only populated by the server, and will be ignored when sending a request. @@ -11271,7 +11270,7 @@ def __init__( self.disk_m_bps_read_write = disk_m_bps_read_write -class VirtualMachineScaleSetExtension(SubResourceReadOnly): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetExtension(SubResourceReadOnly): """Describes a Virtual Machine Scale Set Extension. Variables are only populated by the server, and will be ignored when sending a request. @@ -11468,7 +11467,7 @@ def __init__( self.extensions_time_budget = extensions_time_budget -class VirtualMachineScaleSetExtensionUpdate(SubResourceReadOnly): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetExtensionUpdate(SubResourceReadOnly): """Describes a Virtual Machine Scale Set Extension. Variables are only populated by the server, and will be ignored when sending a request. @@ -12842,7 +12841,7 @@ def __init__( self.data_disks = data_disks -class VirtualMachineScaleSetUpdate(UpdateResource): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetUpdate(UpdateResource): """Describes a Virtual Machine Scale Set. :ivar tags: Resource tags. @@ -13572,7 +13571,7 @@ def __init__( self.user_data = user_data -class VirtualMachineScaleSetVM(Resource): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetVM(Resource): """Describes a virtual machine scale set virtual machine. Variables are only populated by the server, and will be ignored when sending a request. @@ -13825,7 +13824,7 @@ def __init__( # pylint: disable=too-many-locals self.user_data = user_data -class VirtualMachineScaleSetVMExtension(SubResourceReadOnly): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetVMExtension(SubResourceReadOnly): """Describes a VMSS VM Extension. Variables are only populated by the server, and will be ignored when sending a request. @@ -13996,7 +13995,7 @@ def __init__(self, **kwargs: Any) -> None: self.statuses_summary = None -class VirtualMachineScaleSetVMExtensionUpdate(SubResourceReadOnly): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetVMExtensionUpdate(SubResourceReadOnly): """Describes a VMSS VM Extension. Variables are only populated by the server, and will be ignored when sending a request. @@ -14151,7 +14150,7 @@ def __init__(self, *, instance_ids: List[str], **kwargs: Any) -> None: self.instance_ids = instance_ids -class VirtualMachineScaleSetVMInstanceView(_serialization.Model): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetVMInstanceView(_serialization.Model): """The instance view of a virtual machine scale set VM. Variables are only populated by the server, and will be ignored when sending a request. @@ -14335,7 +14334,7 @@ def __init__( self.network_interface_configurations = network_interface_configurations -class VirtualMachineScaleSetVMProfile(_serialization.Model): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetVMProfile(_serialization.Model): """Describes a virtual machine scale set virtual machine profile. :ivar os_profile: Specifies the operating system settings for the virtual machines in the scale @@ -14723,7 +14722,7 @@ def __init__(self, **kwargs: Any) -> None: self.count = None -class VirtualMachineUpdate(UpdateResource): # pylint: disable=too-many-instance-attributes +class VirtualMachineUpdate(UpdateResource): """Describes a Virtual Machine Update. Variables are only populated by the server, and will be ignored when sending a request. diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_03_01/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_03_01/operations/__init__.py index 5dd95643cf370..b836deaddfd46 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_03_01/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_03_01/operations/__init__.py @@ -5,39 +5,45 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._operations import CloudServiceRoleInstancesOperations -from ._operations import CloudServiceRolesOperations -from ._operations import CloudServicesOperations -from ._operations import CloudServicesUpdateDomainOperations -from ._operations import CloudServiceOperatingSystemsOperations -from ._operations import Operations -from ._operations import AvailabilitySetsOperations -from ._operations import ProximityPlacementGroupsOperations -from ._operations import DedicatedHostGroupsOperations -from ._operations import DedicatedHostsOperations -from ._operations import SshPublicKeysOperations -from ._operations import VirtualMachineExtensionImagesOperations -from ._operations import VirtualMachineExtensionsOperations -from ._operations import VirtualMachineImagesOperations -from ._operations import VirtualMachineImagesEdgeZoneOperations -from ._operations import UsageOperations -from ._operations import VirtualMachinesOperations -from ._operations import VirtualMachineScaleSetsOperations -from ._operations import VirtualMachineSizesOperations -from ._operations import ImagesOperations -from ._operations import RestorePointCollectionsOperations -from ._operations import RestorePointsOperations -from ._operations import VirtualMachineScaleSetExtensionsOperations -from ._operations import VirtualMachineScaleSetRollingUpgradesOperations -from ._operations import VirtualMachineScaleSetVMExtensionsOperations -from ._operations import VirtualMachineScaleSetVMsOperations -from ._operations import LogAnalyticsOperations -from ._operations import VirtualMachineRunCommandsOperations -from ._operations import VirtualMachineScaleSetVMRunCommandsOperations +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._operations import CloudServiceRoleInstancesOperations # type: ignore +from ._operations import CloudServiceRolesOperations # type: ignore +from ._operations import CloudServicesOperations # type: ignore +from ._operations import CloudServicesUpdateDomainOperations # type: ignore +from ._operations import CloudServiceOperatingSystemsOperations # type: ignore +from ._operations import Operations # type: ignore +from ._operations import AvailabilitySetsOperations # type: ignore +from ._operations import ProximityPlacementGroupsOperations # type: ignore +from ._operations import DedicatedHostGroupsOperations # type: ignore +from ._operations import DedicatedHostsOperations # type: ignore +from ._operations import SshPublicKeysOperations # type: ignore +from ._operations import VirtualMachineExtensionImagesOperations # type: ignore +from ._operations import VirtualMachineExtensionsOperations # type: ignore +from ._operations import VirtualMachineImagesOperations # type: ignore +from ._operations import VirtualMachineImagesEdgeZoneOperations # type: ignore +from ._operations import UsageOperations # type: ignore +from ._operations import VirtualMachinesOperations # type: ignore +from ._operations import VirtualMachineScaleSetsOperations # type: ignore +from ._operations import VirtualMachineSizesOperations # type: ignore +from ._operations import ImagesOperations # type: ignore +from ._operations import RestorePointCollectionsOperations # type: ignore +from ._operations import RestorePointsOperations # type: ignore +from ._operations import VirtualMachineScaleSetExtensionsOperations # type: ignore +from ._operations import VirtualMachineScaleSetRollingUpgradesOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMExtensionsOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMsOperations # type: ignore +from ._operations import LogAnalyticsOperations # type: ignore +from ._operations import VirtualMachineRunCommandsOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMRunCommandsOperations # 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__ = [ @@ -71,5 +77,5 @@ "VirtualMachineRunCommandsOperations", "VirtualMachineScaleSetVMRunCommandsOperations", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_03_01/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_03_01/operations/_operations.py index 11c110a69deaf..be52cbc9d267e 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_03_01/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_03_01/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. @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Iterable, Iterator, List, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Iterable, Iterator, List, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -36,7 +36,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, HttpResponse], T, Dict[str, Any]], Any]] @@ -6200,7 +6200,7 @@ def __init__(self, *args, **kwargs): def _delete_initial( self, role_instance_name: str, resource_group_name: str, cloud_service_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6330,7 +6330,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_03_01.models.RoleInstance :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6390,7 +6390,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2021_03_01.models.RoleInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6463,7 +6463,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.RoleInstanceListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6529,7 +6529,7 @@ def get_next(next_link=None): def _restart_initial( self, role_instance_name: str, resource_group_name: str, cloud_service_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6638,7 +6638,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _reimage_initial( self, role_instance_name: str, resource_group_name: str, cloud_service_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6747,7 +6747,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _rebuild_initial( self, role_instance_name: str, resource_group_name: str, cloud_service_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6870,7 +6870,7 @@ def get_remote_desktop_file( :rtype: Iterator[bytes] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6955,7 +6955,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_03_01.models.CloudServiceRole :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7019,7 +7019,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.CloudServiceRoleListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7109,7 +7109,7 @@ def _create_or_update_initial( parameters: Optional[Union[_models.CloudService, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7304,7 +7304,7 @@ def _update_initial( parameters: Optional[Union[_models.CloudServiceUpdate, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7490,7 +7490,7 @@ def get_long_running_output(pipeline_response): ) def _delete_initial(self, resource_group_name: str, cloud_service_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7601,7 +7601,7 @@ def get(self, resource_group_name: str, cloud_service_name: str, **kwargs: Any) :rtype: ~azure.mgmt.compute.v2021_03_01.models.CloudService :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7657,7 +7657,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2021_03_01.models.CloudServiceInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7715,7 +7715,7 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.CloudService"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.CloudServiceListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7793,7 +7793,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Clo api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.CloudServiceListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7855,7 +7855,7 @@ def get_next(next_link=None): return ItemPaged(get_next, extract_data) def _start_initial(self, resource_group_name: str, cloud_service_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7955,7 +7955,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _power_off_initial(self, resource_group_name: str, cloud_service_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8062,7 +8062,7 @@ def _restart_initial( parameters: Optional[Union[_models.RoleInstances, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8247,7 +8247,7 @@ def _reimage_initial( parameters: Optional[Union[_models.RoleInstances, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8435,7 +8435,7 @@ def _rebuild_initial( parameters: Optional[Union[_models.RoleInstances, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8626,7 +8626,7 @@ def _delete_instances_initial( parameters: Optional[Union[_models.RoleInstances, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8833,7 +8833,7 @@ def _walk_update_domain_initial( parameters: Optional[Union[_models.UpdateDomain, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9048,7 +9048,7 @@ def get_update_domain( :rtype: ~azure.mgmt.compute.v2021_03_01.models.UpdateDomain :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9111,7 +9111,7 @@ def list_update_domains( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.UpdateDomainListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9207,7 +9207,7 @@ def get_os_version(self, location: str, os_version_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.compute.v2021_03_01.models.OSVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9267,7 +9267,7 @@ def list_os_versions(self, location: str, **kwargs: Any) -> Iterable["_models.OS api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.OSVersionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9341,7 +9341,7 @@ def get_os_family(self, location: str, os_family_name: str, **kwargs: Any) -> _m :rtype: ~azure.mgmt.compute.v2021_03_01.models.OSFamily :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9401,7 +9401,7 @@ def list_os_families(self, location: str, **kwargs: Any) -> Iterable["_models.OS api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.OSFamilyListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9499,7 +9499,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.ComputeOperationValue"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.ComputeOperationListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9652,7 +9652,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2021_03_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9779,7 +9779,7 @@ def update( :rtype: ~azure.mgmt.compute.v2021_03_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9847,7 +9847,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9897,7 +9897,7 @@ def get(self, resource_group_name: str, availability_set_name: str, **kwargs: An :rtype: ~azure.mgmt.compute.v2021_03_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9958,7 +9958,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10035,7 +10035,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Ava api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10117,7 +10117,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10275,7 +10275,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2021_03_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10405,7 +10405,7 @@ def update( :rtype: ~azure.mgmt.compute.v2021_03_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10473,7 +10473,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10533,7 +10533,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_03_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10592,7 +10592,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.ProximityPlac api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10672,7 +10672,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10833,7 +10833,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2021_03_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10960,7 +10960,7 @@ def update( :rtype: ~azure.mgmt.compute.v2021_03_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11028,7 +11028,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11090,7 +11090,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_03_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11150,7 +11150,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11226,7 +11226,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.DedicatedHost api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11315,7 +11315,7 @@ def _create_or_update_initial( parameters: Union[_models.DedicatedHost, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11516,7 +11516,7 @@ def _update_initial( parameters: Union[_models.DedicatedHostUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11712,7 +11712,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11843,7 +11843,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_03_01.models.DedicatedHost :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11908,7 +11908,7 @@ def list_by_host_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.DedicatedHostListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12008,7 +12008,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.SshPublicKeyR api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12089,7 +12089,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12223,7 +12223,7 @@ def create( :rtype: ~azure.mgmt.compute.v2021_03_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12351,7 +12351,7 @@ def update( :rtype: ~azure.mgmt.compute.v2021_03_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12419,7 +12419,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12469,7 +12469,7 @@ def get(self, resource_group_name: str, ssh_public_key_name: str, **kwargs: Any) :rtype: ~azure.mgmt.compute.v2021_03_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12527,7 +12527,7 @@ def generate_key_pair( :rtype: ~azure.mgmt.compute.v2021_03_01.models.SshPublicKeyGenerateKeyPairResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12608,7 +12608,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_03_01.models.VirtualMachineExtensionImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12666,7 +12666,7 @@ def list_types( :rtype: list[~azure.mgmt.compute.v2021_03_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12738,7 +12738,7 @@ def list_versions( :rtype: list[~azure.mgmt.compute.v2021_03_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12813,7 +12813,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineExtension, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13023,7 +13023,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineExtensionUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13229,7 +13229,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_name: str, vm_extension_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13359,7 +13359,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_03_01.models.VirtualMachineExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13419,7 +13419,7 @@ def list( :rtype: ~azure.mgmt.compute.v2021_03_01.models.VirtualMachineExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13503,7 +13503,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_03_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13582,7 +13582,7 @@ def list( :rtype: list[~azure.mgmt.compute.v2021_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13643,7 +13643,7 @@ def list_offers( :rtype: list[~azure.mgmt.compute.v2021_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13695,7 +13695,7 @@ def list_publishers(self, location: str, **kwargs: Any) -> List[_models.VirtualM :rtype: list[~azure.mgmt.compute.v2021_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13752,7 +13752,7 @@ def list_skus( :rtype: list[~azure.mgmt.compute.v2021_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13838,7 +13838,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_03_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13924,7 +13924,7 @@ def list( :rtype: list[~azure.mgmt.compute.v2021_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13990,7 +13990,7 @@ def list_offers( :rtype: list[~azure.mgmt.compute.v2021_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14048,7 +14048,7 @@ def list_publishers( :rtype: list[~azure.mgmt.compute.v2021_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14110,7 +14110,7 @@ def list_skus( :rtype: list[~azure.mgmt.compute.v2021_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14193,7 +14193,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.Usage"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.ListUsagesResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14292,7 +14292,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> Iterable["_models.Vi api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14360,7 +14360,7 @@ def _capture_initial( parameters: Union[_models.VirtualMachineCaptureParameters, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14558,7 +14558,7 @@ def _create_or_update_initial( parameters: Union[_models.VirtualMachine, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14750,7 +14750,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14935,7 +14935,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_name: str, *, force_deletion: Optional[bool] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15066,7 +15066,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_03_01.models.VirtualMachine :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15123,7 +15123,7 @@ def instance_view( :rtype: ~azure.mgmt.compute.v2021_03_01.models.VirtualMachineInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15168,7 +15168,7 @@ def instance_view( def _convert_to_managed_disks_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15269,7 +15269,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _deallocate_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15388,7 +15388,7 @@ def generalize( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15443,7 +15443,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Vir api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15522,7 +15522,7 @@ def list_all(self, *, status_only: Optional[str] = None, **kwargs: Any) -> Itera api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15604,7 +15604,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15669,7 +15669,7 @@ def get_next(next_link=None): def _power_off_initial( self, resource_group_name: str, vm_name: str, *, skip_shutdown: bool = False, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15778,7 +15778,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _reapply_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15879,7 +15879,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _restart_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15979,7 +15979,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _start_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16079,7 +16079,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _redeploy_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16185,7 +16185,7 @@ def _reimage_initial( parameters: Optional[Union[_models.VirtualMachineReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16390,7 +16390,7 @@ def retrieve_boot_diagnostics_data( :rtype: ~azure.mgmt.compute.v2021_03_01.models.RetrieveBootDiagnosticsDataResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16435,7 +16435,7 @@ def retrieve_boot_diagnostics_data( return deserialized # type: ignore def _perform_maintenance_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16548,7 +16548,7 @@ def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16587,7 +16587,7 @@ def simulate_eviction( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore def _assess_patches_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16704,7 +16704,7 @@ def _install_patches_initial( install_patches_input: Union[_models.VirtualMachineInstallPatchesParameters, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16903,7 +16903,7 @@ def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17127,7 +17127,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> Iterable["_models.Vi api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17196,7 +17196,7 @@ def _create_or_update_initial( parameters: Union[_models.VirtualMachineScaleSet, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17388,7 +17388,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineScaleSetUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17577,7 +17577,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, *, force_deletion: Optional[bool] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17706,7 +17706,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_03_01.models.VirtualMachineScaleSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17756,7 +17756,7 @@ def _deallocate_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17953,7 +17953,7 @@ def _delete_instances_initial( force_deletion: Optional[bool] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18161,7 +18161,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2021_03_01.models.VirtualMachineScaleSetInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18221,7 +18221,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Vir api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18300,7 +18300,7 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.VirtualMachineScaleSet"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.VirtualMachineScaleSetListWithLinkResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18383,7 +18383,7 @@ def list_skus( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.VirtualMachineScaleSetListSkusResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18467,7 +18467,7 @@ def get_os_upgrade_history( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.VirtualMachineScaleSetListOSUpgradeHistory] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18538,7 +18538,7 @@ def _power_off_initial( skip_shutdown: bool = False, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18751,7 +18751,7 @@ def _restart_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18940,7 +18940,7 @@ def _start_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19129,7 +19129,7 @@ def _redeploy_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19321,7 +19321,7 @@ def _perform_maintenance_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19519,7 +19519,7 @@ def _update_instances_initial( vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19705,7 +19705,7 @@ def _reimage_initial( vm_scale_set_reimage_input: Optional[Union[_models.VirtualMachineScaleSetReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19898,7 +19898,7 @@ def _reimage_all_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20101,7 +20101,7 @@ def force_recovery_service_fabric_platform_update_domain_walk( # pylint: disabl :rtype: ~azure.mgmt.compute.v2021_03_01.models.RecoveryWalkResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20145,7 +20145,7 @@ def force_recovery_service_fabric_platform_update_domain_walk( # pylint: disabl return deserialized # type: ignore @overload - def convert_to_single_placement_group( # pylint: disable=inconsistent-return-statements + def convert_to_single_placement_group( self, resource_group_name: str, vm_scale_set_name: str, @@ -20173,7 +20173,7 @@ def convert_to_single_placement_group( # pylint: disable=inconsistent-return-st """ @overload - def convert_to_single_placement_group( # pylint: disable=inconsistent-return-statements + def convert_to_single_placement_group( self, resource_group_name: str, vm_scale_set_name: str, @@ -20223,7 +20223,7 @@ def convert_to_single_placement_group( # pylint: disable=inconsistent-return-st :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20280,7 +20280,7 @@ def _set_orchestration_service_state_initial( parameters: Union[_models.OrchestrationServiceStateInput, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20497,7 +20497,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.VirtualMachine api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20582,7 +20582,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, image_name: str, parameters: Union[_models.Image, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20764,7 +20764,7 @@ def _update_initial( parameters: Union[_models.ImageUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20944,7 +20944,7 @@ def get_long_running_output(pipeline_response): ) def _delete_initial(self, resource_group_name: str, image_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21059,7 +21059,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_03_01.models.Image :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21118,7 +21118,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21194,7 +21194,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Image"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21356,7 +21356,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2021_03_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21487,7 +21487,7 @@ def update( :rtype: ~azure.mgmt.compute.v2021_03_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21545,7 +21545,7 @@ def update( def _delete_initial( self, resource_group_name: str, restore_point_collection_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21672,7 +21672,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_03_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21734,7 +21734,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Res api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.RestorePointCollectionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21814,7 +21814,7 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.RestorePointCollection"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.RestorePointCollectionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21904,7 +21904,7 @@ def _create_initial( parameters: Union[_models.RestorePoint, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22104,7 +22104,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, restore_point_collection_name: str, restore_point_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22226,7 +22226,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_03_01.models.RestorePoint :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22299,7 +22299,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtension, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22510,7 +22510,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtensionUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22717,7 +22717,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, vmss_extension_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22847,7 +22847,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_03_01.models.VirtualMachineScaleSetExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22913,7 +22913,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.VirtualMachineScaleSetExtensionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22997,7 +22997,7 @@ def __init__(self, *args, **kwargs): self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") def _cancel_initial(self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23099,7 +23099,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_os_upgrade_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23205,7 +23205,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_extension_upgrade_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23322,7 +23322,7 @@ def get_latest( :rtype: ~azure.mgmt.compute.v2021_03_01.models.RollingUpgradeStatusInfo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23394,7 +23394,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetVMExtension, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23615,7 +23615,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetVMExtensionUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23831,7 +23831,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, vm_extension_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23968,7 +23968,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_03_01.models.VirtualMachineScaleSetVMExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24038,7 +24038,7 @@ def list( :rtype: ~azure.mgmt.compute.v2021_03_01.models.VirtualMachineScaleSetVMExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24116,7 +24116,7 @@ def _reimage_initial( ] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24315,7 +24315,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _reimage_all_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24424,7 +24424,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _deallocate_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24539,7 +24539,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineScaleSetVM, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24749,7 +24749,7 @@ def _delete_initial( force_deletion: Optional[bool] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24891,7 +24891,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_03_01.models.VirtualMachineScaleSetVM :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24951,7 +24951,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2021_03_01.models.VirtualMachineScaleSetVMInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25033,7 +25033,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.VirtualMachineScaleSetVMListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25107,7 +25107,7 @@ def _power_off_initial( skip_shutdown: bool = False, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25229,7 +25229,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _restart_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25337,7 +25337,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25445,7 +25445,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _redeploy_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25579,7 +25579,7 @@ def retrieve_boot_diagnostics_data( :rtype: ~azure.mgmt.compute.v2021_03_01.models.RetrieveBootDiagnosticsDataResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25627,7 +25627,7 @@ def retrieve_boot_diagnostics_data( def _perform_maintenance_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25748,7 +25748,7 @@ def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25795,7 +25795,7 @@ def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26014,7 +26014,7 @@ def __init__(self, *args, **kwargs): def _export_request_rate_by_interval_initial( self, location: str, parameters: Union[_models.RequestRateByIntervalInput, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26191,7 +26191,7 @@ def get_long_running_output(pipeline_response): def _export_throttled_requests_initial( self, location: str, parameters: Union[_models.ThrottledRequestsInput, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26401,7 +26401,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.RunCommandDocu api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.RunCommandListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26474,7 +26474,7 @@ def get(self, location: str, command_id: str, **kwargs: Any) -> _models.RunComma :rtype: ~azure.mgmt.compute.v2021_03_01.models.RunCommandDocument :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26524,7 +26524,7 @@ def _create_or_update_initial( run_command: Union[_models.VirtualMachineRunCommand, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26734,7 +26734,7 @@ def _update_initial( run_command: Union[_models.VirtualMachineRunCommandUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26940,7 +26940,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_name: str, run_command_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -27071,7 +27071,7 @@ def get_by_virtual_machine( :rtype: ~azure.mgmt.compute.v2021_03_01.models.VirtualMachineRunCommand :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -27140,7 +27140,7 @@ def list_by_virtual_machine( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.VirtualMachineRunCommandsListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -27234,7 +27234,7 @@ def _create_or_update_initial( run_command: Union[_models.VirtualMachineRunCommand, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -27453,7 +27453,7 @@ def _update_initial( run_command: Union[_models.VirtualMachineRunCommandUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -27667,7 +27667,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, run_command_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -27804,7 +27804,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_03_01.models.VirtualMachineRunCommand :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -27882,7 +27882,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01")) cls: ClsType[_models.VirtualMachineRunCommandsListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/__init__.py index 3b1b6244b2375..ab7c46e8991db 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/__init__.py @@ -5,15 +5,21 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._compute_management_client import ComputeManagementClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._compute_management_client import ComputeManagementClient # 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__ = [ "ComputeManagementClient", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/_compute_management_client.py index 57cfa2ace7b4f..a7f723af968cf 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/_compute_management_client.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/_compute_management_client.py @@ -53,11 +53,10 @@ ) if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class ComputeManagementClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes +class ComputeManagementClient: # pylint: disable=too-many-instance-attributes """Compute Client. :ivar operations: Operations operations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/_configuration.py index fd62180d002b1..7f8964a48c913 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/_configuration.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/_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 ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ComputeManagementClient. Note that all parameters used to create this instance are saved as instance diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/_version.py index d79b2760319c5..e5754a47ce68f 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "33.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/aio/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/aio/__init__.py index 0715f50185586..d3fd1ba93379a 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/aio/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/aio/__init__.py @@ -5,12 +5,18 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._compute_management_client import ComputeManagementClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._compute_management_client import ComputeManagementClient # 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__ = [ "ComputeManagementClient", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/aio/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/aio/_compute_management_client.py index eb4e2a09f9a6e..219d2b9661d75 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/aio/_compute_management_client.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/aio/_compute_management_client.py @@ -53,11 +53,10 @@ ) if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class ComputeManagementClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes +class ComputeManagementClient: # pylint: disable=too-many-instance-attributes """Compute Client. :ivar operations: Operations operations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/aio/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/aio/_configuration.py index 69fcab1a0a580..bb39f295a7c1d 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/aio/_configuration.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/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 ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ComputeManagementClient. Note that all parameters used to create this instance are saved as instance diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/aio/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/aio/operations/__init__.py index f689f391fda8b..9f05ca0896e8f 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/aio/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/aio/operations/__init__.py @@ -5,41 +5,47 @@ # Code generated by Microsoft (R) AutoRest 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 AvailabilitySetsOperations -from ._operations import ProximityPlacementGroupsOperations -from ._operations import DedicatedHostGroupsOperations -from ._operations import DedicatedHostsOperations -from ._operations import SshPublicKeysOperations -from ._operations import VirtualMachineExtensionImagesOperations -from ._operations import VirtualMachineExtensionsOperations -from ._operations import VirtualMachineImagesOperations -from ._operations import VirtualMachineImagesEdgeZoneOperations -from ._operations import UsageOperations -from ._operations import VirtualMachinesOperations -from ._operations import VirtualMachineScaleSetsOperations -from ._operations import VirtualMachineSizesOperations -from ._operations import ImagesOperations -from ._operations import RestorePointCollectionsOperations -from ._operations import RestorePointsOperations -from ._operations import CapacityReservationGroupsOperations -from ._operations import CapacityReservationsOperations -from ._operations import VirtualMachineScaleSetExtensionsOperations -from ._operations import VirtualMachineScaleSetRollingUpgradesOperations -from ._operations import VirtualMachineScaleSetVMExtensionsOperations -from ._operations import VirtualMachineScaleSetVMsOperations -from ._operations import LogAnalyticsOperations -from ._operations import VirtualMachineRunCommandsOperations -from ._operations import VirtualMachineScaleSetVMRunCommandsOperations -from ._operations import DisksOperations -from ._operations import SnapshotsOperations -from ._operations import DiskEncryptionSetsOperations -from ._operations import DiskAccessesOperations -from ._operations import DiskRestorePointOperations +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 AvailabilitySetsOperations # type: ignore +from ._operations import ProximityPlacementGroupsOperations # type: ignore +from ._operations import DedicatedHostGroupsOperations # type: ignore +from ._operations import DedicatedHostsOperations # type: ignore +from ._operations import SshPublicKeysOperations # type: ignore +from ._operations import VirtualMachineExtensionImagesOperations # type: ignore +from ._operations import VirtualMachineExtensionsOperations # type: ignore +from ._operations import VirtualMachineImagesOperations # type: ignore +from ._operations import VirtualMachineImagesEdgeZoneOperations # type: ignore +from ._operations import UsageOperations # type: ignore +from ._operations import VirtualMachinesOperations # type: ignore +from ._operations import VirtualMachineScaleSetsOperations # type: ignore +from ._operations import VirtualMachineSizesOperations # type: ignore +from ._operations import ImagesOperations # type: ignore +from ._operations import RestorePointCollectionsOperations # type: ignore +from ._operations import RestorePointsOperations # type: ignore +from ._operations import CapacityReservationGroupsOperations # type: ignore +from ._operations import CapacityReservationsOperations # type: ignore +from ._operations import VirtualMachineScaleSetExtensionsOperations # type: ignore +from ._operations import VirtualMachineScaleSetRollingUpgradesOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMExtensionsOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMsOperations # type: ignore +from ._operations import LogAnalyticsOperations # type: ignore +from ._operations import VirtualMachineRunCommandsOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMRunCommandsOperations # type: ignore +from ._operations import DisksOperations # type: ignore +from ._operations import SnapshotsOperations # type: ignore +from ._operations import DiskEncryptionSetsOperations # type: ignore +from ._operations import DiskAccessesOperations # type: ignore +from ._operations import DiskRestorePointOperations # 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__ = [ @@ -75,5 +81,5 @@ "DiskAccessesOperations", "DiskRestorePointOperations", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/aio/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/aio/operations/_operations.py index 56554e8fc6362..9bff6fb3137a9 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/aio/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/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. @@ -8,21 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import ( - Any, - AsyncIterable, - AsyncIterator, - Callable, - Dict, - IO, - List, - Optional, - Type, - TypeVar, - Union, - cast, - overload, -) +from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, List, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -260,7 +246,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]] @@ -301,7 +287,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.ComputeOperationValue"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.ComputeOperationListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -454,7 +440,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2021_04_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -581,7 +567,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2021_04_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -636,9 +622,7 @@ async def update( return deserialized # type: ignore @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, availability_set_name: str, **kwargs: Any - ) -> None: + async def delete(self, resource_group_name: str, availability_set_name: str, **kwargs: Any) -> None: """Delete an availability set. :param resource_group_name: The name of the resource group. Required. @@ -649,7 +633,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -699,7 +683,7 @@ async def get(self, resource_group_name: str, availability_set_name: str, **kwar :rtype: ~azure.mgmt.compute.v2021_04_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -761,7 +745,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -839,7 +823,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -922,7 +906,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1080,7 +1064,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2021_04_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1210,7 +1194,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2021_04_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1265,9 +1249,7 @@ async def update( return deserialized # type: ignore @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, proximity_placement_group_name: str, **kwargs: Any - ) -> None: + async def delete(self, resource_group_name: str, proximity_placement_group_name: str, **kwargs: Any) -> None: """Delete a proximity placement group. :param resource_group_name: The name of the resource group. Required. @@ -1278,7 +1260,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1338,7 +1320,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_04_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1397,7 +1379,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Proximit api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1477,7 +1459,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1638,7 +1620,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2021_04_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1765,7 +1747,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2021_04_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1820,9 +1802,7 @@ async def update( return deserialized # type: ignore @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, host_group_name: str, **kwargs: Any - ) -> None: + async def delete(self, resource_group_name: str, host_group_name: str, **kwargs: Any) -> None: """Delete a dedicated host group. :param resource_group_name: The name of the resource group. Required. @@ -1833,7 +1813,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1895,7 +1875,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_04_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1958,7 +1938,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2035,7 +2015,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Dedicate api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2124,7 +2104,7 @@ async def _create_or_update_initial( parameters: Union[_models.DedicatedHost, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2328,7 +2308,7 @@ async def _update_initial( parameters: Union[_models.DedicatedHostUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2527,7 +2507,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2658,7 +2638,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_04_01.models.DedicatedHost :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2724,7 +2704,7 @@ def list_by_host_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.DedicatedHostListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2824,7 +2804,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.SshPubli api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2905,7 +2885,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3039,7 +3019,7 @@ async def create( :rtype: ~azure.mgmt.compute.v2021_04_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3167,7 +3147,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2021_04_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3222,9 +3202,7 @@ async def update( return deserialized # type: ignore @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, ssh_public_key_name: str, **kwargs: Any - ) -> None: + async def delete(self, resource_group_name: str, ssh_public_key_name: str, **kwargs: Any) -> None: """Delete an SSH public key. :param resource_group_name: The name of the resource group. Required. @@ -3235,7 +3213,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3287,7 +3265,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_04_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3345,7 +3323,7 @@ async def generate_key_pair( :rtype: ~azure.mgmt.compute.v2021_04_01.models.SshPublicKeyGenerateKeyPairResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3426,7 +3404,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_04_01.models.VirtualMachineExtensionImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3484,7 +3462,7 @@ async def list_types( :rtype: list[~azure.mgmt.compute.v2021_04_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3556,7 +3534,7 @@ async def list_versions( :rtype: list[~azure.mgmt.compute.v2021_04_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3631,7 +3609,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineExtension, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3841,7 +3819,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineExtensionUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4047,7 +4025,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_name: str, vm_extension_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4177,7 +4155,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_04_01.models.VirtualMachineExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4237,7 +4215,7 @@ async def list( :rtype: ~azure.mgmt.compute.v2021_04_01.models.VirtualMachineExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4321,7 +4299,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_04_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4400,7 +4378,7 @@ async def list( :rtype: list[~azure.mgmt.compute.v2021_04_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4461,7 +4439,7 @@ async def list_offers( :rtype: list[~azure.mgmt.compute.v2021_04_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4513,7 +4491,7 @@ async def list_publishers(self, location: str, **kwargs: Any) -> List[_models.Vi :rtype: list[~azure.mgmt.compute.v2021_04_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4570,7 +4548,7 @@ async def list_skus( :rtype: list[~azure.mgmt.compute.v2021_04_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4656,7 +4634,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_04_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4741,7 +4719,7 @@ async def list( :rtype: list[~azure.mgmt.compute.v2021_04_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4806,7 +4784,7 @@ async def list_offers( :rtype: list[~azure.mgmt.compute.v2021_04_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4863,7 +4841,7 @@ async def list_publishers( :rtype: list[~azure.mgmt.compute.v2021_04_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4924,7 +4902,7 @@ async def list_skus( :rtype: list[~azure.mgmt.compute.v2021_04_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5006,7 +4984,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.Usage"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.ListUsagesResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5106,7 +5084,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> AsyncIterable["_mode api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5174,7 +5152,7 @@ async def _capture_initial( parameters: Union[_models.VirtualMachineCaptureParameters, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5372,7 +5350,7 @@ async def _create_or_update_initial( parameters: Union[_models.VirtualMachine, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5567,7 +5545,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5755,7 +5733,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_name: str, *, force_deletion: Optional[bool] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5886,7 +5864,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_04_01.models.VirtualMachine :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5943,7 +5921,7 @@ async def instance_view( :rtype: ~azure.mgmt.compute.v2021_04_01.models.VirtualMachineInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5988,7 +5966,7 @@ async def instance_view( async def _convert_to_managed_disks_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6091,7 +6069,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _deallocate_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6192,9 +6170,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace_async - async def generalize( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, vm_name: str, **kwargs: Any - ) -> None: + async def generalize(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> None: """Sets the OS state of the virtual machine to generalized. It is recommended to sysprep the virtual machine before performing this operation. :code:`
`For Windows, please refer to `Create a managed image of a generalized VM in Azure @@ -6210,7 +6186,7 @@ async def generalize( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6266,7 +6242,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6346,7 +6322,7 @@ def list_all(self, *, status_only: Optional[str] = None, **kwargs: Any) -> Async api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6429,7 +6405,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6494,7 +6470,7 @@ async def get_next(next_link=None): async def _power_off_initial( self, resource_group_name: str, vm_name: str, *, skip_shutdown: bool = False, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6603,7 +6579,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _reapply_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6703,7 +6679,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _restart_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6803,7 +6779,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _start_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6903,7 +6879,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _redeploy_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7009,7 +6985,7 @@ async def _reimage_initial( parameters: Optional[Union[_models.VirtualMachineReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7214,7 +7190,7 @@ async def retrieve_boot_diagnostics_data( :rtype: ~azure.mgmt.compute.v2021_04_01.models.RetrieveBootDiagnosticsDataResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7260,7 +7236,7 @@ async def retrieve_boot_diagnostics_data( async def _perform_maintenance_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7362,9 +7338,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace_async - async def simulate_eviction( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, vm_name: str, **kwargs: Any - ) -> None: + async def simulate_eviction(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> None: """The operation to simulate the eviction of spot virtual machine. :param resource_group_name: The name of the resource group. Required. @@ -7375,7 +7349,7 @@ async def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7416,7 +7390,7 @@ async def simulate_eviction( # pylint: disable=inconsistent-return-statements async def _assess_patches_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7532,7 +7506,7 @@ async def _install_patches_initial( install_patches_input: Union[_models.VirtualMachineInstallPatchesParameters, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7730,7 +7704,7 @@ async def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7957,7 +7931,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> AsyncIterable["_mode api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8025,7 +7999,7 @@ async def _create_or_update_initial( parameters: Union[_models.VirtualMachineScaleSet, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8217,7 +8191,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineScaleSetUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8406,7 +8380,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, *, force_deletion: Optional[bool] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8535,7 +8509,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_04_01.models.VirtualMachineScaleSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8585,7 +8559,7 @@ async def _deallocate_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8782,7 +8756,7 @@ async def _delete_instances_initial( force_deletion: Optional[bool] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8990,7 +8964,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2021_04_01.models.VirtualMachineScaleSetInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9050,7 +9024,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9129,7 +9103,7 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.VirtualMachineScaleS api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.VirtualMachineScaleSetListWithLinkResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9212,7 +9186,7 @@ def list_skus( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.VirtualMachineScaleSetListSkusResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9278,6 +9252,7 @@ async def get_next(next_link=None): def get_os_upgrade_history( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> AsyncIterable["_models.UpgradeOperationHistoricalStatusInfo"]: + # pylint: disable=line-too-long """Gets list of OS upgrades on a VM scale set instance. :param resource_group_name: The name of the resource group. Required. @@ -9296,7 +9271,7 @@ def get_os_upgrade_history( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.VirtualMachineScaleSetListOSUpgradeHistory] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9367,7 +9342,7 @@ async def _power_off_initial( skip_shutdown: bool = False, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9580,7 +9555,7 @@ async def _restart_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9769,7 +9744,7 @@ async def _start_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9958,7 +9933,7 @@ async def _redeploy_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10150,7 +10125,7 @@ async def _perform_maintenance_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10348,7 +10323,7 @@ async def _update_instances_initial( vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10534,7 +10509,7 @@ async def _reimage_initial( vm_scale_set_reimage_input: Optional[Union[_models.VirtualMachineScaleSetReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10727,7 +10702,7 @@ async def _reimage_all_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10930,7 +10905,7 @@ async def force_recovery_service_fabric_platform_update_domain_walk( # pylint: :rtype: ~azure.mgmt.compute.v2021_04_01.models.RecoveryWalkResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10974,7 +10949,7 @@ async def force_recovery_service_fabric_platform_update_domain_walk( # pylint: return deserialized # type: ignore @overload - async def convert_to_single_placement_group( # pylint: disable=inconsistent-return-statements + async def convert_to_single_placement_group( self, resource_group_name: str, vm_scale_set_name: str, @@ -11002,7 +10977,7 @@ async def convert_to_single_placement_group( # pylint: disable=inconsistent-ret """ @overload - async def convert_to_single_placement_group( # pylint: disable=inconsistent-return-statements + async def convert_to_single_placement_group( self, resource_group_name: str, vm_scale_set_name: str, @@ -11029,7 +11004,7 @@ async def convert_to_single_placement_group( # pylint: disable=inconsistent-ret """ @distributed_trace_async - async def convert_to_single_placement_group( # pylint: disable=inconsistent-return-statements + async def convert_to_single_placement_group( self, resource_group_name: str, vm_scale_set_name: str, @@ -11052,7 +11027,7 @@ async def convert_to_single_placement_group( # pylint: disable=inconsistent-ret :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11109,7 +11084,7 @@ async def _set_orchestration_service_state_initial( parameters: Union[_models.OrchestrationServiceStateInput, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11327,7 +11302,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.VirtualMa api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11412,7 +11387,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, image_name: str, parameters: Union[_models.Image, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11594,7 +11569,7 @@ async def _update_initial( parameters: Union[_models.ImageUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11774,7 +11749,7 @@ def get_long_running_output(pipeline_response): ) async def _delete_initial(self, resource_group_name: str, image_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11889,7 +11864,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_04_01.models.Image :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11948,7 +11923,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12024,7 +11999,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Image"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12186,7 +12161,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2021_04_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12316,7 +12291,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2021_04_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12373,7 +12348,7 @@ async def update( async def _delete_initial( self, resource_group_name: str, restore_point_collection_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12499,7 +12474,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_04_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12560,7 +12535,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.RestorePointCollectionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12639,7 +12614,7 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.RestorePointCollecti api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.RestorePointCollectionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12728,7 +12703,7 @@ async def _create_initial( parameters: Union[_models.RestorePoint, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12927,7 +12902,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, restore_point_collection_name: str, restore_point_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13048,7 +13023,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_04_01.models.RestorePoint :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13191,7 +13166,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2021_04_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13324,7 +13299,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2021_04_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13379,9 +13354,7 @@ async def update( return deserialized # type: ignore @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, capacity_reservation_group_name: str, **kwargs: Any - ) -> None: + async def delete(self, resource_group_name: str, capacity_reservation_group_name: str, **kwargs: Any) -> None: """The operation to delete a capacity reservation group. This operation is allowed only if all the associated resources are disassociated from the reservation group and all capacity reservations under the reservation group have also been deleted. Please refer to @@ -13395,7 +13368,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13459,7 +13432,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_04_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13533,7 +13506,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.CapacityReservationGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13620,7 +13593,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.CapacityReservationGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13710,7 +13683,7 @@ async def _create_or_update_initial( parameters: Union[_models.CapacityReservation, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13920,7 +13893,7 @@ async def _update_initial( parameters: Union[_models.CapacityReservationUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14123,7 +14096,7 @@ async def _delete_initial( capacity_reservation_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14261,7 +14234,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_04_01.models.CapacityReservation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14327,7 +14300,7 @@ def list_by_capacity_reservation_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.CapacityReservationListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14418,7 +14391,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtension, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14629,7 +14602,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtensionUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14836,7 +14809,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, vmss_extension_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14966,7 +14939,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_04_01.models.VirtualMachineScaleSetExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15032,7 +15005,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.VirtualMachineScaleSetExtensionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15118,7 +15091,7 @@ def __init__(self, *args, **kwargs) -> None: async def _cancel_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15222,7 +15195,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_os_upgrade_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15328,7 +15301,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_extension_upgrade_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15445,7 +15418,7 @@ async def get_latest( :rtype: ~azure.mgmt.compute.v2021_04_01.models.RollingUpgradeStatusInfo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15517,7 +15490,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetVMExtension, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15737,7 +15710,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetVMExtensionUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15952,7 +15925,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, vm_extension_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16088,7 +16061,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_04_01.models.VirtualMachineScaleSetVMExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16157,7 +16130,7 @@ async def list( :rtype: ~azure.mgmt.compute.v2021_04_01.models.VirtualMachineScaleSetVMExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16234,7 +16207,7 @@ async def _reimage_initial( ] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16433,7 +16406,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _reimage_all_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16542,7 +16515,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _deallocate_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16657,7 +16630,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineScaleSetVM, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16867,7 +16840,7 @@ async def _delete_initial( force_deletion: Optional[bool] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17009,7 +16982,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_04_01.models.VirtualMachineScaleSetVM :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17069,7 +17042,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2021_04_01.models.VirtualMachineScaleSetVMInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17151,7 +17124,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.VirtualMachineScaleSetVMListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17225,7 +17198,7 @@ async def _power_off_initial( skip_shutdown: bool = False, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17347,7 +17320,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _restart_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17455,7 +17428,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17563,7 +17536,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _redeploy_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17697,7 +17670,7 @@ async def retrieve_boot_diagnostics_data( :rtype: ~azure.mgmt.compute.v2021_04_01.models.RetrieveBootDiagnosticsDataResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17744,7 +17717,7 @@ async def retrieve_boot_diagnostics_data( async def _perform_maintenance_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17850,7 +17823,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace_async - async def simulate_eviction( # pylint: disable=inconsistent-return-statements + async def simulate_eviction( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: """The operation to simulate the eviction of spot virtual machine in a VM scale set. @@ -17865,7 +17838,7 @@ async def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17912,7 +17885,7 @@ async def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18134,7 +18107,7 @@ def __init__(self, *args, **kwargs) -> None: async def _export_request_rate_by_interval_initial( self, location: str, parameters: Union[_models.RequestRateByIntervalInput, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18312,7 +18285,7 @@ def get_long_running_output(pipeline_response): async def _export_throttled_requests_initial( self, location: str, parameters: Union[_models.ThrottledRequestsInput, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18523,7 +18496,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.RunComman api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.RunCommandListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18596,7 +18569,7 @@ async def get(self, location: str, command_id: str, **kwargs: Any) -> _models.Ru :rtype: ~azure.mgmt.compute.v2021_04_01.models.RunCommandDocument :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18646,7 +18619,7 @@ async def _create_or_update_initial( run_command: Union[_models.VirtualMachineRunCommand, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18855,7 +18828,7 @@ async def _update_initial( run_command: Union[_models.VirtualMachineRunCommandUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19060,7 +19033,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_name: str, run_command_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19190,7 +19163,7 @@ async def get_by_virtual_machine( :rtype: ~azure.mgmt.compute.v2021_04_01.models.VirtualMachineRunCommand :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19258,7 +19231,7 @@ def list_by_virtual_machine( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.VirtualMachineRunCommandsListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19351,7 +19324,7 @@ async def _create_or_update_initial( run_command: Union[_models.VirtualMachineRunCommand, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19569,7 +19542,7 @@ async def _update_initial( run_command: Union[_models.VirtualMachineRunCommandUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19782,7 +19755,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, run_command_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19918,7 +19891,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_04_01.models.VirtualMachineRunCommand :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19995,7 +19968,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.VirtualMachineRunCommandsListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20083,7 +20056,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.Disk, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20267,7 +20240,7 @@ def get_long_running_output(pipeline_response): async def _update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.DiskUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20462,7 +20435,7 @@ async def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.compute.v2021_04_01.models.Disk :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20505,7 +20478,7 @@ async def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> return deserialized # type: ignore async def _delete_initial(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20622,7 +20595,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20697,7 +20670,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Disk"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20764,7 +20737,7 @@ async def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20959,7 +20932,7 @@ def get_long_running_output(pipeline_response): async def _revoke_access_initial( self, resource_group_name: str, disk_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21088,7 +21061,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, snapshot_name: str, snapshot: Union[_models.Snapshot, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21279,7 +21252,7 @@ async def _update_initial( snapshot: Union[_models.SnapshotUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21483,7 +21456,7 @@ async def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) :rtype: ~azure.mgmt.compute.v2021_04_01.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21528,7 +21501,7 @@ async def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) async def _delete_initial( self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21646,7 +21619,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21722,7 +21695,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Snapshot"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21789,7 +21762,7 @@ async def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21984,7 +21957,7 @@ def get_long_running_output(pipeline_response): async def _revoke_access_initial( self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22117,7 +22090,7 @@ async def _create_or_update_initial( disk_encryption_set: Union[_models.DiskEncryptionSet, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22318,7 +22291,7 @@ async def _update_initial( disk_encryption_set: Union[_models.DiskEncryptionSetUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22529,7 +22502,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_04_01.models.DiskEncryptionSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22574,7 +22547,7 @@ async def get( async def _delete_initial( self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22696,7 +22669,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22772,7 +22745,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.DiskEncryptionSet"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22854,7 +22827,7 @@ def list_associated_resources( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.ResourceUriList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22944,7 +22917,7 @@ async def _create_or_update_initial( disk_access: Union[_models.DiskAccess, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23141,7 +23114,7 @@ async def _update_initial( disk_access: Union[_models.DiskAccessUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23345,7 +23318,7 @@ async def get(self, resource_group_name: str, disk_access_name: str, **kwargs: A :rtype: ~azure.mgmt.compute.v2021_04_01.models.DiskAccess :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23390,7 +23363,7 @@ async def get(self, resource_group_name: str, disk_access_name: str, **kwargs: A async def _delete_initial( self, resource_group_name: str, disk_access_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23510,7 +23483,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.DiskAccessList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23586,7 +23559,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.DiskAccess"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.DiskAccessList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23662,7 +23635,7 @@ async def get_private_link_resources( :rtype: ~azure.mgmt.compute.v2021_04_01.models.PrivateLinkResourceListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23712,7 +23685,7 @@ async def _update_a_private_endpoint_connection_initial( # pylint: disable=name private_endpoint_connection: Union[_models.PrivateEndpointConnection, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23940,7 +23913,7 @@ async def get_a_private_endpoint_connection( :rtype: ~azure.mgmt.compute.v2021_04_01.models.PrivateEndpointConnection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23986,7 +23959,7 @@ async def get_a_private_endpoint_connection( async def _delete_a_private_endpoint_connection_initial( # pylint: disable=name-too-long self, resource_group_name: str, disk_access_name: str, private_endpoint_connection_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24117,7 +24090,7 @@ def list_private_endpoint_connections( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.PrivateEndpointConnectionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24225,7 +24198,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_04_01.models.DiskRestorePoint :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24294,7 +24267,7 @@ def list_by_restore_point( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.DiskRestorePointList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24366,7 +24339,7 @@ async def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24588,7 +24561,7 @@ async def _revoke_access_initial( disk_restore_point_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/models/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/models/__init__.py index 1cf56f0cada17..1a65c04a38126 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/models/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/models/__init__.py @@ -5,364 +5,375 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._models_py3 import AccessUri -from ._models_py3 import AdditionalCapabilities -from ._models_py3 import AdditionalUnattendContent -from ._models_py3 import ApiEntityReference -from ._models_py3 import ApiError -from ._models_py3 import ApiErrorBase -from ._models_py3 import AutomaticOSUpgradePolicy -from ._models_py3 import AutomaticOSUpgradeProperties -from ._models_py3 import AutomaticRepairsPolicy -from ._models_py3 import AvailabilitySet -from ._models_py3 import AvailabilitySetListResult -from ._models_py3 import AvailabilitySetUpdate -from ._models_py3 import AvailablePatchSummary -from ._models_py3 import BillingProfile -from ._models_py3 import BootDiagnostics -from ._models_py3 import BootDiagnosticsInstanceView -from ._models_py3 import CapacityReservation -from ._models_py3 import CapacityReservationGroup -from ._models_py3 import CapacityReservationGroupInstanceView -from ._models_py3 import CapacityReservationGroupListResult -from ._models_py3 import CapacityReservationGroupUpdate -from ._models_py3 import CapacityReservationInstanceView -from ._models_py3 import CapacityReservationInstanceViewWithName -from ._models_py3 import CapacityReservationListResult -from ._models_py3 import CapacityReservationProfile -from ._models_py3 import CapacityReservationUpdate -from ._models_py3 import CapacityReservationUtilization -from ._models_py3 import ComputeOperationListResult -from ._models_py3 import ComputeOperationValue -from ._models_py3 import CreationData -from ._models_py3 import DataDisk -from ._models_py3 import DataDiskImage -from ._models_py3 import DedicatedHost -from ._models_py3 import DedicatedHostAllocatableVM -from ._models_py3 import DedicatedHostAvailableCapacity -from ._models_py3 import DedicatedHostGroup -from ._models_py3 import DedicatedHostGroupInstanceView -from ._models_py3 import DedicatedHostGroupListResult -from ._models_py3 import DedicatedHostGroupUpdate -from ._models_py3 import DedicatedHostInstanceView -from ._models_py3 import DedicatedHostInstanceViewWithName -from ._models_py3 import DedicatedHostListResult -from ._models_py3 import DedicatedHostUpdate -from ._models_py3 import DiagnosticsProfile -from ._models_py3 import DiffDiskSettings -from ._models_py3 import DisallowedConfiguration -from ._models_py3 import Disk -from ._models_py3 import DiskAccess -from ._models_py3 import DiskAccessList -from ._models_py3 import DiskAccessUpdate -from ._models_py3 import DiskEncryptionSet -from ._models_py3 import DiskEncryptionSetList -from ._models_py3 import DiskEncryptionSetParameters -from ._models_py3 import DiskEncryptionSetUpdate -from ._models_py3 import DiskEncryptionSettings -from ._models_py3 import DiskInstanceView -from ._models_py3 import DiskList -from ._models_py3 import DiskRestorePoint -from ._models_py3 import DiskRestorePointList -from ._models_py3 import DiskSecurityProfile -from ._models_py3 import DiskSku -from ._models_py3 import DiskUpdate -from ._models_py3 import Encryption -from ._models_py3 import EncryptionSetIdentity -from ._models_py3 import EncryptionSettingsCollection -from ._models_py3 import EncryptionSettingsElement -from ._models_py3 import ExtendedLocation -from ._models_py3 import GrantAccessData -from ._models_py3 import HardwareProfile -from ._models_py3 import Image -from ._models_py3 import ImageDataDisk -from ._models_py3 import ImageDisk -from ._models_py3 import ImageDiskReference -from ._models_py3 import ImageListResult -from ._models_py3 import ImageOSDisk -from ._models_py3 import ImageReference -from ._models_py3 import ImageStorageProfile -from ._models_py3 import ImageUpdate -from ._models_py3 import InnerError -from ._models_py3 import InstanceViewStatus -from ._models_py3 import KeyForDiskEncryptionSet -from ._models_py3 import KeyVaultAndKeyReference -from ._models_py3 import KeyVaultAndSecretReference -from ._models_py3 import KeyVaultKeyReference -from ._models_py3 import KeyVaultSecretReference -from ._models_py3 import LastPatchInstallationSummary -from ._models_py3 import LinuxConfiguration -from ._models_py3 import LinuxParameters -from ._models_py3 import LinuxPatchSettings -from ._models_py3 import ListUsagesResult -from ._models_py3 import LogAnalyticsInputBase -from ._models_py3 import LogAnalyticsOperationResult -from ._models_py3 import LogAnalyticsOutput -from ._models_py3 import MaintenanceRedeployStatus -from ._models_py3 import ManagedDiskParameters -from ._models_py3 import NetworkInterfaceReference -from ._models_py3 import NetworkProfile -from ._models_py3 import OSDisk -from ._models_py3 import OSDiskImage -from ._models_py3 import OSProfile -from ._models_py3 import OrchestrationServiceStateInput -from ._models_py3 import OrchestrationServiceSummary -from ._models_py3 import PatchInstallationDetail -from ._models_py3 import PatchSettings -from ._models_py3 import Plan -from ._models_py3 import PrivateEndpoint -from ._models_py3 import PrivateEndpointConnection -from ._models_py3 import PrivateEndpointConnectionListResult -from ._models_py3 import PrivateLinkResource -from ._models_py3 import PrivateLinkResourceListResult -from ._models_py3 import PrivateLinkServiceConnectionState -from ._models_py3 import PropertyUpdatesInProgress -from ._models_py3 import ProximityPlacementGroup -from ._models_py3 import ProximityPlacementGroupListResult -from ._models_py3 import ProximityPlacementGroupUpdate -from ._models_py3 import ProxyOnlyResource -from ._models_py3 import ProxyResource -from ._models_py3 import PublicIPAddressSku -from ._models_py3 import PurchasePlan -from ._models_py3 import PurchasePlanAutoGenerated -from ._models_py3 import RecoveryWalkResponse -from ._models_py3 import RequestRateByIntervalInput -from ._models_py3 import Resource -from ._models_py3 import ResourceUriList -from ._models_py3 import RestorePoint -from ._models_py3 import RestorePointCollection -from ._models_py3 import RestorePointCollectionListResult -from ._models_py3 import RestorePointCollectionSourceProperties -from ._models_py3 import RestorePointCollectionUpdate -from ._models_py3 import RestorePointSourceMetadata -from ._models_py3 import RestorePointSourceVMDataDisk -from ._models_py3 import RestorePointSourceVMOSDisk -from ._models_py3 import RestorePointSourceVMStorageProfile -from ._models_py3 import RetrieveBootDiagnosticsDataResult -from ._models_py3 import RollbackStatusInfo -from ._models_py3 import RollingUpgradePolicy -from ._models_py3 import RollingUpgradeProgressInfo -from ._models_py3 import RollingUpgradeRunningStatus -from ._models_py3 import RollingUpgradeStatusInfo -from ._models_py3 import RunCommandDocument -from ._models_py3 import RunCommandDocumentBase -from ._models_py3 import RunCommandInput -from ._models_py3 import RunCommandInputParameter -from ._models_py3 import RunCommandListResult -from ._models_py3 import RunCommandParameterDefinition -from ._models_py3 import RunCommandResult -from ._models_py3 import ScaleInPolicy -from ._models_py3 import ScheduledEventsProfile -from ._models_py3 import SecurityProfile -from ._models_py3 import ShareInfoElement -from ._models_py3 import Sku -from ._models_py3 import Snapshot -from ._models_py3 import SnapshotList -from ._models_py3 import SnapshotSku -from ._models_py3 import SnapshotUpdate -from ._models_py3 import SourceVault -from ._models_py3 import SpotRestorePolicy -from ._models_py3 import SshConfiguration -from ._models_py3 import SshPublicKey -from ._models_py3 import SshPublicKeyGenerateKeyPairResult -from ._models_py3 import SshPublicKeyResource -from ._models_py3 import SshPublicKeyUpdateResource -from ._models_py3 import SshPublicKeysGroupListResult -from ._models_py3 import StorageProfile -from ._models_py3 import SubResource -from ._models_py3 import SubResourceReadOnly -from ._models_py3 import SubResourceWithColocationStatus -from ._models_py3 import SupportedCapabilities -from ._models_py3 import TerminateNotificationProfile -from ._models_py3 import ThrottledRequestsInput -from ._models_py3 import UefiSettings -from ._models_py3 import UpdateResource -from ._models_py3 import UpgradeOperationHistoricalStatusInfo -from ._models_py3 import UpgradeOperationHistoricalStatusInfoProperties -from ._models_py3 import UpgradeOperationHistoryStatus -from ._models_py3 import UpgradePolicy -from ._models_py3 import Usage -from ._models_py3 import UsageName -from ._models_py3 import UserAssignedIdentitiesValue -from ._models_py3 import VMScaleSetConvertToSinglePlacementGroupInput -from ._models_py3 import VaultCertificate -from ._models_py3 import VaultSecretGroup -from ._models_py3 import VirtualHardDisk -from ._models_py3 import VirtualMachine -from ._models_py3 import VirtualMachineAgentInstanceView -from ._models_py3 import VirtualMachineAssessPatchesResult -from ._models_py3 import VirtualMachineCaptureParameters -from ._models_py3 import VirtualMachineCaptureResult -from ._models_py3 import VirtualMachineExtension -from ._models_py3 import VirtualMachineExtensionHandlerInstanceView -from ._models_py3 import VirtualMachineExtensionImage -from ._models_py3 import VirtualMachineExtensionInstanceView -from ._models_py3 import VirtualMachineExtensionUpdate -from ._models_py3 import VirtualMachineExtensionsListResult -from ._models_py3 import VirtualMachineHealthStatus -from ._models_py3 import VirtualMachineIdentity -from ._models_py3 import VirtualMachineImage -from ._models_py3 import VirtualMachineImageFeature -from ._models_py3 import VirtualMachineImageResource -from ._models_py3 import VirtualMachineInstallPatchesParameters -from ._models_py3 import VirtualMachineInstallPatchesResult -from ._models_py3 import VirtualMachineInstanceView -from ._models_py3 import VirtualMachineIpTag -from ._models_py3 import VirtualMachineListResult -from ._models_py3 import VirtualMachineNetworkInterfaceConfiguration -from ._models_py3 import VirtualMachineNetworkInterfaceDnsSettingsConfiguration -from ._models_py3 import VirtualMachineNetworkInterfaceIPConfiguration -from ._models_py3 import VirtualMachinePatchStatus -from ._models_py3 import VirtualMachinePublicIPAddressConfiguration -from ._models_py3 import VirtualMachinePublicIPAddressDnsSettingsConfiguration -from ._models_py3 import VirtualMachineReimageParameters -from ._models_py3 import VirtualMachineRunCommand -from ._models_py3 import VirtualMachineRunCommandInstanceView -from ._models_py3 import VirtualMachineRunCommandScriptSource -from ._models_py3 import VirtualMachineRunCommandUpdate -from ._models_py3 import VirtualMachineRunCommandsListResult -from ._models_py3 import VirtualMachineScaleSet -from ._models_py3 import VirtualMachineScaleSetDataDisk -from ._models_py3 import VirtualMachineScaleSetExtension -from ._models_py3 import VirtualMachineScaleSetExtensionListResult -from ._models_py3 import VirtualMachineScaleSetExtensionProfile -from ._models_py3 import VirtualMachineScaleSetExtensionUpdate -from ._models_py3 import VirtualMachineScaleSetIPConfiguration -from ._models_py3 import VirtualMachineScaleSetIdentity -from ._models_py3 import VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue -from ._models_py3 import VirtualMachineScaleSetInstanceView -from ._models_py3 import VirtualMachineScaleSetInstanceViewStatusesSummary -from ._models_py3 import VirtualMachineScaleSetIpTag -from ._models_py3 import VirtualMachineScaleSetListOSUpgradeHistory -from ._models_py3 import VirtualMachineScaleSetListResult -from ._models_py3 import VirtualMachineScaleSetListSkusResult -from ._models_py3 import VirtualMachineScaleSetListWithLinkResult -from ._models_py3 import VirtualMachineScaleSetManagedDiskParameters -from ._models_py3 import VirtualMachineScaleSetNetworkConfiguration -from ._models_py3 import VirtualMachineScaleSetNetworkConfigurationDnsSettings -from ._models_py3 import VirtualMachineScaleSetNetworkProfile -from ._models_py3 import VirtualMachineScaleSetOSDisk -from ._models_py3 import VirtualMachineScaleSetOSProfile -from ._models_py3 import VirtualMachineScaleSetPublicIPAddressConfiguration -from ._models_py3 import VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings -from ._models_py3 import VirtualMachineScaleSetReimageParameters -from ._models_py3 import VirtualMachineScaleSetSku -from ._models_py3 import VirtualMachineScaleSetSkuCapacity -from ._models_py3 import VirtualMachineScaleSetStorageProfile -from ._models_py3 import VirtualMachineScaleSetUpdate -from ._models_py3 import VirtualMachineScaleSetUpdateIPConfiguration -from ._models_py3 import VirtualMachineScaleSetUpdateNetworkConfiguration -from ._models_py3 import VirtualMachineScaleSetUpdateNetworkProfile -from ._models_py3 import VirtualMachineScaleSetUpdateOSDisk -from ._models_py3 import VirtualMachineScaleSetUpdateOSProfile -from ._models_py3 import VirtualMachineScaleSetUpdatePublicIPAddressConfiguration -from ._models_py3 import VirtualMachineScaleSetUpdateStorageProfile -from ._models_py3 import VirtualMachineScaleSetUpdateVMProfile -from ._models_py3 import VirtualMachineScaleSetVM -from ._models_py3 import VirtualMachineScaleSetVMExtension -from ._models_py3 import VirtualMachineScaleSetVMExtensionUpdate -from ._models_py3 import VirtualMachineScaleSetVMExtensionsListResult -from ._models_py3 import VirtualMachineScaleSetVMExtensionsSummary -from ._models_py3 import VirtualMachineScaleSetVMInstanceIDs -from ._models_py3 import VirtualMachineScaleSetVMInstanceRequiredIDs -from ._models_py3 import VirtualMachineScaleSetVMInstanceView -from ._models_py3 import VirtualMachineScaleSetVMListResult -from ._models_py3 import VirtualMachineScaleSetVMNetworkProfileConfiguration -from ._models_py3 import VirtualMachineScaleSetVMProfile -from ._models_py3 import VirtualMachineScaleSetVMProtectionPolicy -from ._models_py3 import VirtualMachineScaleSetVMReimageParameters -from ._models_py3 import VirtualMachineSize -from ._models_py3 import VirtualMachineSizeListResult -from ._models_py3 import VirtualMachineSoftwarePatchProperties -from ._models_py3 import VirtualMachineStatusCodeCount -from ._models_py3 import VirtualMachineUpdate -from ._models_py3 import WinRMConfiguration -from ._models_py3 import WinRMListener -from ._models_py3 import WindowsConfiguration -from ._models_py3 import WindowsParameters +from typing import TYPE_CHECKING -from ._compute_management_client_enums import AccessLevel -from ._compute_management_client_enums import AvailabilitySetSkuTypes -from ._compute_management_client_enums import CachingTypes -from ._compute_management_client_enums import CapacityReservationGroupInstanceViewTypes -from ._compute_management_client_enums import CapacityReservationInstanceViewTypes -from ._compute_management_client_enums import ConsistencyModeTypes -from ._compute_management_client_enums import DedicatedHostLicenseTypes -from ._compute_management_client_enums import DeleteOptions -from ._compute_management_client_enums import DiffDiskOptions -from ._compute_management_client_enums import DiffDiskPlacement -from ._compute_management_client_enums import DiskCreateOption -from ._compute_management_client_enums import DiskCreateOptionTypes -from ._compute_management_client_enums import DiskDeleteOptionTypes -from ._compute_management_client_enums import DiskDetachOptionTypes -from ._compute_management_client_enums import DiskEncryptionSetIdentityType -from ._compute_management_client_enums import DiskEncryptionSetType -from ._compute_management_client_enums import DiskSecurityTypes -from ._compute_management_client_enums import DiskState -from ._compute_management_client_enums import DiskStorageAccountTypes -from ._compute_management_client_enums import EncryptionType -from ._compute_management_client_enums import ExecutionState -from ._compute_management_client_enums import ExpandTypesForGetCapacityReservationGroups -from ._compute_management_client_enums import ExpandTypesForGetVMScaleSets -from ._compute_management_client_enums import ExtendedLocationTypes -from ._compute_management_client_enums import HyperVGeneration -from ._compute_management_client_enums import HyperVGenerationType -from ._compute_management_client_enums import HyperVGenerationTypes -from ._compute_management_client_enums import IPVersion -from ._compute_management_client_enums import IPVersions -from ._compute_management_client_enums import InstanceViewTypes -from ._compute_management_client_enums import IntervalInMins -from ._compute_management_client_enums import LinuxPatchAssessmentMode -from ._compute_management_client_enums import LinuxVMGuestPatchMode -from ._compute_management_client_enums import MaintenanceOperationResultCodeTypes -from ._compute_management_client_enums import NetworkAccessPolicy -from ._compute_management_client_enums import NetworkApiVersion -from ._compute_management_client_enums import OperatingSystemStateTypes -from ._compute_management_client_enums import OperatingSystemType -from ._compute_management_client_enums import OperatingSystemTypes -from ._compute_management_client_enums import OrchestrationMode -from ._compute_management_client_enums import OrchestrationServiceNames -from ._compute_management_client_enums import OrchestrationServiceState -from ._compute_management_client_enums import OrchestrationServiceStateAction -from ._compute_management_client_enums import PatchAssessmentState -from ._compute_management_client_enums import PatchInstallationState -from ._compute_management_client_enums import PatchOperationStatus -from ._compute_management_client_enums import PrivateEndpointConnectionProvisioningState -from ._compute_management_client_enums import PrivateEndpointServiceConnectionStatus -from ._compute_management_client_enums import ProtocolTypes -from ._compute_management_client_enums import ProximityPlacementGroupType -from ._compute_management_client_enums import PublicIPAddressSkuName -from ._compute_management_client_enums import PublicIPAddressSkuTier -from ._compute_management_client_enums import PublicIPAllocationMethod -from ._compute_management_client_enums import PublicNetworkAccess -from ._compute_management_client_enums import ResourceIdentityType -from ._compute_management_client_enums import RestorePointCollectionExpandOptions -from ._compute_management_client_enums import RollingUpgradeActionType -from ._compute_management_client_enums import RollingUpgradeStatusCode -from ._compute_management_client_enums import SecurityTypes -from ._compute_management_client_enums import SettingNames -from ._compute_management_client_enums import SnapshotStorageAccountTypes -from ._compute_management_client_enums import StatusLevelTypes -from ._compute_management_client_enums import StorageAccountTypes -from ._compute_management_client_enums import UpgradeMode -from ._compute_management_client_enums import UpgradeOperationInvoker -from ._compute_management_client_enums import UpgradeState -from ._compute_management_client_enums import VMGuestPatchClassificationLinux -from ._compute_management_client_enums import VMGuestPatchClassificationWindows -from ._compute_management_client_enums import VMGuestPatchRebootBehavior -from ._compute_management_client_enums import VMGuestPatchRebootSetting -from ._compute_management_client_enums import VMGuestPatchRebootStatus -from ._compute_management_client_enums import VirtualMachineEvictionPolicyTypes -from ._compute_management_client_enums import VirtualMachinePriorityTypes -from ._compute_management_client_enums import VirtualMachineScaleSetScaleInRules -from ._compute_management_client_enums import VirtualMachineScaleSetSkuScaleType -from ._compute_management_client_enums import VirtualMachineSizeTypes -from ._compute_management_client_enums import VmDiskTypes -from ._compute_management_client_enums import WindowsPatchAssessmentMode -from ._compute_management_client_enums import WindowsVMGuestPatchMode +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + + +from ._models_py3 import ( # type: ignore + AccessUri, + AdditionalCapabilities, + AdditionalUnattendContent, + ApiEntityReference, + ApiError, + ApiErrorBase, + AutomaticOSUpgradePolicy, + AutomaticOSUpgradeProperties, + AutomaticRepairsPolicy, + AvailabilitySet, + AvailabilitySetListResult, + AvailabilitySetUpdate, + AvailablePatchSummary, + BillingProfile, + BootDiagnostics, + BootDiagnosticsInstanceView, + CapacityReservation, + CapacityReservationGroup, + CapacityReservationGroupInstanceView, + CapacityReservationGroupListResult, + CapacityReservationGroupUpdate, + CapacityReservationInstanceView, + CapacityReservationInstanceViewWithName, + CapacityReservationListResult, + CapacityReservationProfile, + CapacityReservationUpdate, + CapacityReservationUtilization, + ComputeOperationListResult, + ComputeOperationValue, + CreationData, + DataDisk, + DataDiskImage, + DedicatedHost, + DedicatedHostAllocatableVM, + DedicatedHostAvailableCapacity, + DedicatedHostGroup, + DedicatedHostGroupInstanceView, + DedicatedHostGroupListResult, + DedicatedHostGroupUpdate, + DedicatedHostInstanceView, + DedicatedHostInstanceViewWithName, + DedicatedHostListResult, + DedicatedHostUpdate, + DiagnosticsProfile, + DiffDiskSettings, + DisallowedConfiguration, + Disk, + DiskAccess, + DiskAccessList, + DiskAccessUpdate, + DiskEncryptionSet, + DiskEncryptionSetList, + DiskEncryptionSetParameters, + DiskEncryptionSetUpdate, + DiskEncryptionSettings, + DiskInstanceView, + DiskList, + DiskRestorePoint, + DiskRestorePointList, + DiskSecurityProfile, + DiskSku, + DiskUpdate, + Encryption, + EncryptionSetIdentity, + EncryptionSettingsCollection, + EncryptionSettingsElement, + ExtendedLocation, + GrantAccessData, + HardwareProfile, + Image, + ImageDataDisk, + ImageDisk, + ImageDiskReference, + ImageListResult, + ImageOSDisk, + ImageReference, + ImageStorageProfile, + ImageUpdate, + InnerError, + InstanceViewStatus, + KeyForDiskEncryptionSet, + KeyVaultAndKeyReference, + KeyVaultAndSecretReference, + KeyVaultKeyReference, + KeyVaultSecretReference, + LastPatchInstallationSummary, + LinuxConfiguration, + LinuxParameters, + LinuxPatchSettings, + ListUsagesResult, + LogAnalyticsInputBase, + LogAnalyticsOperationResult, + LogAnalyticsOutput, + MaintenanceRedeployStatus, + ManagedDiskParameters, + NetworkInterfaceReference, + NetworkProfile, + OSDisk, + OSDiskImage, + OSProfile, + OrchestrationServiceStateInput, + OrchestrationServiceSummary, + PatchInstallationDetail, + PatchSettings, + Plan, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateEndpointConnectionListResult, + PrivateLinkResource, + PrivateLinkResourceListResult, + PrivateLinkServiceConnectionState, + PropertyUpdatesInProgress, + ProximityPlacementGroup, + ProximityPlacementGroupListResult, + ProximityPlacementGroupUpdate, + ProxyOnlyResource, + ProxyResource, + PublicIPAddressSku, + PurchasePlan, + PurchasePlanAutoGenerated, + RecoveryWalkResponse, + RequestRateByIntervalInput, + Resource, + ResourceUriList, + RestorePoint, + RestorePointCollection, + RestorePointCollectionListResult, + RestorePointCollectionSourceProperties, + RestorePointCollectionUpdate, + RestorePointSourceMetadata, + RestorePointSourceVMDataDisk, + RestorePointSourceVMOSDisk, + RestorePointSourceVMStorageProfile, + RetrieveBootDiagnosticsDataResult, + RollbackStatusInfo, + RollingUpgradePolicy, + RollingUpgradeProgressInfo, + RollingUpgradeRunningStatus, + RollingUpgradeStatusInfo, + RunCommandDocument, + RunCommandDocumentBase, + RunCommandInput, + RunCommandInputParameter, + RunCommandListResult, + RunCommandParameterDefinition, + RunCommandResult, + ScaleInPolicy, + ScheduledEventsProfile, + SecurityProfile, + ShareInfoElement, + Sku, + Snapshot, + SnapshotList, + SnapshotSku, + SnapshotUpdate, + SourceVault, + SpotRestorePolicy, + SshConfiguration, + SshPublicKey, + SshPublicKeyGenerateKeyPairResult, + SshPublicKeyResource, + SshPublicKeyUpdateResource, + SshPublicKeysGroupListResult, + StorageProfile, + SubResource, + SubResourceReadOnly, + SubResourceWithColocationStatus, + SupportedCapabilities, + TerminateNotificationProfile, + ThrottledRequestsInput, + UefiSettings, + UpdateResource, + UpgradeOperationHistoricalStatusInfo, + UpgradeOperationHistoricalStatusInfoProperties, + UpgradeOperationHistoryStatus, + UpgradePolicy, + Usage, + UsageName, + UserAssignedIdentitiesValue, + VMScaleSetConvertToSinglePlacementGroupInput, + VaultCertificate, + VaultSecretGroup, + VirtualHardDisk, + VirtualMachine, + VirtualMachineAgentInstanceView, + VirtualMachineAssessPatchesResult, + VirtualMachineCaptureParameters, + VirtualMachineCaptureResult, + VirtualMachineExtension, + VirtualMachineExtensionHandlerInstanceView, + VirtualMachineExtensionImage, + VirtualMachineExtensionInstanceView, + VirtualMachineExtensionUpdate, + VirtualMachineExtensionsListResult, + VirtualMachineHealthStatus, + VirtualMachineIdentity, + VirtualMachineImage, + VirtualMachineImageFeature, + VirtualMachineImageResource, + VirtualMachineInstallPatchesParameters, + VirtualMachineInstallPatchesResult, + VirtualMachineInstanceView, + VirtualMachineIpTag, + VirtualMachineListResult, + VirtualMachineNetworkInterfaceConfiguration, + VirtualMachineNetworkInterfaceDnsSettingsConfiguration, + VirtualMachineNetworkInterfaceIPConfiguration, + VirtualMachinePatchStatus, + VirtualMachinePublicIPAddressConfiguration, + VirtualMachinePublicIPAddressDnsSettingsConfiguration, + VirtualMachineReimageParameters, + VirtualMachineRunCommand, + VirtualMachineRunCommandInstanceView, + VirtualMachineRunCommandScriptSource, + VirtualMachineRunCommandUpdate, + VirtualMachineRunCommandsListResult, + VirtualMachineScaleSet, + VirtualMachineScaleSetDataDisk, + VirtualMachineScaleSetExtension, + VirtualMachineScaleSetExtensionListResult, + VirtualMachineScaleSetExtensionProfile, + VirtualMachineScaleSetExtensionUpdate, + VirtualMachineScaleSetIPConfiguration, + VirtualMachineScaleSetIdentity, + VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue, + VirtualMachineScaleSetInstanceView, + VirtualMachineScaleSetInstanceViewStatusesSummary, + VirtualMachineScaleSetIpTag, + VirtualMachineScaleSetListOSUpgradeHistory, + VirtualMachineScaleSetListResult, + VirtualMachineScaleSetListSkusResult, + VirtualMachineScaleSetListWithLinkResult, + VirtualMachineScaleSetManagedDiskParameters, + VirtualMachineScaleSetNetworkConfiguration, + VirtualMachineScaleSetNetworkConfigurationDnsSettings, + VirtualMachineScaleSetNetworkProfile, + VirtualMachineScaleSetOSDisk, + VirtualMachineScaleSetOSProfile, + VirtualMachineScaleSetPublicIPAddressConfiguration, + VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings, + VirtualMachineScaleSetReimageParameters, + VirtualMachineScaleSetSku, + VirtualMachineScaleSetSkuCapacity, + VirtualMachineScaleSetStorageProfile, + VirtualMachineScaleSetUpdate, + VirtualMachineScaleSetUpdateIPConfiguration, + VirtualMachineScaleSetUpdateNetworkConfiguration, + VirtualMachineScaleSetUpdateNetworkProfile, + VirtualMachineScaleSetUpdateOSDisk, + VirtualMachineScaleSetUpdateOSProfile, + VirtualMachineScaleSetUpdatePublicIPAddressConfiguration, + VirtualMachineScaleSetUpdateStorageProfile, + VirtualMachineScaleSetUpdateVMProfile, + VirtualMachineScaleSetVM, + VirtualMachineScaleSetVMExtension, + VirtualMachineScaleSetVMExtensionUpdate, + VirtualMachineScaleSetVMExtensionsListResult, + VirtualMachineScaleSetVMExtensionsSummary, + VirtualMachineScaleSetVMInstanceIDs, + VirtualMachineScaleSetVMInstanceRequiredIDs, + VirtualMachineScaleSetVMInstanceView, + VirtualMachineScaleSetVMListResult, + VirtualMachineScaleSetVMNetworkProfileConfiguration, + VirtualMachineScaleSetVMProfile, + VirtualMachineScaleSetVMProtectionPolicy, + VirtualMachineScaleSetVMReimageParameters, + VirtualMachineSize, + VirtualMachineSizeListResult, + VirtualMachineSoftwarePatchProperties, + VirtualMachineStatusCodeCount, + VirtualMachineUpdate, + WinRMConfiguration, + WinRMListener, + WindowsConfiguration, + WindowsParameters, +) + +from ._compute_management_client_enums import ( # type: ignore + AccessLevel, + AvailabilitySetSkuTypes, + CachingTypes, + CapacityReservationGroupInstanceViewTypes, + CapacityReservationInstanceViewTypes, + ConsistencyModeTypes, + DedicatedHostLicenseTypes, + DeleteOptions, + DiffDiskOptions, + DiffDiskPlacement, + DiskCreateOption, + DiskCreateOptionTypes, + DiskDeleteOptionTypes, + DiskDetachOptionTypes, + DiskEncryptionSetIdentityType, + DiskEncryptionSetType, + DiskSecurityTypes, + DiskState, + DiskStorageAccountTypes, + EncryptionType, + ExecutionState, + ExpandTypesForGetCapacityReservationGroups, + ExpandTypesForGetVMScaleSets, + ExtendedLocationTypes, + HyperVGeneration, + HyperVGenerationType, + HyperVGenerationTypes, + IPVersion, + IPVersions, + InstanceViewTypes, + IntervalInMins, + LinuxPatchAssessmentMode, + LinuxVMGuestPatchMode, + MaintenanceOperationResultCodeTypes, + NetworkAccessPolicy, + NetworkApiVersion, + OperatingSystemStateTypes, + OperatingSystemType, + OperatingSystemTypes, + OrchestrationMode, + OrchestrationServiceNames, + OrchestrationServiceState, + OrchestrationServiceStateAction, + PatchAssessmentState, + PatchInstallationState, + PatchOperationStatus, + PrivateEndpointConnectionProvisioningState, + PrivateEndpointServiceConnectionStatus, + ProtocolTypes, + ProximityPlacementGroupType, + PublicIPAddressSkuName, + PublicIPAddressSkuTier, + PublicIPAllocationMethod, + PublicNetworkAccess, + ResourceIdentityType, + RestorePointCollectionExpandOptions, + RollingUpgradeActionType, + RollingUpgradeStatusCode, + SecurityTypes, + SettingNames, + SnapshotStorageAccountTypes, + StatusLevelTypes, + StorageAccountTypes, + UpgradeMode, + UpgradeOperationInvoker, + UpgradeState, + VMGuestPatchClassificationLinux, + VMGuestPatchClassificationWindows, + VMGuestPatchRebootBehavior, + VMGuestPatchRebootSetting, + VMGuestPatchRebootStatus, + VirtualMachineEvictionPolicyTypes, + VirtualMachinePriorityTypes, + VirtualMachineScaleSetScaleInRules, + VirtualMachineScaleSetSkuScaleType, + VirtualMachineSizeTypes, + VmDiskTypes, + WindowsPatchAssessmentMode, + WindowsVMGuestPatchMode, +) 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__ = [ @@ -721,5 +732,5 @@ "WindowsPatchAssessmentMode", "WindowsVMGuestPatchMode", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/models/_models_py3.py index 6f2d663d6276d..447ac47bf7dad 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/models/_models_py3.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/models/_models_py3.py @@ -1,5 +1,5 @@ -# 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. @@ -16,10 +16,9 @@ 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 if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object @@ -399,7 +398,7 @@ def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kw self.tags = tags -class AvailabilitySet(Resource): # pylint: disable=too-many-instance-attributes +class AvailabilitySet(Resource): """Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see `Availability sets @@ -819,7 +818,7 @@ def __init__(self, **kwargs: Any) -> None: self.status = None -class CapacityReservation(Resource): # pylint: disable=too-many-instance-attributes +class CapacityReservation(Resource): """Specifies information about the capacity reservation. Variables are only populated by the server, and will be ignored when sending a request. @@ -1530,7 +1529,7 @@ def __init__( self.logical_sector_size = logical_sector_size -class DataDisk(_serialization.Model): # pylint: disable=too-many-instance-attributes +class DataDisk(_serialization.Model): """Describes a data disk. Variables are only populated by the server, and will be ignored when sending a request. @@ -1741,7 +1740,7 @@ def __init__(self, **kwargs: Any) -> None: self.lun = None -class DedicatedHost(Resource): # pylint: disable=too-many-instance-attributes +class DedicatedHost(Resource): """Specifies information about the Dedicated host. Variables are only populated by the server, and will be ignored when sending a request. @@ -2461,7 +2460,7 @@ def __init__(self, *, vm_disk_type: Optional[Union[str, "_models.VmDiskTypes"]] self.vm_disk_type = vm_disk_type -class Disk(Resource): # pylint: disable=too-many-instance-attributes +class Disk(Resource): """Disk resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -2925,7 +2924,7 @@ def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> N self.tags = tags -class DiskEncryptionSet(Resource): # pylint: disable=too-many-instance-attributes +class DiskEncryptionSet(Resource): """disk encryption set resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -3319,7 +3318,7 @@ def __init__(self, **kwargs: Any) -> None: self.type = None -class DiskRestorePoint(ProxyOnlyResource): # pylint: disable=too-many-instance-attributes +class DiskRestorePoint(ProxyOnlyResource): """Properties of disk restore point. Variables are only populated by the server, and will be ignored when sending a request. @@ -3551,7 +3550,7 @@ def __init__(self, *, name: Optional[Union[str, "_models.DiskStorageAccountTypes self.tier = None -class DiskUpdate(_serialization.Model): # pylint: disable=too-many-instance-attributes +class DiskUpdate(_serialization.Model): """Disk update resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -5049,7 +5048,7 @@ def __init__(self, *, secret_url: str, source_vault: "_models.SubResource", **kw self.source_vault = source_vault -class LastPatchInstallationSummary(_serialization.Model): # pylint: disable=too-many-instance-attributes +class LastPatchInstallationSummary(_serialization.Model): """Describes the properties of the last installed patch summary. Variables are only populated by the server, and will be ignored when sending a request. @@ -5754,7 +5753,7 @@ def __init__(self, **kwargs: Any) -> None: self.service_state = None -class OSDisk(_serialization.Model): # pylint: disable=too-many-instance-attributes +class OSDisk(_serialization.Model): """Specifies information about the operating system disk used by the virtual machine. :code:`
`:code:`
` For more information about disks, see `About disks and VHDs for Azure virtual machines `_. @@ -8344,7 +8343,7 @@ def __init__( self.capacity = capacity -class Snapshot(Resource): # pylint: disable=too-many-instance-attributes +class Snapshot(Resource): """Snapshot resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -9673,7 +9672,7 @@ def __init__(self, *, uri: Optional[str] = None, **kwargs: Any) -> None: self.uri = uri -class VirtualMachine(Resource): # pylint: disable=too-many-instance-attributes +class VirtualMachine(Resource): """Describes a Virtual Machine. Variables are only populated by the server, and will be ignored when sending a request. @@ -10240,7 +10239,7 @@ def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylin self.resources = None -class VirtualMachineExtension(Resource): # pylint: disable=too-many-instance-attributes +class VirtualMachineExtension(Resource): """Describes a Virtual Machine Extension. Variables are only populated by the server, and will be ignored when sending a request. @@ -10812,7 +10811,7 @@ def __init__( self.extended_location = extended_location -class VirtualMachineImage(VirtualMachineImageResource): # pylint: disable=too-many-instance-attributes +class VirtualMachineImage(VirtualMachineImageResource): """Describes a Virtual Machine Image. All required parameters must be populated in order to send to server. @@ -11022,7 +11021,7 @@ def __init__( self.linux_parameters = linux_parameters -class VirtualMachineInstallPatchesResult(_serialization.Model): # pylint: disable=too-many-instance-attributes +class VirtualMachineInstallPatchesResult(_serialization.Model): """The result summary of an installation operation. Variables are only populated by the server, and will be ignored when sending a request. @@ -11112,7 +11111,7 @@ def __init__(self, **kwargs: Any) -> None: self.error = None -class VirtualMachineInstanceView(_serialization.Model): # pylint: disable=too-many-instance-attributes +class VirtualMachineInstanceView(_serialization.Model): """The instance view of a virtual machine. Variables are only populated by the server, and will be ignored when sending a request. @@ -11775,7 +11774,7 @@ def __init__(self, *, temp_disk: Optional[bool] = None, **kwargs: Any) -> None: self.temp_disk = temp_disk -class VirtualMachineRunCommand(Resource): # pylint: disable=too-many-instance-attributes +class VirtualMachineRunCommand(Resource): """Describes a Virtual Machine run command. Variables are only populated by the server, and will be ignored when sending a request. @@ -12058,7 +12057,7 @@ def __init__( self.next_link = next_link -class VirtualMachineRunCommandUpdate(UpdateResource): # pylint: disable=too-many-instance-attributes +class VirtualMachineRunCommandUpdate(UpdateResource): """Describes a Virtual Machine run command. Variables are only populated by the server, and will be ignored when sending a request. @@ -12171,7 +12170,7 @@ def __init__( self.instance_view = None -class VirtualMachineScaleSet(Resource): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSet(Resource): """Describes a Virtual Machine Scale Set. Variables are only populated by the server, and will be ignored when sending a request. @@ -12534,7 +12533,7 @@ def __init__( self.disk_m_bps_read_write = disk_m_bps_read_write -class VirtualMachineScaleSetExtension(SubResourceReadOnly): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetExtension(SubResourceReadOnly): """Describes a Virtual Machine Scale Set Extension. Variables are only populated by the server, and will be ignored when sending a request. @@ -12731,7 +12730,7 @@ def __init__( self.extensions_time_budget = extensions_time_budget -class VirtualMachineScaleSetExtensionUpdate(SubResourceReadOnly): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetExtensionUpdate(SubResourceReadOnly): """Describes a Virtual Machine Scale Set Extension. Variables are only populated by the server, and will be ignored when sending a request. @@ -14105,7 +14104,7 @@ def __init__( self.data_disks = data_disks -class VirtualMachineScaleSetUpdate(UpdateResource): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetUpdate(UpdateResource): """Describes a Virtual Machine Scale Set. :ivar tags: Resource tags. @@ -14835,7 +14834,7 @@ def __init__( self.user_data = user_data -class VirtualMachineScaleSetVM(Resource): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetVM(Resource): """Describes a virtual machine scale set virtual machine. Variables are only populated by the server, and will be ignored when sending a request. @@ -15088,7 +15087,7 @@ def __init__( # pylint: disable=too-many-locals self.user_data = user_data -class VirtualMachineScaleSetVMExtension(SubResourceReadOnly): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetVMExtension(SubResourceReadOnly): """Describes a VMSS VM Extension. Variables are only populated by the server, and will be ignored when sending a request. @@ -15259,7 +15258,7 @@ def __init__(self, **kwargs: Any) -> None: self.statuses_summary = None -class VirtualMachineScaleSetVMExtensionUpdate(SubResourceReadOnly): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetVMExtensionUpdate(SubResourceReadOnly): """Describes a VMSS VM Extension. Variables are only populated by the server, and will be ignored when sending a request. @@ -15414,7 +15413,7 @@ def __init__(self, *, instance_ids: List[str], **kwargs: Any) -> None: self.instance_ids = instance_ids -class VirtualMachineScaleSetVMInstanceView(_serialization.Model): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetVMInstanceView(_serialization.Model): """The instance view of a virtual machine scale set VM. Variables are only populated by the server, and will be ignored when sending a request. @@ -15598,7 +15597,7 @@ def __init__( self.network_interface_configurations = network_interface_configurations -class VirtualMachineScaleSetVMProfile(_serialization.Model): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetVMProfile(_serialization.Model): """Describes a virtual machine scale set virtual machine profile. :ivar os_profile: Specifies the operating system settings for the virtual machines in the scale @@ -15997,7 +15996,7 @@ def __init__(self, **kwargs: Any) -> None: self.count = None -class VirtualMachineUpdate(UpdateResource): # pylint: disable=too-many-instance-attributes +class VirtualMachineUpdate(UpdateResource): """Describes a Virtual Machine Update. Variables are only populated by the server, and will be ignored when sending a request. diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/operations/__init__.py index f689f391fda8b..9f05ca0896e8f 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/operations/__init__.py @@ -5,41 +5,47 @@ # Code generated by Microsoft (R) AutoRest 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 AvailabilitySetsOperations -from ._operations import ProximityPlacementGroupsOperations -from ._operations import DedicatedHostGroupsOperations -from ._operations import DedicatedHostsOperations -from ._operations import SshPublicKeysOperations -from ._operations import VirtualMachineExtensionImagesOperations -from ._operations import VirtualMachineExtensionsOperations -from ._operations import VirtualMachineImagesOperations -from ._operations import VirtualMachineImagesEdgeZoneOperations -from ._operations import UsageOperations -from ._operations import VirtualMachinesOperations -from ._operations import VirtualMachineScaleSetsOperations -from ._operations import VirtualMachineSizesOperations -from ._operations import ImagesOperations -from ._operations import RestorePointCollectionsOperations -from ._operations import RestorePointsOperations -from ._operations import CapacityReservationGroupsOperations -from ._operations import CapacityReservationsOperations -from ._operations import VirtualMachineScaleSetExtensionsOperations -from ._operations import VirtualMachineScaleSetRollingUpgradesOperations -from ._operations import VirtualMachineScaleSetVMExtensionsOperations -from ._operations import VirtualMachineScaleSetVMsOperations -from ._operations import LogAnalyticsOperations -from ._operations import VirtualMachineRunCommandsOperations -from ._operations import VirtualMachineScaleSetVMRunCommandsOperations -from ._operations import DisksOperations -from ._operations import SnapshotsOperations -from ._operations import DiskEncryptionSetsOperations -from ._operations import DiskAccessesOperations -from ._operations import DiskRestorePointOperations +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 AvailabilitySetsOperations # type: ignore +from ._operations import ProximityPlacementGroupsOperations # type: ignore +from ._operations import DedicatedHostGroupsOperations # type: ignore +from ._operations import DedicatedHostsOperations # type: ignore +from ._operations import SshPublicKeysOperations # type: ignore +from ._operations import VirtualMachineExtensionImagesOperations # type: ignore +from ._operations import VirtualMachineExtensionsOperations # type: ignore +from ._operations import VirtualMachineImagesOperations # type: ignore +from ._operations import VirtualMachineImagesEdgeZoneOperations # type: ignore +from ._operations import UsageOperations # type: ignore +from ._operations import VirtualMachinesOperations # type: ignore +from ._operations import VirtualMachineScaleSetsOperations # type: ignore +from ._operations import VirtualMachineSizesOperations # type: ignore +from ._operations import ImagesOperations # type: ignore +from ._operations import RestorePointCollectionsOperations # type: ignore +from ._operations import RestorePointsOperations # type: ignore +from ._operations import CapacityReservationGroupsOperations # type: ignore +from ._operations import CapacityReservationsOperations # type: ignore +from ._operations import VirtualMachineScaleSetExtensionsOperations # type: ignore +from ._operations import VirtualMachineScaleSetRollingUpgradesOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMExtensionsOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMsOperations # type: ignore +from ._operations import LogAnalyticsOperations # type: ignore +from ._operations import VirtualMachineRunCommandsOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMRunCommandsOperations # type: ignore +from ._operations import DisksOperations # type: ignore +from ._operations import SnapshotsOperations # type: ignore +from ._operations import DiskEncryptionSetsOperations # type: ignore +from ._operations import DiskAccessesOperations # type: ignore +from ._operations import DiskRestorePointOperations # 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__ = [ @@ -75,5 +81,5 @@ "DiskAccessesOperations", "DiskRestorePointOperations", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/operations/_operations.py index b46c9bddb7fa4..25ae5dcea9bc3 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/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. @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Iterable, Iterator, List, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Iterable, Iterator, List, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -36,7 +36,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, HttpResponse], T, Dict[str, Any]], Any]] @@ -6871,7 +6871,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.ComputeOperationValue"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.ComputeOperationListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7024,7 +7024,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2021_04_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7151,7 +7151,7 @@ def update( :rtype: ~azure.mgmt.compute.v2021_04_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7219,7 +7219,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7269,7 +7269,7 @@ def get(self, resource_group_name: str, availability_set_name: str, **kwargs: An :rtype: ~azure.mgmt.compute.v2021_04_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7330,7 +7330,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7407,7 +7407,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Ava api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7489,7 +7489,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7647,7 +7647,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2021_04_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7777,7 +7777,7 @@ def update( :rtype: ~azure.mgmt.compute.v2021_04_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7845,7 +7845,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7905,7 +7905,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_04_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7964,7 +7964,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.ProximityPlac api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8044,7 +8044,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8205,7 +8205,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2021_04_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8332,7 +8332,7 @@ def update( :rtype: ~azure.mgmt.compute.v2021_04_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8400,7 +8400,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8462,7 +8462,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_04_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8522,7 +8522,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8598,7 +8598,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.DedicatedHost api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8687,7 +8687,7 @@ def _create_or_update_initial( parameters: Union[_models.DedicatedHost, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8888,7 +8888,7 @@ def _update_initial( parameters: Union[_models.DedicatedHostUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9084,7 +9084,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9215,7 +9215,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_04_01.models.DedicatedHost :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9280,7 +9280,7 @@ def list_by_host_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.DedicatedHostListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9380,7 +9380,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.SshPublicKeyR api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9461,7 +9461,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9595,7 +9595,7 @@ def create( :rtype: ~azure.mgmt.compute.v2021_04_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9723,7 +9723,7 @@ def update( :rtype: ~azure.mgmt.compute.v2021_04_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9791,7 +9791,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9841,7 +9841,7 @@ def get(self, resource_group_name: str, ssh_public_key_name: str, **kwargs: Any) :rtype: ~azure.mgmt.compute.v2021_04_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9899,7 +9899,7 @@ def generate_key_pair( :rtype: ~azure.mgmt.compute.v2021_04_01.models.SshPublicKeyGenerateKeyPairResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9980,7 +9980,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_04_01.models.VirtualMachineExtensionImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10038,7 +10038,7 @@ def list_types( :rtype: list[~azure.mgmt.compute.v2021_04_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10110,7 +10110,7 @@ def list_versions( :rtype: list[~azure.mgmt.compute.v2021_04_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10185,7 +10185,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineExtension, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10395,7 +10395,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineExtensionUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10601,7 +10601,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_name: str, vm_extension_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10731,7 +10731,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_04_01.models.VirtualMachineExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10791,7 +10791,7 @@ def list( :rtype: ~azure.mgmt.compute.v2021_04_01.models.VirtualMachineExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10875,7 +10875,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_04_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10954,7 +10954,7 @@ def list( :rtype: list[~azure.mgmt.compute.v2021_04_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11015,7 +11015,7 @@ def list_offers( :rtype: list[~azure.mgmt.compute.v2021_04_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11067,7 +11067,7 @@ def list_publishers(self, location: str, **kwargs: Any) -> List[_models.VirtualM :rtype: list[~azure.mgmt.compute.v2021_04_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11124,7 +11124,7 @@ def list_skus( :rtype: list[~azure.mgmt.compute.v2021_04_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11210,7 +11210,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_04_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11295,7 +11295,7 @@ def list( :rtype: list[~azure.mgmt.compute.v2021_04_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11360,7 +11360,7 @@ def list_offers( :rtype: list[~azure.mgmt.compute.v2021_04_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11417,7 +11417,7 @@ def list_publishers( :rtype: list[~azure.mgmt.compute.v2021_04_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11478,7 +11478,7 @@ def list_skus( :rtype: list[~azure.mgmt.compute.v2021_04_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11560,7 +11560,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.Usage"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.ListUsagesResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11659,7 +11659,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> Iterable["_models.Vi api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11727,7 +11727,7 @@ def _capture_initial( parameters: Union[_models.VirtualMachineCaptureParameters, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11925,7 +11925,7 @@ def _create_or_update_initial( parameters: Union[_models.VirtualMachine, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12117,7 +12117,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12302,7 +12302,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_name: str, *, force_deletion: Optional[bool] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12433,7 +12433,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_04_01.models.VirtualMachine :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12490,7 +12490,7 @@ def instance_view( :rtype: ~azure.mgmt.compute.v2021_04_01.models.VirtualMachineInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12535,7 +12535,7 @@ def instance_view( def _convert_to_managed_disks_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12636,7 +12636,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _deallocate_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12755,7 +12755,7 @@ def generalize( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12810,7 +12810,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Vir api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12889,7 +12889,7 @@ def list_all(self, *, status_only: Optional[str] = None, **kwargs: Any) -> Itera api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12971,7 +12971,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13036,7 +13036,7 @@ def get_next(next_link=None): def _power_off_initial( self, resource_group_name: str, vm_name: str, *, skip_shutdown: bool = False, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13145,7 +13145,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _reapply_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13245,7 +13245,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _restart_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13345,7 +13345,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _start_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13445,7 +13445,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _redeploy_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13551,7 +13551,7 @@ def _reimage_initial( parameters: Optional[Union[_models.VirtualMachineReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13756,7 +13756,7 @@ def retrieve_boot_diagnostics_data( :rtype: ~azure.mgmt.compute.v2021_04_01.models.RetrieveBootDiagnosticsDataResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13800,7 +13800,7 @@ def retrieve_boot_diagnostics_data( return deserialized # type: ignore def _perform_maintenance_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13913,7 +13913,7 @@ def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13952,7 +13952,7 @@ def simulate_eviction( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore def _assess_patches_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14068,7 +14068,7 @@ def _install_patches_initial( install_patches_input: Union[_models.VirtualMachineInstallPatchesParameters, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14266,7 +14266,7 @@ def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14490,7 +14490,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> Iterable["_models.Vi api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14558,7 +14558,7 @@ def _create_or_update_initial( parameters: Union[_models.VirtualMachineScaleSet, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14750,7 +14750,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineScaleSetUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14939,7 +14939,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, *, force_deletion: Optional[bool] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15068,7 +15068,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_04_01.models.VirtualMachineScaleSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15118,7 +15118,7 @@ def _deallocate_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15315,7 +15315,7 @@ def _delete_instances_initial( force_deletion: Optional[bool] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15523,7 +15523,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2021_04_01.models.VirtualMachineScaleSetInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15583,7 +15583,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Vir api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15662,7 +15662,7 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.VirtualMachineScaleSet"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.VirtualMachineScaleSetListWithLinkResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15745,7 +15745,7 @@ def list_skus( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.VirtualMachineScaleSetListSkusResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15829,7 +15829,7 @@ def get_os_upgrade_history( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.VirtualMachineScaleSetListOSUpgradeHistory] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15900,7 +15900,7 @@ def _power_off_initial( skip_shutdown: bool = False, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16113,7 +16113,7 @@ def _restart_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16302,7 +16302,7 @@ def _start_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16491,7 +16491,7 @@ def _redeploy_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16683,7 +16683,7 @@ def _perform_maintenance_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16881,7 +16881,7 @@ def _update_instances_initial( vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17067,7 +17067,7 @@ def _reimage_initial( vm_scale_set_reimage_input: Optional[Union[_models.VirtualMachineScaleSetReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17260,7 +17260,7 @@ def _reimage_all_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17463,7 +17463,7 @@ def force_recovery_service_fabric_platform_update_domain_walk( # pylint: disabl :rtype: ~azure.mgmt.compute.v2021_04_01.models.RecoveryWalkResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17507,7 +17507,7 @@ def force_recovery_service_fabric_platform_update_domain_walk( # pylint: disabl return deserialized # type: ignore @overload - def convert_to_single_placement_group( # pylint: disable=inconsistent-return-statements + def convert_to_single_placement_group( self, resource_group_name: str, vm_scale_set_name: str, @@ -17535,7 +17535,7 @@ def convert_to_single_placement_group( # pylint: disable=inconsistent-return-st """ @overload - def convert_to_single_placement_group( # pylint: disable=inconsistent-return-statements + def convert_to_single_placement_group( self, resource_group_name: str, vm_scale_set_name: str, @@ -17585,7 +17585,7 @@ def convert_to_single_placement_group( # pylint: disable=inconsistent-return-st :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17642,7 +17642,7 @@ def _set_orchestration_service_state_initial( parameters: Union[_models.OrchestrationServiceStateInput, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17859,7 +17859,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.VirtualMachine api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17944,7 +17944,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, image_name: str, parameters: Union[_models.Image, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18126,7 +18126,7 @@ def _update_initial( parameters: Union[_models.ImageUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18306,7 +18306,7 @@ def get_long_running_output(pipeline_response): ) def _delete_initial(self, resource_group_name: str, image_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18421,7 +18421,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_04_01.models.Image :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18480,7 +18480,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18556,7 +18556,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Image"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18718,7 +18718,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2021_04_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18848,7 +18848,7 @@ def update( :rtype: ~azure.mgmt.compute.v2021_04_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18905,7 +18905,7 @@ def update( def _delete_initial( self, resource_group_name: str, restore_point_collection_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19031,7 +19031,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_04_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19092,7 +19092,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Res api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.RestorePointCollectionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19171,7 +19171,7 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.RestorePointCollection"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.RestorePointCollectionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19260,7 +19260,7 @@ def _create_initial( parameters: Union[_models.RestorePoint, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19459,7 +19459,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, restore_point_collection_name: str, restore_point_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19580,7 +19580,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_04_01.models.RestorePoint :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19723,7 +19723,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2021_04_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19856,7 +19856,7 @@ def update( :rtype: ~azure.mgmt.compute.v2021_04_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19927,7 +19927,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19991,7 +19991,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_04_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20065,7 +20065,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.CapacityReservationGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20152,7 +20152,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.CapacityReservationGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20242,7 +20242,7 @@ def _create_or_update_initial( parameters: Union[_models.CapacityReservation, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20452,7 +20452,7 @@ def _update_initial( parameters: Union[_models.CapacityReservationUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20655,7 +20655,7 @@ def _delete_initial( capacity_reservation_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20793,7 +20793,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_04_01.models.CapacityReservation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20859,7 +20859,7 @@ def list_by_capacity_reservation_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.CapacityReservationListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20950,7 +20950,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtension, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21161,7 +21161,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtensionUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21368,7 +21368,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, vmss_extension_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21498,7 +21498,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_04_01.models.VirtualMachineScaleSetExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21564,7 +21564,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.VirtualMachineScaleSetExtensionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21648,7 +21648,7 @@ def __init__(self, *args, **kwargs): self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") def _cancel_initial(self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21750,7 +21750,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_os_upgrade_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21856,7 +21856,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_extension_upgrade_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21973,7 +21973,7 @@ def get_latest( :rtype: ~azure.mgmt.compute.v2021_04_01.models.RollingUpgradeStatusInfo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22045,7 +22045,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetVMExtension, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22265,7 +22265,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetVMExtensionUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22480,7 +22480,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, vm_extension_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22616,7 +22616,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_04_01.models.VirtualMachineScaleSetVMExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22685,7 +22685,7 @@ def list( :rtype: ~azure.mgmt.compute.v2021_04_01.models.VirtualMachineScaleSetVMExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22762,7 +22762,7 @@ def _reimage_initial( ] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22961,7 +22961,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _reimage_all_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23070,7 +23070,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _deallocate_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23185,7 +23185,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineScaleSetVM, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23395,7 +23395,7 @@ def _delete_initial( force_deletion: Optional[bool] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23537,7 +23537,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_04_01.models.VirtualMachineScaleSetVM :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23597,7 +23597,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2021_04_01.models.VirtualMachineScaleSetVMInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23679,7 +23679,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.VirtualMachineScaleSetVMListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23753,7 +23753,7 @@ def _power_off_initial( skip_shutdown: bool = False, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23875,7 +23875,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _restart_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23983,7 +23983,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24091,7 +24091,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _redeploy_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24225,7 +24225,7 @@ def retrieve_boot_diagnostics_data( :rtype: ~azure.mgmt.compute.v2021_04_01.models.RetrieveBootDiagnosticsDataResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24272,7 +24272,7 @@ def retrieve_boot_diagnostics_data( def _perform_maintenance_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24393,7 +24393,7 @@ def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24440,7 +24440,7 @@ def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24659,7 +24659,7 @@ def __init__(self, *args, **kwargs): def _export_request_rate_by_interval_initial( self, location: str, parameters: Union[_models.RequestRateByIntervalInput, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24836,7 +24836,7 @@ def get_long_running_output(pipeline_response): def _export_throttled_requests_initial( self, location: str, parameters: Union[_models.ThrottledRequestsInput, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25046,7 +25046,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.RunCommandDocu api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.RunCommandListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25119,7 +25119,7 @@ def get(self, location: str, command_id: str, **kwargs: Any) -> _models.RunComma :rtype: ~azure.mgmt.compute.v2021_04_01.models.RunCommandDocument :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25169,7 +25169,7 @@ def _create_or_update_initial( run_command: Union[_models.VirtualMachineRunCommand, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25378,7 +25378,7 @@ def _update_initial( run_command: Union[_models.VirtualMachineRunCommandUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25583,7 +25583,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_name: str, run_command_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25713,7 +25713,7 @@ def get_by_virtual_machine( :rtype: ~azure.mgmt.compute.v2021_04_01.models.VirtualMachineRunCommand :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25781,7 +25781,7 @@ def list_by_virtual_machine( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.VirtualMachineRunCommandsListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25874,7 +25874,7 @@ def _create_or_update_initial( run_command: Union[_models.VirtualMachineRunCommand, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26092,7 +26092,7 @@ def _update_initial( run_command: Union[_models.VirtualMachineRunCommandUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26305,7 +26305,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, run_command_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26441,7 +26441,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_04_01.models.VirtualMachineRunCommand :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26518,7 +26518,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.VirtualMachineRunCommandsListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26606,7 +26606,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.Disk, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26790,7 +26790,7 @@ def get_long_running_output(pipeline_response): def _update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.DiskUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26985,7 +26985,7 @@ def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> _model :rtype: ~azure.mgmt.compute.v2021_04_01.models.Disk :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -27028,7 +27028,7 @@ def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> _model return deserialized # type: ignore def _delete_initial(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -27145,7 +27145,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -27220,7 +27220,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Disk"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -27287,7 +27287,7 @@ def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -27477,7 +27477,7 @@ def get_long_running_output(pipeline_response): ) def _revoke_access_initial(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -27604,7 +27604,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, snapshot_name: str, snapshot: Union[_models.Snapshot, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -27792,7 +27792,7 @@ def _update_initial( snapshot: Union[_models.SnapshotUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -27993,7 +27993,7 @@ def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> _m :rtype: ~azure.mgmt.compute.v2021_04_01.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -28036,7 +28036,7 @@ def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> _m return deserialized # type: ignore def _delete_initial(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -28153,7 +28153,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -28228,7 +28228,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Snapshot"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -28295,7 +28295,7 @@ def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -28485,7 +28485,7 @@ def get_long_running_output(pipeline_response): ) def _revoke_access_initial(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -28616,7 +28616,7 @@ def _create_or_update_initial( disk_encryption_set: Union[_models.DiskEncryptionSet, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -28814,7 +28814,7 @@ def _update_initial( disk_encryption_set: Union[_models.DiskEncryptionSetUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -29020,7 +29020,7 @@ def get(self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: :rtype: ~azure.mgmt.compute.v2021_04_01.models.DiskEncryptionSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -29065,7 +29065,7 @@ def get(self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: def _delete_initial( self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -29182,7 +29182,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -29257,7 +29257,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.DiskEncryptionSet"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -29339,7 +29339,7 @@ def list_associated_resources( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.ResourceUriList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -29429,7 +29429,7 @@ def _create_or_update_initial( disk_access: Union[_models.DiskAccess, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -29623,7 +29623,7 @@ def _update_initial( disk_access: Union[_models.DiskAccessUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -29824,7 +29824,7 @@ def get(self, resource_group_name: str, disk_access_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.compute.v2021_04_01.models.DiskAccess :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -29867,7 +29867,7 @@ def get(self, resource_group_name: str, disk_access_name: str, **kwargs: Any) -> return deserialized # type: ignore def _delete_initial(self, resource_group_name: str, disk_access_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -29984,7 +29984,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.DiskAccessList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -30059,7 +30059,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.DiskAccess"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.DiskAccessList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -30135,7 +30135,7 @@ def get_private_link_resources( :rtype: ~azure.mgmt.compute.v2021_04_01.models.PrivateLinkResourceListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -30185,7 +30185,7 @@ def _update_a_private_endpoint_connection_initial( # pylint: disable=name-too-l private_endpoint_connection: Union[_models.PrivateEndpointConnection, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -30413,7 +30413,7 @@ def get_a_private_endpoint_connection( :rtype: ~azure.mgmt.compute.v2021_04_01.models.PrivateEndpointConnection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -30459,7 +30459,7 @@ def get_a_private_endpoint_connection( def _delete_a_private_endpoint_connection_initial( # pylint: disable=name-too-long self, resource_group_name: str, disk_access_name: str, private_endpoint_connection_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -30590,7 +30590,7 @@ def list_private_endpoint_connections( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.PrivateEndpointConnectionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -30698,7 +30698,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_04_01.models.DiskRestorePoint :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -30766,7 +30766,7 @@ def list_by_restore_point( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-04-01")) cls: ClsType[_models.DiskRestorePointList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -30838,7 +30838,7 @@ def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -31057,7 +31057,7 @@ def _revoke_access_initial( disk_restore_point_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/__init__.py index 3b1b6244b2375..ab7c46e8991db 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/__init__.py @@ -5,15 +5,21 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._compute_management_client import ComputeManagementClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._compute_management_client import ComputeManagementClient # 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__ = [ "ComputeManagementClient", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/_compute_management_client.py index 620b59d0756ea..893ea61686bad 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/_compute_management_client.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/_compute_management_client.py @@ -61,11 +61,10 @@ ) if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class ComputeManagementClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes +class ComputeManagementClient: # pylint: disable=too-many-instance-attributes """Compute Client. :ivar operations: Operations operations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/_configuration.py index c3a833034682a..7f81b881095b5 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/_configuration.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/_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 ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ComputeManagementClient. Note that all parameters used to create this instance are saved as instance diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/_version.py index d79b2760319c5..e5754a47ce68f 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "33.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/aio/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/aio/__init__.py index 0715f50185586..d3fd1ba93379a 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/aio/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/aio/__init__.py @@ -5,12 +5,18 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._compute_management_client import ComputeManagementClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._compute_management_client import ComputeManagementClient # 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__ = [ "ComputeManagementClient", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/aio/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/aio/_compute_management_client.py index 76cdd9a748041..05616bbced51c 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/aio/_compute_management_client.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/aio/_compute_management_client.py @@ -61,11 +61,10 @@ ) if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class ComputeManagementClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes +class ComputeManagementClient: # pylint: disable=too-many-instance-attributes """Compute Client. :ivar operations: Operations operations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/aio/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/aio/_configuration.py index e50af76cac791..427c7edc62d1a 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/aio/_configuration.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/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 ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ComputeManagementClient. Note that all parameters used to create this instance are saved as instance diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/aio/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/aio/operations/__init__.py index 4b5353dd63294..240530fe0fdb1 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/aio/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/aio/operations/__init__.py @@ -5,49 +5,55 @@ # Code generated by Microsoft (R) AutoRest 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 AvailabilitySetsOperations -from ._operations import ProximityPlacementGroupsOperations -from ._operations import DedicatedHostGroupsOperations -from ._operations import DedicatedHostsOperations -from ._operations import SshPublicKeysOperations -from ._operations import VirtualMachineExtensionImagesOperations -from ._operations import VirtualMachineExtensionsOperations -from ._operations import VirtualMachineImagesOperations -from ._operations import VirtualMachineImagesEdgeZoneOperations -from ._operations import UsageOperations -from ._operations import VirtualMachinesOperations -from ._operations import VirtualMachineScaleSetsOperations -from ._operations import VirtualMachineSizesOperations -from ._operations import ImagesOperations -from ._operations import RestorePointCollectionsOperations -from ._operations import RestorePointsOperations -from ._operations import CapacityReservationGroupsOperations -from ._operations import CapacityReservationsOperations -from ._operations import VirtualMachineScaleSetExtensionsOperations -from ._operations import VirtualMachineScaleSetRollingUpgradesOperations -from ._operations import VirtualMachineScaleSetVMExtensionsOperations -from ._operations import VirtualMachineScaleSetVMsOperations -from ._operations import LogAnalyticsOperations -from ._operations import VirtualMachineRunCommandsOperations -from ._operations import VirtualMachineScaleSetVMRunCommandsOperations -from ._operations import ResourceSkusOperations -from ._operations import GalleriesOperations -from ._operations import GalleryImagesOperations -from ._operations import GalleryImageVersionsOperations -from ._operations import GalleryApplicationsOperations -from ._operations import GalleryApplicationVersionsOperations -from ._operations import GallerySharingProfileOperations -from ._operations import SharedGalleriesOperations -from ._operations import SharedGalleryImagesOperations -from ._operations import SharedGalleryImageVersionsOperations -from ._operations import CommunityGalleriesOperations -from ._operations import CommunityGalleryImagesOperations -from ._operations import CommunityGalleryImageVersionsOperations +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 AvailabilitySetsOperations # type: ignore +from ._operations import ProximityPlacementGroupsOperations # type: ignore +from ._operations import DedicatedHostGroupsOperations # type: ignore +from ._operations import DedicatedHostsOperations # type: ignore +from ._operations import SshPublicKeysOperations # type: ignore +from ._operations import VirtualMachineExtensionImagesOperations # type: ignore +from ._operations import VirtualMachineExtensionsOperations # type: ignore +from ._operations import VirtualMachineImagesOperations # type: ignore +from ._operations import VirtualMachineImagesEdgeZoneOperations # type: ignore +from ._operations import UsageOperations # type: ignore +from ._operations import VirtualMachinesOperations # type: ignore +from ._operations import VirtualMachineScaleSetsOperations # type: ignore +from ._operations import VirtualMachineSizesOperations # type: ignore +from ._operations import ImagesOperations # type: ignore +from ._operations import RestorePointCollectionsOperations # type: ignore +from ._operations import RestorePointsOperations # type: ignore +from ._operations import CapacityReservationGroupsOperations # type: ignore +from ._operations import CapacityReservationsOperations # type: ignore +from ._operations import VirtualMachineScaleSetExtensionsOperations # type: ignore +from ._operations import VirtualMachineScaleSetRollingUpgradesOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMExtensionsOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMsOperations # type: ignore +from ._operations import LogAnalyticsOperations # type: ignore +from ._operations import VirtualMachineRunCommandsOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMRunCommandsOperations # type: ignore +from ._operations import ResourceSkusOperations # type: ignore +from ._operations import GalleriesOperations # type: ignore +from ._operations import GalleryImagesOperations # type: ignore +from ._operations import GalleryImageVersionsOperations # type: ignore +from ._operations import GalleryApplicationsOperations # type: ignore +from ._operations import GalleryApplicationVersionsOperations # type: ignore +from ._operations import GallerySharingProfileOperations # type: ignore +from ._operations import SharedGalleriesOperations # type: ignore +from ._operations import SharedGalleryImagesOperations # type: ignore +from ._operations import SharedGalleryImageVersionsOperations # type: ignore +from ._operations import CommunityGalleriesOperations # type: ignore +from ._operations import CommunityGalleryImagesOperations # type: ignore +from ._operations import CommunityGalleryImageVersionsOperations # 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__ = [ @@ -91,5 +97,5 @@ "CommunityGalleryImagesOperations", "CommunityGalleryImageVersionsOperations", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/aio/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/aio/operations/_operations.py index aef77ede943d7..6ebd2a92ec643 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/aio/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/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. @@ -8,21 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import ( - Any, - AsyncIterable, - AsyncIterator, - Callable, - Dict, - IO, - List, - Optional, - Type, - TypeVar, - Union, - cast, - overload, -) +from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, List, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -259,7 +245,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]] @@ -300,7 +286,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.ComputeOperationValue"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.ComputeOperationListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -453,7 +439,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2021_07_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -580,7 +566,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2021_07_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -635,9 +621,7 @@ async def update( return deserialized # type: ignore @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, availability_set_name: str, **kwargs: Any - ) -> None: + async def delete(self, resource_group_name: str, availability_set_name: str, **kwargs: Any) -> None: """Delete an availability set. :param resource_group_name: The name of the resource group. Required. @@ -648,7 +632,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -698,7 +682,7 @@ async def get(self, resource_group_name: str, availability_set_name: str, **kwar :rtype: ~azure.mgmt.compute.v2021_07_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -760,7 +744,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -838,7 +822,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -921,7 +905,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1079,7 +1063,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2021_07_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1209,7 +1193,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2021_07_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1264,9 +1248,7 @@ async def update( return deserialized # type: ignore @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, proximity_placement_group_name: str, **kwargs: Any - ) -> None: + async def delete(self, resource_group_name: str, proximity_placement_group_name: str, **kwargs: Any) -> None: """Delete a proximity placement group. :param resource_group_name: The name of the resource group. Required. @@ -1277,7 +1259,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1337,7 +1319,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1396,7 +1378,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Proximit api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1476,7 +1458,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1637,7 +1619,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2021_07_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1764,7 +1746,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2021_07_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1819,9 +1801,7 @@ async def update( return deserialized # type: ignore @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, host_group_name: str, **kwargs: Any - ) -> None: + async def delete(self, resource_group_name: str, host_group_name: str, **kwargs: Any) -> None: """Delete a dedicated host group. :param resource_group_name: The name of the resource group. Required. @@ -1832,7 +1812,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1894,7 +1874,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1957,7 +1937,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2034,7 +2014,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Dedicate api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2123,7 +2103,7 @@ async def _create_or_update_initial( parameters: Union[_models.DedicatedHost, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2327,7 +2307,7 @@ async def _update_initial( parameters: Union[_models.DedicatedHostUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2526,7 +2506,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2657,7 +2637,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.DedicatedHost :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2723,7 +2703,7 @@ def list_by_host_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.DedicatedHostListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2823,7 +2803,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.SshPubli api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2904,7 +2884,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3038,7 +3018,7 @@ async def create( :rtype: ~azure.mgmt.compute.v2021_07_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3166,7 +3146,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2021_07_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3221,9 +3201,7 @@ async def update( return deserialized # type: ignore @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, ssh_public_key_name: str, **kwargs: Any - ) -> None: + async def delete(self, resource_group_name: str, ssh_public_key_name: str, **kwargs: Any) -> None: """Delete an SSH public key. :param resource_group_name: The name of the resource group. Required. @@ -3234,7 +3212,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3286,7 +3264,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3344,7 +3322,7 @@ async def generate_key_pair( :rtype: ~azure.mgmt.compute.v2021_07_01.models.SshPublicKeyGenerateKeyPairResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3425,7 +3403,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.VirtualMachineExtensionImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3483,7 +3461,7 @@ async def list_types( :rtype: list[~azure.mgmt.compute.v2021_07_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3555,7 +3533,7 @@ async def list_versions( :rtype: list[~azure.mgmt.compute.v2021_07_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3630,7 +3608,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineExtension, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3840,7 +3818,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineExtensionUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4046,7 +4024,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_name: str, vm_extension_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4176,7 +4154,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.VirtualMachineExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4236,7 +4214,7 @@ async def list( :rtype: ~azure.mgmt.compute.v2021_07_01.models.VirtualMachineExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4320,7 +4298,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4399,7 +4377,7 @@ async def list( :rtype: list[~azure.mgmt.compute.v2021_07_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4460,7 +4438,7 @@ async def list_offers( :rtype: list[~azure.mgmt.compute.v2021_07_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4512,7 +4490,7 @@ async def list_publishers(self, location: str, **kwargs: Any) -> List[_models.Vi :rtype: list[~azure.mgmt.compute.v2021_07_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4569,7 +4547,7 @@ async def list_skus( :rtype: list[~azure.mgmt.compute.v2021_07_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4655,7 +4633,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4740,7 +4718,7 @@ async def list( :rtype: list[~azure.mgmt.compute.v2021_07_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4805,7 +4783,7 @@ async def list_offers( :rtype: list[~azure.mgmt.compute.v2021_07_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4862,7 +4840,7 @@ async def list_publishers( :rtype: list[~azure.mgmt.compute.v2021_07_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4923,7 +4901,7 @@ async def list_skus( :rtype: list[~azure.mgmt.compute.v2021_07_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5005,7 +4983,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.Usage"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.ListUsagesResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5105,7 +5083,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> AsyncIterable["_mode api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5173,7 +5151,7 @@ async def _capture_initial( parameters: Union[_models.VirtualMachineCaptureParameters, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5371,7 +5349,7 @@ async def _create_or_update_initial( parameters: Union[_models.VirtualMachine, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5566,7 +5544,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5754,7 +5732,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_name: str, *, force_deletion: Optional[bool] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5885,7 +5863,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.VirtualMachine :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5942,7 +5920,7 @@ async def instance_view( :rtype: ~azure.mgmt.compute.v2021_07_01.models.VirtualMachineInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5987,7 +5965,7 @@ async def instance_view( async def _convert_to_managed_disks_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6092,7 +6070,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _deallocate_initial( self, resource_group_name: str, vm_name: str, *, hibernate: Optional[bool] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6200,9 +6178,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace_async - async def generalize( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, vm_name: str, **kwargs: Any - ) -> None: + async def generalize(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> None: """Sets the OS state of the virtual machine to generalized. It is recommended to sysprep the virtual machine before performing this operation. :code:`
`For Windows, please refer to `Create a managed image of a generalized VM in Azure @@ -6218,7 +6194,7 @@ async def generalize( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6274,7 +6250,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6354,7 +6330,7 @@ def list_all(self, *, status_only: Optional[str] = None, **kwargs: Any) -> Async api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6437,7 +6413,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6502,7 +6478,7 @@ async def get_next(next_link=None): async def _power_off_initial( self, resource_group_name: str, vm_name: str, *, skip_shutdown: bool = False, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6611,7 +6587,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _reapply_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6711,7 +6687,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _restart_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6811,7 +6787,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _start_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6911,7 +6887,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _redeploy_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7017,7 +6993,7 @@ async def _reimage_initial( parameters: Optional[Union[_models.VirtualMachineReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7222,7 +7198,7 @@ async def retrieve_boot_diagnostics_data( :rtype: ~azure.mgmt.compute.v2021_07_01.models.RetrieveBootDiagnosticsDataResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7268,7 +7244,7 @@ async def retrieve_boot_diagnostics_data( async def _perform_maintenance_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7370,9 +7346,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace_async - async def simulate_eviction( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, vm_name: str, **kwargs: Any - ) -> None: + async def simulate_eviction(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> None: """The operation to simulate the eviction of spot virtual machine. :param resource_group_name: The name of the resource group. Required. @@ -7383,7 +7357,7 @@ async def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7424,7 +7398,7 @@ async def simulate_eviction( # pylint: disable=inconsistent-return-statements async def _assess_patches_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7540,7 +7514,7 @@ async def _install_patches_initial( install_patches_input: Union[_models.VirtualMachineInstallPatchesParameters, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7738,7 +7712,7 @@ async def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7965,7 +7939,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> AsyncIterable["_mode api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8033,7 +8007,7 @@ async def _create_or_update_initial( parameters: Union[_models.VirtualMachineScaleSet, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8225,7 +8199,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineScaleSetUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8414,7 +8388,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, *, force_deletion: Optional[bool] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8543,7 +8517,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.VirtualMachineScaleSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8593,7 +8567,7 @@ async def _deallocate_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8790,7 +8764,7 @@ async def _delete_instances_initial( force_deletion: Optional[bool] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8998,7 +8972,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2021_07_01.models.VirtualMachineScaleSetInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9058,7 +9032,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9137,7 +9111,7 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.VirtualMachineScaleS api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.VirtualMachineScaleSetListWithLinkResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9220,7 +9194,7 @@ def list_skus( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.VirtualMachineScaleSetListSkusResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9286,6 +9260,7 @@ async def get_next(next_link=None): def get_os_upgrade_history( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> AsyncIterable["_models.UpgradeOperationHistoricalStatusInfo"]: + # pylint: disable=line-too-long """Gets list of OS upgrades on a VM scale set instance. :param resource_group_name: The name of the resource group. Required. @@ -9304,7 +9279,7 @@ def get_os_upgrade_history( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.VirtualMachineScaleSetListOSUpgradeHistory] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9375,7 +9350,7 @@ async def _power_off_initial( skip_shutdown: bool = False, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9588,7 +9563,7 @@ async def _restart_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9777,7 +9752,7 @@ async def _start_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9966,7 +9941,7 @@ async def _redeploy_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10158,7 +10133,7 @@ async def _perform_maintenance_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10356,7 +10331,7 @@ async def _update_instances_initial( vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10542,7 +10517,7 @@ async def _reimage_initial( vm_scale_set_reimage_input: Optional[Union[_models.VirtualMachineScaleSetReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10735,7 +10710,7 @@ async def _reimage_all_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10938,7 +10913,7 @@ async def force_recovery_service_fabric_platform_update_domain_walk( # pylint: :rtype: ~azure.mgmt.compute.v2021_07_01.models.RecoveryWalkResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10982,7 +10957,7 @@ async def force_recovery_service_fabric_platform_update_domain_walk( # pylint: return deserialized # type: ignore @overload - async def convert_to_single_placement_group( # pylint: disable=inconsistent-return-statements + async def convert_to_single_placement_group( self, resource_group_name: str, vm_scale_set_name: str, @@ -11010,7 +10985,7 @@ async def convert_to_single_placement_group( # pylint: disable=inconsistent-ret """ @overload - async def convert_to_single_placement_group( # pylint: disable=inconsistent-return-statements + async def convert_to_single_placement_group( self, resource_group_name: str, vm_scale_set_name: str, @@ -11037,7 +11012,7 @@ async def convert_to_single_placement_group( # pylint: disable=inconsistent-ret """ @distributed_trace_async - async def convert_to_single_placement_group( # pylint: disable=inconsistent-return-statements + async def convert_to_single_placement_group( self, resource_group_name: str, vm_scale_set_name: str, @@ -11060,7 +11035,7 @@ async def convert_to_single_placement_group( # pylint: disable=inconsistent-ret :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11117,7 +11092,7 @@ async def _set_orchestration_service_state_initial( parameters: Union[_models.OrchestrationServiceStateInput, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11335,7 +11310,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.VirtualMa api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11420,7 +11395,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, image_name: str, parameters: Union[_models.Image, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11602,7 +11577,7 @@ async def _update_initial( parameters: Union[_models.ImageUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11782,7 +11757,7 @@ def get_long_running_output(pipeline_response): ) async def _delete_initial(self, resource_group_name: str, image_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11897,7 +11872,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.Image :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11956,7 +11931,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12032,7 +12007,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Image"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12194,7 +12169,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2021_07_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12324,7 +12299,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2021_07_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12381,7 +12356,7 @@ async def update( async def _delete_initial( self, resource_group_name: str, restore_point_collection_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12507,7 +12482,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12568,7 +12543,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.RestorePointCollectionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12647,7 +12622,7 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.RestorePointCollecti api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.RestorePointCollectionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12736,7 +12711,7 @@ async def _create_initial( parameters: Union[_models.RestorePoint, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12935,7 +12910,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, restore_point_collection_name: str, restore_point_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13056,7 +13031,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.RestorePoint :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13199,7 +13174,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2021_07_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13332,7 +13307,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2021_07_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13387,9 +13362,7 @@ async def update( return deserialized # type: ignore @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, capacity_reservation_group_name: str, **kwargs: Any - ) -> None: + async def delete(self, resource_group_name: str, capacity_reservation_group_name: str, **kwargs: Any) -> None: """The operation to delete a capacity reservation group. This operation is allowed only if all the associated resources are disassociated from the reservation group and all capacity reservations under the reservation group have also been deleted. Please refer to @@ -13403,7 +13376,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13467,7 +13440,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13541,7 +13514,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.CapacityReservationGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13628,7 +13601,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.CapacityReservationGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13718,7 +13691,7 @@ async def _create_or_update_initial( parameters: Union[_models.CapacityReservation, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13928,7 +13901,7 @@ async def _update_initial( parameters: Union[_models.CapacityReservationUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14131,7 +14104,7 @@ async def _delete_initial( capacity_reservation_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14269,7 +14242,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.CapacityReservation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14335,7 +14308,7 @@ def list_by_capacity_reservation_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.CapacityReservationListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14426,7 +14399,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtension, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14637,7 +14610,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtensionUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14844,7 +14817,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, vmss_extension_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14974,7 +14947,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.VirtualMachineScaleSetExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15040,7 +15013,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.VirtualMachineScaleSetExtensionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15126,7 +15099,7 @@ def __init__(self, *args, **kwargs) -> None: async def _cancel_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15230,7 +15203,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_os_upgrade_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15336,7 +15309,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_extension_upgrade_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15453,7 +15426,7 @@ async def get_latest( :rtype: ~azure.mgmt.compute.v2021_07_01.models.RollingUpgradeStatusInfo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15525,7 +15498,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetVMExtension, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15745,7 +15718,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetVMExtensionUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15960,7 +15933,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, vm_extension_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16096,7 +16069,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.VirtualMachineScaleSetVMExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16165,7 +16138,7 @@ async def list( :rtype: ~azure.mgmt.compute.v2021_07_01.models.VirtualMachineScaleSetVMExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16242,7 +16215,7 @@ async def _reimage_initial( ] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16441,7 +16414,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _reimage_all_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16550,7 +16523,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _deallocate_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16665,7 +16638,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineScaleSetVM, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16875,7 +16848,7 @@ async def _delete_initial( force_deletion: Optional[bool] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17017,7 +16990,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.VirtualMachineScaleSetVM :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17077,7 +17050,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2021_07_01.models.VirtualMachineScaleSetVMInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17159,7 +17132,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.VirtualMachineScaleSetVMListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17233,7 +17206,7 @@ async def _power_off_initial( skip_shutdown: bool = False, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17355,7 +17328,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _restart_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17463,7 +17436,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17571,7 +17544,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _redeploy_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17705,7 +17678,7 @@ async def retrieve_boot_diagnostics_data( :rtype: ~azure.mgmt.compute.v2021_07_01.models.RetrieveBootDiagnosticsDataResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17752,7 +17725,7 @@ async def retrieve_boot_diagnostics_data( async def _perform_maintenance_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17858,7 +17831,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace_async - async def simulate_eviction( # pylint: disable=inconsistent-return-statements + async def simulate_eviction( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: """The operation to simulate the eviction of spot virtual machine in a VM scale set. @@ -17873,7 +17846,7 @@ async def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17920,7 +17893,7 @@ async def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18142,7 +18115,7 @@ def __init__(self, *args, **kwargs) -> None: async def _export_request_rate_by_interval_initial( self, location: str, parameters: Union[_models.RequestRateByIntervalInput, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18320,7 +18293,7 @@ def get_long_running_output(pipeline_response): async def _export_throttled_requests_initial( self, location: str, parameters: Union[_models.ThrottledRequestsInput, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18531,7 +18504,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.RunComman api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.RunCommandListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18604,7 +18577,7 @@ async def get(self, location: str, command_id: str, **kwargs: Any) -> _models.Ru :rtype: ~azure.mgmt.compute.v2021_07_01.models.RunCommandDocument :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18654,7 +18627,7 @@ async def _create_or_update_initial( run_command: Union[_models.VirtualMachineRunCommand, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18863,7 +18836,7 @@ async def _update_initial( run_command: Union[_models.VirtualMachineRunCommandUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19068,7 +19041,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_name: str, run_command_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19198,7 +19171,7 @@ async def get_by_virtual_machine( :rtype: ~azure.mgmt.compute.v2021_07_01.models.VirtualMachineRunCommand :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19266,7 +19239,7 @@ def list_by_virtual_machine( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.VirtualMachineRunCommandsListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19359,7 +19332,7 @@ async def _create_or_update_initial( run_command: Union[_models.VirtualMachineRunCommand, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19577,7 +19550,7 @@ async def _update_initial( run_command: Union[_models.VirtualMachineRunCommandUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19790,7 +19763,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, run_command_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19926,7 +19899,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.VirtualMachineRunCommand :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20003,7 +19976,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.VirtualMachineRunCommandsListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20111,7 +20084,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.ResourceSkusResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20197,7 +20170,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, gallery_name: str, gallery: Union[_models.Gallery, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20390,7 +20363,7 @@ async def _update_initial( gallery: Union[_models.GalleryUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20600,7 +20573,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.Gallery :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20644,7 +20617,7 @@ async def get( return deserialized # type: ignore async def _delete_initial(self, resource_group_name: str, gallery_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20759,7 +20732,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.GalleryList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20834,7 +20807,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Gallery"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.GalleryList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20923,7 +20896,7 @@ async def _create_or_update_initial( gallery_image: Union[_models.GalleryImage, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21135,7 +21108,7 @@ async def _update_initial( gallery_image: Union[_models.GalleryImageUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21354,7 +21327,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.GalleryImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21400,7 +21373,7 @@ async def get( async def _delete_initial( self, resource_group_name: str, gallery_name: str, gallery_image_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21528,7 +21501,7 @@ def list_by_gallery( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.GalleryImageList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21620,7 +21593,7 @@ async def _create_or_update_initial( gallery_image_version: Union[_models.GalleryImageVersion, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21854,7 +21827,7 @@ async def _update_initial( gallery_image_version: Union[_models.GalleryImageVersionUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22110,7 +22083,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.GalleryImageVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22163,7 +22136,7 @@ async def _delete_initial( gallery_image_version_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22305,7 +22278,7 @@ def list_by_gallery_image( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.GalleryImageVersionList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22397,7 +22370,7 @@ async def _create_or_update_initial( gallery_application: Union[_models.GalleryApplication, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22613,7 +22586,7 @@ async def _update_initial( gallery_application: Union[_models.GalleryApplicationUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22839,7 +22812,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.GalleryApplication :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22885,7 +22858,7 @@ async def get( async def _delete_initial( self, resource_group_name: str, gallery_name: str, gallery_application_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23014,7 +22987,7 @@ def list_by_gallery( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.GalleryApplicationList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23106,7 +23079,7 @@ async def _create_or_update_initial( gallery_application_version: Union[_models.GalleryApplicationVersion, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23342,7 +23315,7 @@ async def _update_initial( gallery_application_version: Union[_models.GalleryApplicationVersionUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23600,7 +23573,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.GalleryApplicationVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23653,7 +23626,7 @@ async def _delete_initial( gallery_application_version_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23796,7 +23769,7 @@ def list_by_gallery_application( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.GalleryApplicationVersionList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23887,7 +23860,7 @@ async def _update_initial( sharing_update: Union[_models.SharingUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24115,7 +24088,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.SharedGalleryList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24189,7 +24162,7 @@ async def get(self, location: str, gallery_unique_name: str, **kwargs: Any) -> _ :rtype: ~azure.mgmt.compute.v2021_07_01.models.SharedGallery :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24281,7 +24254,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.SharedGalleryImageList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24361,7 +24334,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.SharedGalleryImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24459,7 +24432,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.SharedGalleryImageVersionList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24550,7 +24523,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.SharedGalleryImageVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24627,7 +24600,7 @@ async def get(self, location: str, public_gallery_name: str, **kwargs: Any) -> _ :rtype: ~azure.mgmt.compute.v2021_07_01.models.CommunityGallery :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24706,7 +24679,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.CommunityGalleryImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24796,7 +24769,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.CommunityGalleryImageVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/models/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/models/__init__.py index c9cc422cf42c0..413fb4402887f 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/models/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/models/__init__.py @@ -5,399 +5,410 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._models_py3 import AdditionalCapabilities -from ._models_py3 import AdditionalUnattendContent -from ._models_py3 import ApiEntityReference -from ._models_py3 import ApiError -from ._models_py3 import ApiErrorBase -from ._models_py3 import ApplicationProfile -from ._models_py3 import AutomaticOSUpgradePolicy -from ._models_py3 import AutomaticOSUpgradeProperties -from ._models_py3 import AutomaticRepairsPolicy -from ._models_py3 import AvailabilitySet -from ._models_py3 import AvailabilitySetListResult -from ._models_py3 import AvailabilitySetUpdate -from ._models_py3 import AvailablePatchSummary -from ._models_py3 import BillingProfile -from ._models_py3 import BootDiagnostics -from ._models_py3 import BootDiagnosticsInstanceView -from ._models_py3 import CapacityReservation -from ._models_py3 import CapacityReservationGroup -from ._models_py3 import CapacityReservationGroupInstanceView -from ._models_py3 import CapacityReservationGroupListResult -from ._models_py3 import CapacityReservationGroupUpdate -from ._models_py3 import CapacityReservationInstanceView -from ._models_py3 import CapacityReservationInstanceViewWithName -from ._models_py3 import CapacityReservationListResult -from ._models_py3 import CapacityReservationProfile -from ._models_py3 import CapacityReservationUpdate -from ._models_py3 import CapacityReservationUtilization -from ._models_py3 import CommunityGallery -from ._models_py3 import CommunityGalleryImage -from ._models_py3 import CommunityGalleryImageVersion -from ._models_py3 import ComputeOperationListResult -from ._models_py3 import ComputeOperationValue -from ._models_py3 import DataDisk -from ._models_py3 import DataDiskImage -from ._models_py3 import DataDiskImageEncryption -from ._models_py3 import DedicatedHost -from ._models_py3 import DedicatedHostAllocatableVM -from ._models_py3 import DedicatedHostAvailableCapacity -from ._models_py3 import DedicatedHostGroup -from ._models_py3 import DedicatedHostGroupInstanceView -from ._models_py3 import DedicatedHostGroupListResult -from ._models_py3 import DedicatedHostGroupUpdate -from ._models_py3 import DedicatedHostInstanceView -from ._models_py3 import DedicatedHostInstanceViewWithName -from ._models_py3 import DedicatedHostListResult -from ._models_py3 import DedicatedHostUpdate -from ._models_py3 import DiagnosticsProfile -from ._models_py3 import DiffDiskSettings -from ._models_py3 import Disallowed -from ._models_py3 import DisallowedConfiguration -from ._models_py3 import DiskEncryptionSetParameters -from ._models_py3 import DiskEncryptionSettings -from ._models_py3 import DiskImageEncryption -from ._models_py3 import DiskInstanceView -from ._models_py3 import EncryptionImages -from ._models_py3 import ExtendedLocation -from ._models_py3 import Gallery -from ._models_py3 import GalleryApplication -from ._models_py3 import GalleryApplicationList -from ._models_py3 import GalleryApplicationUpdate -from ._models_py3 import GalleryApplicationVersion -from ._models_py3 import GalleryApplicationVersionList -from ._models_py3 import GalleryApplicationVersionPublishingProfile -from ._models_py3 import GalleryApplicationVersionUpdate -from ._models_py3 import GalleryArtifactPublishingProfileBase -from ._models_py3 import GalleryArtifactSource -from ._models_py3 import GalleryArtifactVersionSource -from ._models_py3 import GalleryDataDiskImage -from ._models_py3 import GalleryDiskImage -from ._models_py3 import GalleryIdentifier -from ._models_py3 import GalleryImage -from ._models_py3 import GalleryImageFeature -from ._models_py3 import GalleryImageIdentifier -from ._models_py3 import GalleryImageList -from ._models_py3 import GalleryImageUpdate -from ._models_py3 import GalleryImageVersion -from ._models_py3 import GalleryImageVersionList -from ._models_py3 import GalleryImageVersionPublishingProfile -from ._models_py3 import GalleryImageVersionStorageProfile -from ._models_py3 import GalleryImageVersionUpdate -from ._models_py3 import GalleryList -from ._models_py3 import GalleryOSDiskImage -from ._models_py3 import GalleryUpdate -from ._models_py3 import HardwareProfile -from ._models_py3 import Image -from ._models_py3 import ImageDataDisk -from ._models_py3 import ImageDisk -from ._models_py3 import ImageListResult -from ._models_py3 import ImageOSDisk -from ._models_py3 import ImagePurchasePlan -from ._models_py3 import ImageReference -from ._models_py3 import ImageStorageProfile -from ._models_py3 import ImageUpdate -from ._models_py3 import InnerError -from ._models_py3 import InstanceViewStatus -from ._models_py3 import KeyVaultKeyReference -from ._models_py3 import KeyVaultSecretReference -from ._models_py3 import LastPatchInstallationSummary -from ._models_py3 import LinuxConfiguration -from ._models_py3 import LinuxParameters -from ._models_py3 import LinuxPatchSettings -from ._models_py3 import ListUsagesResult -from ._models_py3 import LogAnalyticsInputBase -from ._models_py3 import LogAnalyticsOperationResult -from ._models_py3 import LogAnalyticsOutput -from ._models_py3 import MaintenanceRedeployStatus -from ._models_py3 import ManagedArtifact -from ._models_py3 import ManagedDiskParameters -from ._models_py3 import NetworkInterfaceReference -from ._models_py3 import NetworkProfile -from ._models_py3 import OSDisk -from ._models_py3 import OSDiskImage -from ._models_py3 import OSDiskImageEncryption -from ._models_py3 import OSProfile -from ._models_py3 import OrchestrationServiceStateInput -from ._models_py3 import OrchestrationServiceSummary -from ._models_py3 import PatchInstallationDetail -from ._models_py3 import PatchSettings -from ._models_py3 import PirCommunityGalleryResource -from ._models_py3 import PirResource -from ._models_py3 import PirSharedGalleryResource -from ._models_py3 import Plan -from ._models_py3 import ProximityPlacementGroup -from ._models_py3 import ProximityPlacementGroupListResult -from ._models_py3 import ProximityPlacementGroupUpdate -from ._models_py3 import ProxyResource -from ._models_py3 import PublicIPAddressSku -from ._models_py3 import PurchasePlan -from ._models_py3 import RecommendedMachineConfiguration -from ._models_py3 import RecoveryWalkResponse -from ._models_py3 import RegionalReplicationStatus -from ._models_py3 import ReplicationStatus -from ._models_py3 import RequestRateByIntervalInput -from ._models_py3 import Resource -from ._models_py3 import ResourceRange -from ._models_py3 import ResourceSku -from ._models_py3 import ResourceSkuCapabilities -from ._models_py3 import ResourceSkuCapacity -from ._models_py3 import ResourceSkuCosts -from ._models_py3 import ResourceSkuLocationInfo -from ._models_py3 import ResourceSkuRestrictionInfo -from ._models_py3 import ResourceSkuRestrictions -from ._models_py3 import ResourceSkuZoneDetails -from ._models_py3 import ResourceSkusResult -from ._models_py3 import RestorePoint -from ._models_py3 import RestorePointCollection -from ._models_py3 import RestorePointCollectionListResult -from ._models_py3 import RestorePointCollectionSourceProperties -from ._models_py3 import RestorePointCollectionUpdate -from ._models_py3 import RestorePointSourceMetadata -from ._models_py3 import RestorePointSourceVMDataDisk -from ._models_py3 import RestorePointSourceVMOSDisk -from ._models_py3 import RestorePointSourceVMStorageProfile -from ._models_py3 import RetrieveBootDiagnosticsDataResult -from ._models_py3 import RollbackStatusInfo -from ._models_py3 import RollingUpgradePolicy -from ._models_py3 import RollingUpgradeProgressInfo -from ._models_py3 import RollingUpgradeRunningStatus -from ._models_py3 import RollingUpgradeStatusInfo -from ._models_py3 import RunCommandDocument -from ._models_py3 import RunCommandDocumentBase -from ._models_py3 import RunCommandInput -from ._models_py3 import RunCommandInputParameter -from ._models_py3 import RunCommandListResult -from ._models_py3 import RunCommandParameterDefinition -from ._models_py3 import RunCommandResult -from ._models_py3 import ScaleInPolicy -from ._models_py3 import ScheduledEventsProfile -from ._models_py3 import SecurityProfile -from ._models_py3 import SharedGallery -from ._models_py3 import SharedGalleryImage -from ._models_py3 import SharedGalleryImageList -from ._models_py3 import SharedGalleryImageVersion -from ._models_py3 import SharedGalleryImageVersionList -from ._models_py3 import SharedGalleryList -from ._models_py3 import SharingProfile -from ._models_py3 import SharingProfileGroup -from ._models_py3 import SharingUpdate -from ._models_py3 import Sku -from ._models_py3 import SoftDeletePolicy -from ._models_py3 import SpotRestorePolicy -from ._models_py3 import SshConfiguration -from ._models_py3 import SshPublicKey -from ._models_py3 import SshPublicKeyGenerateKeyPairResult -from ._models_py3 import SshPublicKeyResource -from ._models_py3 import SshPublicKeyUpdateResource -from ._models_py3 import SshPublicKeysGroupListResult -from ._models_py3 import StorageProfile -from ._models_py3 import SubResource -from ._models_py3 import SubResourceReadOnly -from ._models_py3 import SubResourceWithColocationStatus -from ._models_py3 import TargetRegion -from ._models_py3 import TerminateNotificationProfile -from ._models_py3 import ThrottledRequestsInput -from ._models_py3 import UefiSettings -from ._models_py3 import UpdateResource -from ._models_py3 import UpdateResourceDefinition -from ._models_py3 import UpgradeOperationHistoricalStatusInfo -from ._models_py3 import UpgradeOperationHistoricalStatusInfoProperties -from ._models_py3 import UpgradeOperationHistoryStatus -from ._models_py3 import UpgradePolicy -from ._models_py3 import Usage -from ._models_py3 import UsageName -from ._models_py3 import UserArtifactManage -from ._models_py3 import UserArtifactSource -from ._models_py3 import UserAssignedIdentitiesValue -from ._models_py3 import VMGalleryApplication -from ._models_py3 import VMScaleSetConvertToSinglePlacementGroupInput -from ._models_py3 import VMSizeProperties -from ._models_py3 import VaultCertificate -from ._models_py3 import VaultSecretGroup -from ._models_py3 import VirtualHardDisk -from ._models_py3 import VirtualMachine -from ._models_py3 import VirtualMachineAgentInstanceView -from ._models_py3 import VirtualMachineAssessPatchesResult -from ._models_py3 import VirtualMachineCaptureParameters -from ._models_py3 import VirtualMachineCaptureResult -from ._models_py3 import VirtualMachineExtension -from ._models_py3 import VirtualMachineExtensionHandlerInstanceView -from ._models_py3 import VirtualMachineExtensionImage -from ._models_py3 import VirtualMachineExtensionInstanceView -from ._models_py3 import VirtualMachineExtensionUpdate -from ._models_py3 import VirtualMachineExtensionsListResult -from ._models_py3 import VirtualMachineHealthStatus -from ._models_py3 import VirtualMachineIdentity -from ._models_py3 import VirtualMachineImage -from ._models_py3 import VirtualMachineImageFeature -from ._models_py3 import VirtualMachineImageResource -from ._models_py3 import VirtualMachineInstallPatchesParameters -from ._models_py3 import VirtualMachineInstallPatchesResult -from ._models_py3 import VirtualMachineInstanceView -from ._models_py3 import VirtualMachineIpTag -from ._models_py3 import VirtualMachineListResult -from ._models_py3 import VirtualMachineNetworkInterfaceConfiguration -from ._models_py3 import VirtualMachineNetworkInterfaceDnsSettingsConfiguration -from ._models_py3 import VirtualMachineNetworkInterfaceIPConfiguration -from ._models_py3 import VirtualMachinePatchStatus -from ._models_py3 import VirtualMachinePublicIPAddressConfiguration -from ._models_py3 import VirtualMachinePublicIPAddressDnsSettingsConfiguration -from ._models_py3 import VirtualMachineReimageParameters -from ._models_py3 import VirtualMachineRunCommand -from ._models_py3 import VirtualMachineRunCommandInstanceView -from ._models_py3 import VirtualMachineRunCommandScriptSource -from ._models_py3 import VirtualMachineRunCommandUpdate -from ._models_py3 import VirtualMachineRunCommandsListResult -from ._models_py3 import VirtualMachineScaleSet -from ._models_py3 import VirtualMachineScaleSetDataDisk -from ._models_py3 import VirtualMachineScaleSetExtension -from ._models_py3 import VirtualMachineScaleSetExtensionListResult -from ._models_py3 import VirtualMachineScaleSetExtensionProfile -from ._models_py3 import VirtualMachineScaleSetExtensionUpdate -from ._models_py3 import VirtualMachineScaleSetIPConfiguration -from ._models_py3 import VirtualMachineScaleSetIdentity -from ._models_py3 import VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue -from ._models_py3 import VirtualMachineScaleSetInstanceView -from ._models_py3 import VirtualMachineScaleSetInstanceViewStatusesSummary -from ._models_py3 import VirtualMachineScaleSetIpTag -from ._models_py3 import VirtualMachineScaleSetListOSUpgradeHistory -from ._models_py3 import VirtualMachineScaleSetListResult -from ._models_py3 import VirtualMachineScaleSetListSkusResult -from ._models_py3 import VirtualMachineScaleSetListWithLinkResult -from ._models_py3 import VirtualMachineScaleSetManagedDiskParameters -from ._models_py3 import VirtualMachineScaleSetNetworkConfiguration -from ._models_py3 import VirtualMachineScaleSetNetworkConfigurationDnsSettings -from ._models_py3 import VirtualMachineScaleSetNetworkProfile -from ._models_py3 import VirtualMachineScaleSetOSDisk -from ._models_py3 import VirtualMachineScaleSetOSProfile -from ._models_py3 import VirtualMachineScaleSetPublicIPAddressConfiguration -from ._models_py3 import VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings -from ._models_py3 import VirtualMachineScaleSetReimageParameters -from ._models_py3 import VirtualMachineScaleSetSku -from ._models_py3 import VirtualMachineScaleSetSkuCapacity -from ._models_py3 import VirtualMachineScaleSetStorageProfile -from ._models_py3 import VirtualMachineScaleSetUpdate -from ._models_py3 import VirtualMachineScaleSetUpdateIPConfiguration -from ._models_py3 import VirtualMachineScaleSetUpdateNetworkConfiguration -from ._models_py3 import VirtualMachineScaleSetUpdateNetworkProfile -from ._models_py3 import VirtualMachineScaleSetUpdateOSDisk -from ._models_py3 import VirtualMachineScaleSetUpdateOSProfile -from ._models_py3 import VirtualMachineScaleSetUpdatePublicIPAddressConfiguration -from ._models_py3 import VirtualMachineScaleSetUpdateStorageProfile -from ._models_py3 import VirtualMachineScaleSetUpdateVMProfile -from ._models_py3 import VirtualMachineScaleSetVM -from ._models_py3 import VirtualMachineScaleSetVMExtension -from ._models_py3 import VirtualMachineScaleSetVMExtensionUpdate -from ._models_py3 import VirtualMachineScaleSetVMExtensionsListResult -from ._models_py3 import VirtualMachineScaleSetVMExtensionsSummary -from ._models_py3 import VirtualMachineScaleSetVMInstanceIDs -from ._models_py3 import VirtualMachineScaleSetVMInstanceRequiredIDs -from ._models_py3 import VirtualMachineScaleSetVMInstanceView -from ._models_py3 import VirtualMachineScaleSetVMListResult -from ._models_py3 import VirtualMachineScaleSetVMNetworkProfileConfiguration -from ._models_py3 import VirtualMachineScaleSetVMProfile -from ._models_py3 import VirtualMachineScaleSetVMProtectionPolicy -from ._models_py3 import VirtualMachineScaleSetVMReimageParameters -from ._models_py3 import VirtualMachineSize -from ._models_py3 import VirtualMachineSizeListResult -from ._models_py3 import VirtualMachineSoftwarePatchProperties -from ._models_py3 import VirtualMachineStatusCodeCount -from ._models_py3 import VirtualMachineUpdate -from ._models_py3 import WinRMConfiguration -from ._models_py3 import WinRMListener -from ._models_py3 import WindowsConfiguration -from ._models_py3 import WindowsParameters +from typing import TYPE_CHECKING -from ._compute_management_client_enums import AggregatedReplicationState -from ._compute_management_client_enums import AvailabilitySetSkuTypes -from ._compute_management_client_enums import CachingTypes -from ._compute_management_client_enums import CapacityReservationGroupInstanceViewTypes -from ._compute_management_client_enums import CapacityReservationInstanceViewTypes -from ._compute_management_client_enums import ConsistencyModeTypes -from ._compute_management_client_enums import DedicatedHostLicenseTypes -from ._compute_management_client_enums import DeleteOptions -from ._compute_management_client_enums import DiffDiskOptions -from ._compute_management_client_enums import DiffDiskPlacement -from ._compute_management_client_enums import DiskCreateOptionTypes -from ._compute_management_client_enums import DiskDeleteOptionTypes -from ._compute_management_client_enums import DiskDetachOptionTypes -from ._compute_management_client_enums import ExecutionState -from ._compute_management_client_enums import ExpandTypesForGetCapacityReservationGroups -from ._compute_management_client_enums import ExpandTypesForGetVMScaleSets -from ._compute_management_client_enums import ExtendedLocationType -from ._compute_management_client_enums import ExtendedLocationTypes -from ._compute_management_client_enums import GalleryApplicationVersionPropertiesProvisioningState -from ._compute_management_client_enums import GalleryImagePropertiesProvisioningState -from ._compute_management_client_enums import GalleryImageVersionPropertiesProvisioningState -from ._compute_management_client_enums import GalleryPropertiesProvisioningState -from ._compute_management_client_enums import GallerySharingPermissionTypes -from ._compute_management_client_enums import HostCaching -from ._compute_management_client_enums import HyperVGeneration -from ._compute_management_client_enums import HyperVGenerationType -from ._compute_management_client_enums import HyperVGenerationTypes -from ._compute_management_client_enums import IPVersion -from ._compute_management_client_enums import IPVersions -from ._compute_management_client_enums import InstanceViewTypes -from ._compute_management_client_enums import IntervalInMins -from ._compute_management_client_enums import LinuxPatchAssessmentMode -from ._compute_management_client_enums import LinuxVMGuestPatchMode -from ._compute_management_client_enums import MaintenanceOperationResultCodeTypes -from ._compute_management_client_enums import NetworkApiVersion -from ._compute_management_client_enums import OperatingSystemStateTypes -from ._compute_management_client_enums import OperatingSystemType -from ._compute_management_client_enums import OperatingSystemTypes -from ._compute_management_client_enums import OrchestrationMode -from ._compute_management_client_enums import OrchestrationServiceNames -from ._compute_management_client_enums import OrchestrationServiceState -from ._compute_management_client_enums import OrchestrationServiceStateAction -from ._compute_management_client_enums import PatchAssessmentState -from ._compute_management_client_enums import PatchInstallationState -from ._compute_management_client_enums import PatchOperationStatus -from ._compute_management_client_enums import ProtocolTypes -from ._compute_management_client_enums import ProximityPlacementGroupType -from ._compute_management_client_enums import PublicIPAddressSkuName -from ._compute_management_client_enums import PublicIPAddressSkuTier -from ._compute_management_client_enums import PublicIPAllocationMethod -from ._compute_management_client_enums import ReplicationMode -from ._compute_management_client_enums import ReplicationState -from ._compute_management_client_enums import ReplicationStatusTypes -from ._compute_management_client_enums import ResourceIdentityType -from ._compute_management_client_enums import ResourceSkuCapacityScaleType -from ._compute_management_client_enums import ResourceSkuRestrictionsReasonCode -from ._compute_management_client_enums import ResourceSkuRestrictionsType -from ._compute_management_client_enums import RestorePointCollectionExpandOptions -from ._compute_management_client_enums import RollingUpgradeActionType -from ._compute_management_client_enums import RollingUpgradeStatusCode -from ._compute_management_client_enums import SecurityTypes -from ._compute_management_client_enums import SelectPermissions -from ._compute_management_client_enums import SettingNames -from ._compute_management_client_enums import SharedToValues -from ._compute_management_client_enums import SharingProfileGroupTypes -from ._compute_management_client_enums import SharingUpdateOperationTypes -from ._compute_management_client_enums import StatusLevelTypes -from ._compute_management_client_enums import StorageAccountType -from ._compute_management_client_enums import StorageAccountTypes -from ._compute_management_client_enums import UpgradeMode -from ._compute_management_client_enums import UpgradeOperationInvoker -from ._compute_management_client_enums import UpgradeState -from ._compute_management_client_enums import VMGuestPatchClassificationLinux -from ._compute_management_client_enums import VMGuestPatchClassificationWindows -from ._compute_management_client_enums import VMGuestPatchRebootBehavior -from ._compute_management_client_enums import VMGuestPatchRebootSetting -from ._compute_management_client_enums import VMGuestPatchRebootStatus -from ._compute_management_client_enums import VirtualMachineEvictionPolicyTypes -from ._compute_management_client_enums import VirtualMachinePriorityTypes -from ._compute_management_client_enums import VirtualMachineScaleSetScaleInRules -from ._compute_management_client_enums import VirtualMachineScaleSetSkuScaleType -from ._compute_management_client_enums import VirtualMachineSizeTypes -from ._compute_management_client_enums import VmDiskTypes -from ._compute_management_client_enums import WindowsPatchAssessmentMode -from ._compute_management_client_enums import WindowsVMGuestPatchMode +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + + +from ._models_py3 import ( # type: ignore + AdditionalCapabilities, + AdditionalUnattendContent, + ApiEntityReference, + ApiError, + ApiErrorBase, + ApplicationProfile, + AutomaticOSUpgradePolicy, + AutomaticOSUpgradeProperties, + AutomaticRepairsPolicy, + AvailabilitySet, + AvailabilitySetListResult, + AvailabilitySetUpdate, + AvailablePatchSummary, + BillingProfile, + BootDiagnostics, + BootDiagnosticsInstanceView, + CapacityReservation, + CapacityReservationGroup, + CapacityReservationGroupInstanceView, + CapacityReservationGroupListResult, + CapacityReservationGroupUpdate, + CapacityReservationInstanceView, + CapacityReservationInstanceViewWithName, + CapacityReservationListResult, + CapacityReservationProfile, + CapacityReservationUpdate, + CapacityReservationUtilization, + CommunityGallery, + CommunityGalleryImage, + CommunityGalleryImageVersion, + ComputeOperationListResult, + ComputeOperationValue, + DataDisk, + DataDiskImage, + DataDiskImageEncryption, + DedicatedHost, + DedicatedHostAllocatableVM, + DedicatedHostAvailableCapacity, + DedicatedHostGroup, + DedicatedHostGroupInstanceView, + DedicatedHostGroupListResult, + DedicatedHostGroupUpdate, + DedicatedHostInstanceView, + DedicatedHostInstanceViewWithName, + DedicatedHostListResult, + DedicatedHostUpdate, + DiagnosticsProfile, + DiffDiskSettings, + Disallowed, + DisallowedConfiguration, + DiskEncryptionSetParameters, + DiskEncryptionSettings, + DiskImageEncryption, + DiskInstanceView, + EncryptionImages, + ExtendedLocation, + Gallery, + GalleryApplication, + GalleryApplicationList, + GalleryApplicationUpdate, + GalleryApplicationVersion, + GalleryApplicationVersionList, + GalleryApplicationVersionPublishingProfile, + GalleryApplicationVersionUpdate, + GalleryArtifactPublishingProfileBase, + GalleryArtifactSource, + GalleryArtifactVersionSource, + GalleryDataDiskImage, + GalleryDiskImage, + GalleryIdentifier, + GalleryImage, + GalleryImageFeature, + GalleryImageIdentifier, + GalleryImageList, + GalleryImageUpdate, + GalleryImageVersion, + GalleryImageVersionList, + GalleryImageVersionPublishingProfile, + GalleryImageVersionStorageProfile, + GalleryImageVersionUpdate, + GalleryList, + GalleryOSDiskImage, + GalleryUpdate, + HardwareProfile, + Image, + ImageDataDisk, + ImageDisk, + ImageListResult, + ImageOSDisk, + ImagePurchasePlan, + ImageReference, + ImageStorageProfile, + ImageUpdate, + InnerError, + InstanceViewStatus, + KeyVaultKeyReference, + KeyVaultSecretReference, + LastPatchInstallationSummary, + LinuxConfiguration, + LinuxParameters, + LinuxPatchSettings, + ListUsagesResult, + LogAnalyticsInputBase, + LogAnalyticsOperationResult, + LogAnalyticsOutput, + MaintenanceRedeployStatus, + ManagedArtifact, + ManagedDiskParameters, + NetworkInterfaceReference, + NetworkProfile, + OSDisk, + OSDiskImage, + OSDiskImageEncryption, + OSProfile, + OrchestrationServiceStateInput, + OrchestrationServiceSummary, + PatchInstallationDetail, + PatchSettings, + PirCommunityGalleryResource, + PirResource, + PirSharedGalleryResource, + Plan, + ProximityPlacementGroup, + ProximityPlacementGroupListResult, + ProximityPlacementGroupUpdate, + ProxyResource, + PublicIPAddressSku, + PurchasePlan, + RecommendedMachineConfiguration, + RecoveryWalkResponse, + RegionalReplicationStatus, + ReplicationStatus, + RequestRateByIntervalInput, + Resource, + ResourceRange, + ResourceSku, + ResourceSkuCapabilities, + ResourceSkuCapacity, + ResourceSkuCosts, + ResourceSkuLocationInfo, + ResourceSkuRestrictionInfo, + ResourceSkuRestrictions, + ResourceSkuZoneDetails, + ResourceSkusResult, + RestorePoint, + RestorePointCollection, + RestorePointCollectionListResult, + RestorePointCollectionSourceProperties, + RestorePointCollectionUpdate, + RestorePointSourceMetadata, + RestorePointSourceVMDataDisk, + RestorePointSourceVMOSDisk, + RestorePointSourceVMStorageProfile, + RetrieveBootDiagnosticsDataResult, + RollbackStatusInfo, + RollingUpgradePolicy, + RollingUpgradeProgressInfo, + RollingUpgradeRunningStatus, + RollingUpgradeStatusInfo, + RunCommandDocument, + RunCommandDocumentBase, + RunCommandInput, + RunCommandInputParameter, + RunCommandListResult, + RunCommandParameterDefinition, + RunCommandResult, + ScaleInPolicy, + ScheduledEventsProfile, + SecurityProfile, + SharedGallery, + SharedGalleryImage, + SharedGalleryImageList, + SharedGalleryImageVersion, + SharedGalleryImageVersionList, + SharedGalleryList, + SharingProfile, + SharingProfileGroup, + SharingUpdate, + Sku, + SoftDeletePolicy, + SpotRestorePolicy, + SshConfiguration, + SshPublicKey, + SshPublicKeyGenerateKeyPairResult, + SshPublicKeyResource, + SshPublicKeyUpdateResource, + SshPublicKeysGroupListResult, + StorageProfile, + SubResource, + SubResourceReadOnly, + SubResourceWithColocationStatus, + TargetRegion, + TerminateNotificationProfile, + ThrottledRequestsInput, + UefiSettings, + UpdateResource, + UpdateResourceDefinition, + UpgradeOperationHistoricalStatusInfo, + UpgradeOperationHistoricalStatusInfoProperties, + UpgradeOperationHistoryStatus, + UpgradePolicy, + Usage, + UsageName, + UserArtifactManage, + UserArtifactSource, + UserAssignedIdentitiesValue, + VMGalleryApplication, + VMScaleSetConvertToSinglePlacementGroupInput, + VMSizeProperties, + VaultCertificate, + VaultSecretGroup, + VirtualHardDisk, + VirtualMachine, + VirtualMachineAgentInstanceView, + VirtualMachineAssessPatchesResult, + VirtualMachineCaptureParameters, + VirtualMachineCaptureResult, + VirtualMachineExtension, + VirtualMachineExtensionHandlerInstanceView, + VirtualMachineExtensionImage, + VirtualMachineExtensionInstanceView, + VirtualMachineExtensionUpdate, + VirtualMachineExtensionsListResult, + VirtualMachineHealthStatus, + VirtualMachineIdentity, + VirtualMachineImage, + VirtualMachineImageFeature, + VirtualMachineImageResource, + VirtualMachineInstallPatchesParameters, + VirtualMachineInstallPatchesResult, + VirtualMachineInstanceView, + VirtualMachineIpTag, + VirtualMachineListResult, + VirtualMachineNetworkInterfaceConfiguration, + VirtualMachineNetworkInterfaceDnsSettingsConfiguration, + VirtualMachineNetworkInterfaceIPConfiguration, + VirtualMachinePatchStatus, + VirtualMachinePublicIPAddressConfiguration, + VirtualMachinePublicIPAddressDnsSettingsConfiguration, + VirtualMachineReimageParameters, + VirtualMachineRunCommand, + VirtualMachineRunCommandInstanceView, + VirtualMachineRunCommandScriptSource, + VirtualMachineRunCommandUpdate, + VirtualMachineRunCommandsListResult, + VirtualMachineScaleSet, + VirtualMachineScaleSetDataDisk, + VirtualMachineScaleSetExtension, + VirtualMachineScaleSetExtensionListResult, + VirtualMachineScaleSetExtensionProfile, + VirtualMachineScaleSetExtensionUpdate, + VirtualMachineScaleSetIPConfiguration, + VirtualMachineScaleSetIdentity, + VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue, + VirtualMachineScaleSetInstanceView, + VirtualMachineScaleSetInstanceViewStatusesSummary, + VirtualMachineScaleSetIpTag, + VirtualMachineScaleSetListOSUpgradeHistory, + VirtualMachineScaleSetListResult, + VirtualMachineScaleSetListSkusResult, + VirtualMachineScaleSetListWithLinkResult, + VirtualMachineScaleSetManagedDiskParameters, + VirtualMachineScaleSetNetworkConfiguration, + VirtualMachineScaleSetNetworkConfigurationDnsSettings, + VirtualMachineScaleSetNetworkProfile, + VirtualMachineScaleSetOSDisk, + VirtualMachineScaleSetOSProfile, + VirtualMachineScaleSetPublicIPAddressConfiguration, + VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings, + VirtualMachineScaleSetReimageParameters, + VirtualMachineScaleSetSku, + VirtualMachineScaleSetSkuCapacity, + VirtualMachineScaleSetStorageProfile, + VirtualMachineScaleSetUpdate, + VirtualMachineScaleSetUpdateIPConfiguration, + VirtualMachineScaleSetUpdateNetworkConfiguration, + VirtualMachineScaleSetUpdateNetworkProfile, + VirtualMachineScaleSetUpdateOSDisk, + VirtualMachineScaleSetUpdateOSProfile, + VirtualMachineScaleSetUpdatePublicIPAddressConfiguration, + VirtualMachineScaleSetUpdateStorageProfile, + VirtualMachineScaleSetUpdateVMProfile, + VirtualMachineScaleSetVM, + VirtualMachineScaleSetVMExtension, + VirtualMachineScaleSetVMExtensionUpdate, + VirtualMachineScaleSetVMExtensionsListResult, + VirtualMachineScaleSetVMExtensionsSummary, + VirtualMachineScaleSetVMInstanceIDs, + VirtualMachineScaleSetVMInstanceRequiredIDs, + VirtualMachineScaleSetVMInstanceView, + VirtualMachineScaleSetVMListResult, + VirtualMachineScaleSetVMNetworkProfileConfiguration, + VirtualMachineScaleSetVMProfile, + VirtualMachineScaleSetVMProtectionPolicy, + VirtualMachineScaleSetVMReimageParameters, + VirtualMachineSize, + VirtualMachineSizeListResult, + VirtualMachineSoftwarePatchProperties, + VirtualMachineStatusCodeCount, + VirtualMachineUpdate, + WinRMConfiguration, + WinRMListener, + WindowsConfiguration, + WindowsParameters, +) + +from ._compute_management_client_enums import ( # type: ignore + AggregatedReplicationState, + AvailabilitySetSkuTypes, + CachingTypes, + CapacityReservationGroupInstanceViewTypes, + CapacityReservationInstanceViewTypes, + ConsistencyModeTypes, + DedicatedHostLicenseTypes, + DeleteOptions, + DiffDiskOptions, + DiffDiskPlacement, + DiskCreateOptionTypes, + DiskDeleteOptionTypes, + DiskDetachOptionTypes, + ExecutionState, + ExpandTypesForGetCapacityReservationGroups, + ExpandTypesForGetVMScaleSets, + ExtendedLocationType, + ExtendedLocationTypes, + GalleryApplicationVersionPropertiesProvisioningState, + GalleryImagePropertiesProvisioningState, + GalleryImageVersionPropertiesProvisioningState, + GalleryPropertiesProvisioningState, + GallerySharingPermissionTypes, + HostCaching, + HyperVGeneration, + HyperVGenerationType, + HyperVGenerationTypes, + IPVersion, + IPVersions, + InstanceViewTypes, + IntervalInMins, + LinuxPatchAssessmentMode, + LinuxVMGuestPatchMode, + MaintenanceOperationResultCodeTypes, + NetworkApiVersion, + OperatingSystemStateTypes, + OperatingSystemType, + OperatingSystemTypes, + OrchestrationMode, + OrchestrationServiceNames, + OrchestrationServiceState, + OrchestrationServiceStateAction, + PatchAssessmentState, + PatchInstallationState, + PatchOperationStatus, + ProtocolTypes, + ProximityPlacementGroupType, + PublicIPAddressSkuName, + PublicIPAddressSkuTier, + PublicIPAllocationMethod, + ReplicationMode, + ReplicationState, + ReplicationStatusTypes, + ResourceIdentityType, + ResourceSkuCapacityScaleType, + ResourceSkuRestrictionsReasonCode, + ResourceSkuRestrictionsType, + RestorePointCollectionExpandOptions, + RollingUpgradeActionType, + RollingUpgradeStatusCode, + SecurityTypes, + SelectPermissions, + SettingNames, + SharedToValues, + SharingProfileGroupTypes, + SharingUpdateOperationTypes, + StatusLevelTypes, + StorageAccountType, + StorageAccountTypes, + UpgradeMode, + UpgradeOperationInvoker, + UpgradeState, + VMGuestPatchClassificationLinux, + VMGuestPatchClassificationWindows, + VMGuestPatchRebootBehavior, + VMGuestPatchRebootSetting, + VMGuestPatchRebootStatus, + VirtualMachineEvictionPolicyTypes, + VirtualMachinePriorityTypes, + VirtualMachineScaleSetScaleInRules, + VirtualMachineScaleSetSkuScaleType, + VirtualMachineSizeTypes, + VmDiskTypes, + WindowsPatchAssessmentMode, + WindowsVMGuestPatchMode, +) 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__ = [ @@ -791,5 +802,5 @@ "WindowsPatchAssessmentMode", "WindowsVMGuestPatchMode", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/models/_models_py3.py index e69c72ef62f3b..f2297467767ff 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/models/_models_py3.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/models/_models_py3.py @@ -1,5 +1,5 @@ -# 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. @@ -16,10 +16,9 @@ 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 if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object @@ -411,7 +410,7 @@ def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kw self.tags = tags -class AvailabilitySet(Resource): # pylint: disable=too-many-instance-attributes +class AvailabilitySet(Resource): """Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see `Availability sets @@ -831,7 +830,7 @@ def __init__(self, **kwargs: Any) -> None: self.status = None -class CapacityReservation(Resource): # pylint: disable=too-many-instance-attributes +class CapacityReservation(Resource): """Specifies information about the capacity reservation. Variables are only populated by the server, and will be ignored when sending a request. @@ -1419,7 +1418,7 @@ class CommunityGallery(PirCommunityGalleryResource): """ -class CommunityGalleryImage(PirCommunityGalleryResource): # pylint: disable=too-many-instance-attributes +class CommunityGalleryImage(PirCommunityGalleryResource): """Specifies information about the gallery image definition that you want to create or update. Variables are only populated by the server, and will be ignored when sending a request. @@ -1671,7 +1670,7 @@ def __init__(self, **kwargs: Any) -> None: self.provider = None -class DataDisk(_serialization.Model): # pylint: disable=too-many-instance-attributes +class DataDisk(_serialization.Model): """Describes a data disk. Variables are only populated by the server, and will be ignored when sending a request. @@ -1941,7 +1940,7 @@ def __init__(self, *, lun: int, disk_encryption_set_id: Optional[str] = None, ** self.lun = lun -class DedicatedHost(Resource): # pylint: disable=too-many-instance-attributes +class DedicatedHost(Resource): """Specifies information about the Dedicated host. Variables are only populated by the server, and will be ignored when sending a request. @@ -2954,7 +2953,7 @@ def __init__( self.soft_delete_policy = soft_delete_policy -class GalleryApplication(Resource): # pylint: disable=too-many-instance-attributes +class GalleryApplication(Resource): """Specifies information about the gallery Application Definition that you want to create or update. @@ -3785,7 +3784,7 @@ def __init__(self, **kwargs: Any) -> None: self.unique_name = None -class GalleryImage(Resource): # pylint: disable=too-many-instance-attributes +class GalleryImage(Resource): """Specifies information about the gallery image definition that you want to create or update. Variables are only populated by the server, and will be ignored when sending a request. @@ -4053,7 +4052,7 @@ def __init__(self, *, value: List["_models.GalleryImage"], next_link: Optional[s self.next_link = next_link -class GalleryImageUpdate(UpdateResourceDefinition): # pylint: disable=too-many-instance-attributes +class GalleryImageUpdate(UpdateResourceDefinition): """Specifies information about the gallery image definition that you want to update. Variables are only populated by the server, and will be ignored when sending a request. @@ -5561,7 +5560,7 @@ def __init__(self, *, secret_url: str, source_vault: "_models.SubResource", **kw self.source_vault = source_vault -class LastPatchInstallationSummary(_serialization.Model): # pylint: disable=too-many-instance-attributes +class LastPatchInstallationSummary(_serialization.Model): """Describes the properties of the last installed patch summary. Variables are only populated by the server, and will be ignored when sending a request. @@ -6292,7 +6291,7 @@ def __init__(self, **kwargs: Any) -> None: self.service_state = None -class OSDisk(_serialization.Model): # pylint: disable=too-many-instance-attributes +class OSDisk(_serialization.Model): """Specifies information about the operating system disk used by the virtual machine. :code:`
`:code:`
` For more information about disks, see `About disks and VHDs for Azure virtual machines `_. @@ -7417,7 +7416,7 @@ def __init__( self.max = max -class ResourceSku(_serialization.Model): # pylint: disable=too-many-instance-attributes +class ResourceSku(_serialization.Model): """Describes an available Compute SKU. Variables are only populated by the server, and will be ignored when sending a request. @@ -9068,7 +9067,7 @@ class SharedGallery(PirSharedGalleryResource): """ -class SharedGalleryImage(PirSharedGalleryResource): # pylint: disable=too-many-instance-attributes +class SharedGalleryImage(PirSharedGalleryResource): """Specifies information about the gallery image definition that you want to create or update. Variables are only populated by the server, and will be ignored when sending a request. @@ -10538,7 +10537,7 @@ def __init__(self, *, uri: Optional[str] = None, **kwargs: Any) -> None: self.uri = uri -class VirtualMachine(Resource): # pylint: disable=too-many-instance-attributes +class VirtualMachine(Resource): """Describes a Virtual Machine. Variables are only populated by the server, and will be ignored when sending a request. @@ -11114,7 +11113,7 @@ def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylin self.resources = None -class VirtualMachineExtension(Resource): # pylint: disable=too-many-instance-attributes +class VirtualMachineExtension(Resource): """Describes a Virtual Machine Extension. Variables are only populated by the server, and will be ignored when sending a request. @@ -11708,7 +11707,7 @@ def __init__( self.extended_location = extended_location -class VirtualMachineImage(VirtualMachineImageResource): # pylint: disable=too-many-instance-attributes +class VirtualMachineImage(VirtualMachineImageResource): """Describes a Virtual Machine Image. All required parameters must be populated in order to send to server. @@ -11917,7 +11916,7 @@ def __init__( self.linux_parameters = linux_parameters -class VirtualMachineInstallPatchesResult(_serialization.Model): # pylint: disable=too-many-instance-attributes +class VirtualMachineInstallPatchesResult(_serialization.Model): """The result summary of an installation operation. Variables are only populated by the server, and will be ignored when sending a request. @@ -12007,7 +12006,7 @@ def __init__(self, **kwargs: Any) -> None: self.error = None -class VirtualMachineInstanceView(_serialization.Model): # pylint: disable=too-many-instance-attributes +class VirtualMachineInstanceView(_serialization.Model): """The instance view of a virtual machine. Variables are only populated by the server, and will be ignored when sending a request. @@ -12670,7 +12669,7 @@ def __init__(self, *, temp_disk: Optional[bool] = None, **kwargs: Any) -> None: self.temp_disk = temp_disk -class VirtualMachineRunCommand(Resource): # pylint: disable=too-many-instance-attributes +class VirtualMachineRunCommand(Resource): """Describes a Virtual Machine run command. Variables are only populated by the server, and will be ignored when sending a request. @@ -12953,7 +12952,7 @@ def __init__( self.next_link = next_link -class VirtualMachineRunCommandUpdate(UpdateResource): # pylint: disable=too-many-instance-attributes +class VirtualMachineRunCommandUpdate(UpdateResource): """Describes a Virtual Machine run command. Variables are only populated by the server, and will be ignored when sending a request. @@ -13066,7 +13065,7 @@ def __init__( self.instance_view = None -class VirtualMachineScaleSet(Resource): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSet(Resource): """Describes a Virtual Machine Scale Set. Variables are only populated by the server, and will be ignored when sending a request. @@ -13429,7 +13428,7 @@ def __init__( self.disk_m_bps_read_write = disk_m_bps_read_write -class VirtualMachineScaleSetExtension(SubResourceReadOnly): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetExtension(SubResourceReadOnly): """Describes a Virtual Machine Scale Set Extension. Variables are only populated by the server, and will be ignored when sending a request. @@ -13637,7 +13636,7 @@ def __init__( self.extensions_time_budget = extensions_time_budget -class VirtualMachineScaleSetExtensionUpdate(SubResourceReadOnly): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetExtensionUpdate(SubResourceReadOnly): """Describes a Virtual Machine Scale Set Extension. Variables are only populated by the server, and will be ignored when sending a request. @@ -15022,7 +15021,7 @@ def __init__( self.data_disks = data_disks -class VirtualMachineScaleSetUpdate(UpdateResource): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetUpdate(UpdateResource): """Describes a Virtual Machine Scale Set. :ivar tags: Resource tags. @@ -15752,7 +15751,7 @@ def __init__( self.user_data = user_data -class VirtualMachineScaleSetVM(Resource): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetVM(Resource): """Describes a virtual machine scale set virtual machine. Variables are only populated by the server, and will be ignored when sending a request. @@ -16005,7 +16004,7 @@ def __init__( # pylint: disable=too-many-locals self.user_data = user_data -class VirtualMachineScaleSetVMExtension(SubResourceReadOnly): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetVMExtension(SubResourceReadOnly): """Describes a VMSS VM Extension. Variables are only populated by the server, and will be ignored when sending a request. @@ -16187,7 +16186,7 @@ def __init__(self, **kwargs: Any) -> None: self.statuses_summary = None -class VirtualMachineScaleSetVMExtensionUpdate(SubResourceReadOnly): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetVMExtensionUpdate(SubResourceReadOnly): """Describes a VMSS VM Extension. Variables are only populated by the server, and will be ignored when sending a request. @@ -16353,7 +16352,7 @@ def __init__(self, *, instance_ids: List[str], **kwargs: Any) -> None: self.instance_ids = instance_ids -class VirtualMachineScaleSetVMInstanceView(_serialization.Model): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetVMInstanceView(_serialization.Model): """The instance view of a virtual machine scale set VM. Variables are only populated by the server, and will be ignored when sending a request. @@ -16537,7 +16536,7 @@ def __init__( self.network_interface_configurations = network_interface_configurations -class VirtualMachineScaleSetVMProfile(_serialization.Model): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetVMProfile(_serialization.Model): """Describes a virtual machine scale set virtual machine profile. :ivar os_profile: Specifies the operating system settings for the virtual machines in the scale @@ -16945,7 +16944,7 @@ def __init__(self, **kwargs: Any) -> None: self.count = None -class VirtualMachineUpdate(UpdateResource): # pylint: disable=too-many-instance-attributes +class VirtualMachineUpdate(UpdateResource): """Describes a Virtual Machine Update. Variables are only populated by the server, and will be ignored when sending a request. diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/operations/__init__.py index 4b5353dd63294..240530fe0fdb1 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/operations/__init__.py @@ -5,49 +5,55 @@ # Code generated by Microsoft (R) AutoRest 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 AvailabilitySetsOperations -from ._operations import ProximityPlacementGroupsOperations -from ._operations import DedicatedHostGroupsOperations -from ._operations import DedicatedHostsOperations -from ._operations import SshPublicKeysOperations -from ._operations import VirtualMachineExtensionImagesOperations -from ._operations import VirtualMachineExtensionsOperations -from ._operations import VirtualMachineImagesOperations -from ._operations import VirtualMachineImagesEdgeZoneOperations -from ._operations import UsageOperations -from ._operations import VirtualMachinesOperations -from ._operations import VirtualMachineScaleSetsOperations -from ._operations import VirtualMachineSizesOperations -from ._operations import ImagesOperations -from ._operations import RestorePointCollectionsOperations -from ._operations import RestorePointsOperations -from ._operations import CapacityReservationGroupsOperations -from ._operations import CapacityReservationsOperations -from ._operations import VirtualMachineScaleSetExtensionsOperations -from ._operations import VirtualMachineScaleSetRollingUpgradesOperations -from ._operations import VirtualMachineScaleSetVMExtensionsOperations -from ._operations import VirtualMachineScaleSetVMsOperations -from ._operations import LogAnalyticsOperations -from ._operations import VirtualMachineRunCommandsOperations -from ._operations import VirtualMachineScaleSetVMRunCommandsOperations -from ._operations import ResourceSkusOperations -from ._operations import GalleriesOperations -from ._operations import GalleryImagesOperations -from ._operations import GalleryImageVersionsOperations -from ._operations import GalleryApplicationsOperations -from ._operations import GalleryApplicationVersionsOperations -from ._operations import GallerySharingProfileOperations -from ._operations import SharedGalleriesOperations -from ._operations import SharedGalleryImagesOperations -from ._operations import SharedGalleryImageVersionsOperations -from ._operations import CommunityGalleriesOperations -from ._operations import CommunityGalleryImagesOperations -from ._operations import CommunityGalleryImageVersionsOperations +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 AvailabilitySetsOperations # type: ignore +from ._operations import ProximityPlacementGroupsOperations # type: ignore +from ._operations import DedicatedHostGroupsOperations # type: ignore +from ._operations import DedicatedHostsOperations # type: ignore +from ._operations import SshPublicKeysOperations # type: ignore +from ._operations import VirtualMachineExtensionImagesOperations # type: ignore +from ._operations import VirtualMachineExtensionsOperations # type: ignore +from ._operations import VirtualMachineImagesOperations # type: ignore +from ._operations import VirtualMachineImagesEdgeZoneOperations # type: ignore +from ._operations import UsageOperations # type: ignore +from ._operations import VirtualMachinesOperations # type: ignore +from ._operations import VirtualMachineScaleSetsOperations # type: ignore +from ._operations import VirtualMachineSizesOperations # type: ignore +from ._operations import ImagesOperations # type: ignore +from ._operations import RestorePointCollectionsOperations # type: ignore +from ._operations import RestorePointsOperations # type: ignore +from ._operations import CapacityReservationGroupsOperations # type: ignore +from ._operations import CapacityReservationsOperations # type: ignore +from ._operations import VirtualMachineScaleSetExtensionsOperations # type: ignore +from ._operations import VirtualMachineScaleSetRollingUpgradesOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMExtensionsOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMsOperations # type: ignore +from ._operations import LogAnalyticsOperations # type: ignore +from ._operations import VirtualMachineRunCommandsOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMRunCommandsOperations # type: ignore +from ._operations import ResourceSkusOperations # type: ignore +from ._operations import GalleriesOperations # type: ignore +from ._operations import GalleryImagesOperations # type: ignore +from ._operations import GalleryImageVersionsOperations # type: ignore +from ._operations import GalleryApplicationsOperations # type: ignore +from ._operations import GalleryApplicationVersionsOperations # type: ignore +from ._operations import GallerySharingProfileOperations # type: ignore +from ._operations import SharedGalleriesOperations # type: ignore +from ._operations import SharedGalleryImagesOperations # type: ignore +from ._operations import SharedGalleryImageVersionsOperations # type: ignore +from ._operations import CommunityGalleriesOperations # type: ignore +from ._operations import CommunityGalleryImagesOperations # type: ignore +from ._operations import CommunityGalleryImageVersionsOperations # 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__ = [ @@ -91,5 +97,5 @@ "CommunityGalleryImagesOperations", "CommunityGalleryImageVersionsOperations", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/operations/_operations.py index 8b222620a171d..25161c984910d 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/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. @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Iterable, Iterator, List, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Iterable, Iterator, List, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -36,7 +36,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, HttpResponse], T, Dict[str, Any]], Any]] @@ -6963,7 +6963,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.ComputeOperationValue"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.ComputeOperationListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7116,7 +7116,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2021_07_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7243,7 +7243,7 @@ def update( :rtype: ~azure.mgmt.compute.v2021_07_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7311,7 +7311,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7361,7 +7361,7 @@ def get(self, resource_group_name: str, availability_set_name: str, **kwargs: An :rtype: ~azure.mgmt.compute.v2021_07_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7422,7 +7422,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7499,7 +7499,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Ava api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7581,7 +7581,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7739,7 +7739,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2021_07_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7869,7 +7869,7 @@ def update( :rtype: ~azure.mgmt.compute.v2021_07_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7937,7 +7937,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7997,7 +7997,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8056,7 +8056,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.ProximityPlac api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8136,7 +8136,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8297,7 +8297,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2021_07_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8424,7 +8424,7 @@ def update( :rtype: ~azure.mgmt.compute.v2021_07_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8492,7 +8492,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8554,7 +8554,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8614,7 +8614,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8690,7 +8690,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.DedicatedHost api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8779,7 +8779,7 @@ def _create_or_update_initial( parameters: Union[_models.DedicatedHost, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8980,7 +8980,7 @@ def _update_initial( parameters: Union[_models.DedicatedHostUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9176,7 +9176,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9307,7 +9307,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.DedicatedHost :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9372,7 +9372,7 @@ def list_by_host_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.DedicatedHostListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9472,7 +9472,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.SshPublicKeyR api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9553,7 +9553,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9687,7 +9687,7 @@ def create( :rtype: ~azure.mgmt.compute.v2021_07_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9815,7 +9815,7 @@ def update( :rtype: ~azure.mgmt.compute.v2021_07_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9883,7 +9883,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9933,7 +9933,7 @@ def get(self, resource_group_name: str, ssh_public_key_name: str, **kwargs: Any) :rtype: ~azure.mgmt.compute.v2021_07_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9991,7 +9991,7 @@ def generate_key_pair( :rtype: ~azure.mgmt.compute.v2021_07_01.models.SshPublicKeyGenerateKeyPairResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10072,7 +10072,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.VirtualMachineExtensionImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10130,7 +10130,7 @@ def list_types( :rtype: list[~azure.mgmt.compute.v2021_07_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10202,7 +10202,7 @@ def list_versions( :rtype: list[~azure.mgmt.compute.v2021_07_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10277,7 +10277,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineExtension, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10487,7 +10487,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineExtensionUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10693,7 +10693,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_name: str, vm_extension_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10823,7 +10823,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.VirtualMachineExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10883,7 +10883,7 @@ def list( :rtype: ~azure.mgmt.compute.v2021_07_01.models.VirtualMachineExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10967,7 +10967,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11046,7 +11046,7 @@ def list( :rtype: list[~azure.mgmt.compute.v2021_07_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11107,7 +11107,7 @@ def list_offers( :rtype: list[~azure.mgmt.compute.v2021_07_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11159,7 +11159,7 @@ def list_publishers(self, location: str, **kwargs: Any) -> List[_models.VirtualM :rtype: list[~azure.mgmt.compute.v2021_07_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11216,7 +11216,7 @@ def list_skus( :rtype: list[~azure.mgmt.compute.v2021_07_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11302,7 +11302,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11387,7 +11387,7 @@ def list( :rtype: list[~azure.mgmt.compute.v2021_07_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11452,7 +11452,7 @@ def list_offers( :rtype: list[~azure.mgmt.compute.v2021_07_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11509,7 +11509,7 @@ def list_publishers( :rtype: list[~azure.mgmt.compute.v2021_07_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11570,7 +11570,7 @@ def list_skus( :rtype: list[~azure.mgmt.compute.v2021_07_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11652,7 +11652,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.Usage"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.ListUsagesResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11751,7 +11751,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> Iterable["_models.Vi api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11819,7 +11819,7 @@ def _capture_initial( parameters: Union[_models.VirtualMachineCaptureParameters, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12017,7 +12017,7 @@ def _create_or_update_initial( parameters: Union[_models.VirtualMachine, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12209,7 +12209,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12394,7 +12394,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_name: str, *, force_deletion: Optional[bool] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12525,7 +12525,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.VirtualMachine :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12582,7 +12582,7 @@ def instance_view( :rtype: ~azure.mgmt.compute.v2021_07_01.models.VirtualMachineInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12627,7 +12627,7 @@ def instance_view( def _convert_to_managed_disks_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12730,7 +12730,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _deallocate_initial( self, resource_group_name: str, vm_name: str, *, hibernate: Optional[bool] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12856,7 +12856,7 @@ def generalize( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12911,7 +12911,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Vir api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12990,7 +12990,7 @@ def list_all(self, *, status_only: Optional[str] = None, **kwargs: Any) -> Itera api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13072,7 +13072,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13137,7 +13137,7 @@ def get_next(next_link=None): def _power_off_initial( self, resource_group_name: str, vm_name: str, *, skip_shutdown: bool = False, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13246,7 +13246,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _reapply_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13346,7 +13346,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _restart_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13446,7 +13446,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _start_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13546,7 +13546,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _redeploy_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13652,7 +13652,7 @@ def _reimage_initial( parameters: Optional[Union[_models.VirtualMachineReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13857,7 +13857,7 @@ def retrieve_boot_diagnostics_data( :rtype: ~azure.mgmt.compute.v2021_07_01.models.RetrieveBootDiagnosticsDataResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13901,7 +13901,7 @@ def retrieve_boot_diagnostics_data( return deserialized # type: ignore def _perform_maintenance_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14014,7 +14014,7 @@ def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14053,7 +14053,7 @@ def simulate_eviction( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore def _assess_patches_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14169,7 +14169,7 @@ def _install_patches_initial( install_patches_input: Union[_models.VirtualMachineInstallPatchesParameters, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14367,7 +14367,7 @@ def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14591,7 +14591,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> Iterable["_models.Vi api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14659,7 +14659,7 @@ def _create_or_update_initial( parameters: Union[_models.VirtualMachineScaleSet, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14851,7 +14851,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineScaleSetUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15040,7 +15040,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, *, force_deletion: Optional[bool] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15169,7 +15169,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.VirtualMachineScaleSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15219,7 +15219,7 @@ def _deallocate_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15416,7 +15416,7 @@ def _delete_instances_initial( force_deletion: Optional[bool] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15624,7 +15624,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2021_07_01.models.VirtualMachineScaleSetInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15684,7 +15684,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Vir api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15763,7 +15763,7 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.VirtualMachineScaleSet"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.VirtualMachineScaleSetListWithLinkResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15846,7 +15846,7 @@ def list_skus( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.VirtualMachineScaleSetListSkusResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15930,7 +15930,7 @@ def get_os_upgrade_history( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.VirtualMachineScaleSetListOSUpgradeHistory] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16001,7 +16001,7 @@ def _power_off_initial( skip_shutdown: bool = False, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16214,7 +16214,7 @@ def _restart_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16403,7 +16403,7 @@ def _start_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16592,7 +16592,7 @@ def _redeploy_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16784,7 +16784,7 @@ def _perform_maintenance_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16982,7 +16982,7 @@ def _update_instances_initial( vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17168,7 +17168,7 @@ def _reimage_initial( vm_scale_set_reimage_input: Optional[Union[_models.VirtualMachineScaleSetReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17361,7 +17361,7 @@ def _reimage_all_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17564,7 +17564,7 @@ def force_recovery_service_fabric_platform_update_domain_walk( # pylint: disabl :rtype: ~azure.mgmt.compute.v2021_07_01.models.RecoveryWalkResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17608,7 +17608,7 @@ def force_recovery_service_fabric_platform_update_domain_walk( # pylint: disabl return deserialized # type: ignore @overload - def convert_to_single_placement_group( # pylint: disable=inconsistent-return-statements + def convert_to_single_placement_group( self, resource_group_name: str, vm_scale_set_name: str, @@ -17636,7 +17636,7 @@ def convert_to_single_placement_group( # pylint: disable=inconsistent-return-st """ @overload - def convert_to_single_placement_group( # pylint: disable=inconsistent-return-statements + def convert_to_single_placement_group( self, resource_group_name: str, vm_scale_set_name: str, @@ -17686,7 +17686,7 @@ def convert_to_single_placement_group( # pylint: disable=inconsistent-return-st :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17743,7 +17743,7 @@ def _set_orchestration_service_state_initial( parameters: Union[_models.OrchestrationServiceStateInput, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17960,7 +17960,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.VirtualMachine api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18045,7 +18045,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, image_name: str, parameters: Union[_models.Image, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18227,7 +18227,7 @@ def _update_initial( parameters: Union[_models.ImageUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18407,7 +18407,7 @@ def get_long_running_output(pipeline_response): ) def _delete_initial(self, resource_group_name: str, image_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18522,7 +18522,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.Image :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18581,7 +18581,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18657,7 +18657,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Image"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18819,7 +18819,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2021_07_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18949,7 +18949,7 @@ def update( :rtype: ~azure.mgmt.compute.v2021_07_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19006,7 +19006,7 @@ def update( def _delete_initial( self, resource_group_name: str, restore_point_collection_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19132,7 +19132,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19193,7 +19193,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Res api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.RestorePointCollectionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19272,7 +19272,7 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.RestorePointCollection"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.RestorePointCollectionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19361,7 +19361,7 @@ def _create_initial( parameters: Union[_models.RestorePoint, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19560,7 +19560,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, restore_point_collection_name: str, restore_point_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19681,7 +19681,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.RestorePoint :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19824,7 +19824,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2021_07_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19957,7 +19957,7 @@ def update( :rtype: ~azure.mgmt.compute.v2021_07_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20028,7 +20028,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20092,7 +20092,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20166,7 +20166,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.CapacityReservationGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20253,7 +20253,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.CapacityReservationGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20343,7 +20343,7 @@ def _create_or_update_initial( parameters: Union[_models.CapacityReservation, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20553,7 +20553,7 @@ def _update_initial( parameters: Union[_models.CapacityReservationUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20756,7 +20756,7 @@ def _delete_initial( capacity_reservation_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20894,7 +20894,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.CapacityReservation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20960,7 +20960,7 @@ def list_by_capacity_reservation_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.CapacityReservationListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21051,7 +21051,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtension, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21262,7 +21262,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtensionUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21469,7 +21469,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, vmss_extension_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21599,7 +21599,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.VirtualMachineScaleSetExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21665,7 +21665,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.VirtualMachineScaleSetExtensionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21749,7 +21749,7 @@ def __init__(self, *args, **kwargs): self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") def _cancel_initial(self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21851,7 +21851,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_os_upgrade_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21957,7 +21957,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_extension_upgrade_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22074,7 +22074,7 @@ def get_latest( :rtype: ~azure.mgmt.compute.v2021_07_01.models.RollingUpgradeStatusInfo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22146,7 +22146,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetVMExtension, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22366,7 +22366,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetVMExtensionUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22581,7 +22581,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, vm_extension_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22717,7 +22717,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.VirtualMachineScaleSetVMExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22786,7 +22786,7 @@ def list( :rtype: ~azure.mgmt.compute.v2021_07_01.models.VirtualMachineScaleSetVMExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22863,7 +22863,7 @@ def _reimage_initial( ] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23062,7 +23062,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _reimage_all_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23171,7 +23171,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _deallocate_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23286,7 +23286,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineScaleSetVM, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23496,7 +23496,7 @@ def _delete_initial( force_deletion: Optional[bool] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23638,7 +23638,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.VirtualMachineScaleSetVM :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23698,7 +23698,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2021_07_01.models.VirtualMachineScaleSetVMInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23780,7 +23780,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.VirtualMachineScaleSetVMListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23854,7 +23854,7 @@ def _power_off_initial( skip_shutdown: bool = False, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23976,7 +23976,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _restart_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24084,7 +24084,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24192,7 +24192,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _redeploy_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24326,7 +24326,7 @@ def retrieve_boot_diagnostics_data( :rtype: ~azure.mgmt.compute.v2021_07_01.models.RetrieveBootDiagnosticsDataResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24373,7 +24373,7 @@ def retrieve_boot_diagnostics_data( def _perform_maintenance_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24494,7 +24494,7 @@ def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24541,7 +24541,7 @@ def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24760,7 +24760,7 @@ def __init__(self, *args, **kwargs): def _export_request_rate_by_interval_initial( self, location: str, parameters: Union[_models.RequestRateByIntervalInput, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24937,7 +24937,7 @@ def get_long_running_output(pipeline_response): def _export_throttled_requests_initial( self, location: str, parameters: Union[_models.ThrottledRequestsInput, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25147,7 +25147,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.RunCommandDocu api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.RunCommandListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25220,7 +25220,7 @@ def get(self, location: str, command_id: str, **kwargs: Any) -> _models.RunComma :rtype: ~azure.mgmt.compute.v2021_07_01.models.RunCommandDocument :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25270,7 +25270,7 @@ def _create_or_update_initial( run_command: Union[_models.VirtualMachineRunCommand, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25479,7 +25479,7 @@ def _update_initial( run_command: Union[_models.VirtualMachineRunCommandUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25684,7 +25684,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_name: str, run_command_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25814,7 +25814,7 @@ def get_by_virtual_machine( :rtype: ~azure.mgmt.compute.v2021_07_01.models.VirtualMachineRunCommand :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25882,7 +25882,7 @@ def list_by_virtual_machine( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.VirtualMachineRunCommandsListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25975,7 +25975,7 @@ def _create_or_update_initial( run_command: Union[_models.VirtualMachineRunCommand, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26193,7 +26193,7 @@ def _update_initial( run_command: Union[_models.VirtualMachineRunCommandUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26406,7 +26406,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, run_command_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26542,7 +26542,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.VirtualMachineRunCommand :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26619,7 +26619,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.VirtualMachineRunCommandsListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26726,7 +26726,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.ResourceSkusResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26812,7 +26812,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, gallery_name: str, gallery: Union[_models.Gallery, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -27002,7 +27002,7 @@ def _update_initial( gallery: Union[_models.GalleryUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -27209,7 +27209,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.Gallery :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -27253,7 +27253,7 @@ def get( return deserialized # type: ignore def _delete_initial(self, resource_group_name: str, gallery_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -27368,7 +27368,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.GalleryList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -27443,7 +27443,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Gallery"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.GalleryList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -27532,7 +27532,7 @@ def _create_or_update_initial( gallery_image: Union[_models.GalleryImage, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -27744,7 +27744,7 @@ def _update_initial( gallery_image: Union[_models.GalleryImageUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -27963,7 +27963,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.GalleryImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -28009,7 +28009,7 @@ def get( def _delete_initial( self, resource_group_name: str, gallery_name: str, gallery_image_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -28136,7 +28136,7 @@ def list_by_gallery( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.GalleryImageList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -28228,7 +28228,7 @@ def _create_or_update_initial( gallery_image_version: Union[_models.GalleryImageVersion, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -28462,7 +28462,7 @@ def _update_initial( gallery_image_version: Union[_models.GalleryImageVersionUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -28718,7 +28718,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.GalleryImageVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -28771,7 +28771,7 @@ def _delete_initial( gallery_image_version_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -28913,7 +28913,7 @@ def list_by_gallery_image( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.GalleryImageVersionList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -29005,7 +29005,7 @@ def _create_or_update_initial( gallery_application: Union[_models.GalleryApplication, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -29221,7 +29221,7 @@ def _update_initial( gallery_application: Union[_models.GalleryApplicationUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -29447,7 +29447,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.GalleryApplication :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -29493,7 +29493,7 @@ def get( def _delete_initial( self, resource_group_name: str, gallery_name: str, gallery_application_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -29621,7 +29621,7 @@ def list_by_gallery( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.GalleryApplicationList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -29713,7 +29713,7 @@ def _create_or_update_initial( gallery_application_version: Union[_models.GalleryApplicationVersion, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -29949,7 +29949,7 @@ def _update_initial( gallery_application_version: Union[_models.GalleryApplicationVersionUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -30207,7 +30207,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.GalleryApplicationVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -30260,7 +30260,7 @@ def _delete_initial( gallery_application_version_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -30403,7 +30403,7 @@ def list_by_gallery_application( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.GalleryApplicationVersionList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -30494,7 +30494,7 @@ def _update_initial( sharing_update: Union[_models.SharingUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -30718,7 +30718,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.SharedGalleryList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -30792,7 +30792,7 @@ def get(self, location: str, gallery_unique_name: str, **kwargs: Any) -> _models :rtype: ~azure.mgmt.compute.v2021_07_01.models.SharedGallery :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -30883,7 +30883,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.SharedGalleryImageList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -30963,7 +30963,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.SharedGalleryImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -31061,7 +31061,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-07-01")) cls: ClsType[_models.SharedGalleryImageVersionList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -31152,7 +31152,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.SharedGalleryImageVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -31229,7 +31229,7 @@ def get(self, location: str, public_gallery_name: str, **kwargs: Any) -> _models :rtype: ~azure.mgmt.compute.v2021_07_01.models.CommunityGallery :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -31308,7 +31308,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.CommunityGalleryImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -31398,7 +31398,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_07_01.models.CommunityGalleryImageVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_08_01/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_08_01/__init__.py index 3b1b6244b2375..ab7c46e8991db 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_08_01/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_08_01/__init__.py @@ -5,15 +5,21 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._compute_management_client import ComputeManagementClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._compute_management_client import ComputeManagementClient # 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__ = [ "ComputeManagementClient", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_08_01/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_08_01/_compute_management_client.py index ec2b681f52368..05bf7765ebe8f 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_08_01/_compute_management_client.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_08_01/_compute_management_client.py @@ -27,11 +27,10 @@ ) if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class ComputeManagementClient: # pylint: disable=client-accepts-api-version-keyword +class ComputeManagementClient: """Compute Client. :ivar disks: DisksOperations operations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_08_01/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_08_01/_configuration.py index d2a8484d7de62..273ee2eaf35d3 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_08_01/_configuration.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_08_01/_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 ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ComputeManagementClient. Note that all parameters used to create this instance are saved as instance diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_08_01/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_08_01/_version.py index d79b2760319c5..e5754a47ce68f 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_08_01/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_08_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "33.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_08_01/aio/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_08_01/aio/__init__.py index 0715f50185586..d3fd1ba93379a 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_08_01/aio/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_08_01/aio/__init__.py @@ -5,12 +5,18 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._compute_management_client import ComputeManagementClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._compute_management_client import ComputeManagementClient # 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__ = [ "ComputeManagementClient", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_08_01/aio/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_08_01/aio/_compute_management_client.py index e649a420a33bc..866167cb94966 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_08_01/aio/_compute_management_client.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_08_01/aio/_compute_management_client.py @@ -27,11 +27,10 @@ ) if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class ComputeManagementClient: # pylint: disable=client-accepts-api-version-keyword +class ComputeManagementClient: """Compute Client. :ivar disks: DisksOperations operations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_08_01/aio/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_08_01/aio/_configuration.py index 0194ceebf28d1..8afb03123ce5e 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_08_01/aio/_configuration.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_08_01/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 ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ComputeManagementClient. Note that all parameters used to create this instance are saved as instance diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_08_01/aio/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_08_01/aio/operations/__init__.py index fa2d8a9108a18..9cc1f6fb8062f 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_08_01/aio/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_08_01/aio/operations/__init__.py @@ -5,15 +5,21 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._operations import DisksOperations -from ._operations import SnapshotsOperations -from ._operations import DiskEncryptionSetsOperations -from ._operations import DiskAccessesOperations -from ._operations import DiskRestorePointOperations +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._operations import DisksOperations # type: ignore +from ._operations import SnapshotsOperations # type: ignore +from ._operations import DiskEncryptionSetsOperations # type: ignore +from ._operations import DiskAccessesOperations # type: ignore +from ._operations import DiskRestorePointOperations # 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__ = [ @@ -23,5 +29,5 @@ "DiskAccessesOperations", "DiskRestorePointOperations", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_08_01/aio/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_08_01/aio/operations/_operations.py index f46e4c0076add..fa26c77c7b8ec 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_08_01/aio/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_08_01/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. @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -76,7 +76,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]] @@ -104,7 +104,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.Disk, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -288,7 +288,7 @@ def get_long_running_output(pipeline_response): async def _update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.DiskUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -483,7 +483,7 @@ async def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.compute.v2021_08_01.models.Disk :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -526,7 +526,7 @@ async def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> return deserialized # type: ignore async def _delete_initial(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -643,7 +643,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-08-01")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -718,7 +718,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Disk"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-08-01")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -785,7 +785,7 @@ async def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -980,7 +980,7 @@ def get_long_running_output(pipeline_response): async def _revoke_access_initial( self, resource_group_name: str, disk_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1109,7 +1109,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, snapshot_name: str, snapshot: Union[_models.Snapshot, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1300,7 +1300,7 @@ async def _update_initial( snapshot: Union[_models.SnapshotUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1504,7 +1504,7 @@ async def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) :rtype: ~azure.mgmt.compute.v2021_08_01.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1549,7 +1549,7 @@ async def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) async def _delete_initial( self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1667,7 +1667,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-08-01")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1743,7 +1743,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Snapshot"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-08-01")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1810,7 +1810,7 @@ async def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2005,7 +2005,7 @@ def get_long_running_output(pipeline_response): async def _revoke_access_initial( self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2138,7 +2138,7 @@ async def _create_or_update_initial( disk_encryption_set: Union[_models.DiskEncryptionSet, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2339,7 +2339,7 @@ async def _update_initial( disk_encryption_set: Union[_models.DiskEncryptionSetUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2550,7 +2550,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_08_01.models.DiskEncryptionSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2595,7 +2595,7 @@ async def get( async def _delete_initial( self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2717,7 +2717,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-08-01")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2793,7 +2793,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.DiskEncryptionSet"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-08-01")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2875,7 +2875,7 @@ def list_associated_resources( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-08-01")) cls: ClsType[_models.ResourceUriList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2965,7 +2965,7 @@ async def _create_or_update_initial( disk_access: Union[_models.DiskAccess, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3162,7 +3162,7 @@ async def _update_initial( disk_access: Union[_models.DiskAccessUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3366,7 +3366,7 @@ async def get(self, resource_group_name: str, disk_access_name: str, **kwargs: A :rtype: ~azure.mgmt.compute.v2021_08_01.models.DiskAccess :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3411,7 +3411,7 @@ async def get(self, resource_group_name: str, disk_access_name: str, **kwargs: A async def _delete_initial( self, resource_group_name: str, disk_access_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3531,7 +3531,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-08-01")) cls: ClsType[_models.DiskAccessList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3607,7 +3607,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.DiskAccess"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-08-01")) cls: ClsType[_models.DiskAccessList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3683,7 +3683,7 @@ async def get_private_link_resources( :rtype: ~azure.mgmt.compute.v2021_08_01.models.PrivateLinkResourceListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3733,7 +3733,7 @@ async def _update_a_private_endpoint_connection_initial( # pylint: disable=name private_endpoint_connection: Union[_models.PrivateEndpointConnection, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3961,7 +3961,7 @@ async def get_a_private_endpoint_connection( :rtype: ~azure.mgmt.compute.v2021_08_01.models.PrivateEndpointConnection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4007,7 +4007,7 @@ async def get_a_private_endpoint_connection( async def _delete_a_private_endpoint_connection_initial( # pylint: disable=name-too-long self, resource_group_name: str, disk_access_name: str, private_endpoint_connection_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4138,7 +4138,7 @@ def list_private_endpoint_connections( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-08-01")) cls: ClsType[_models.PrivateEndpointConnectionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4246,7 +4246,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_08_01.models.DiskRestorePoint :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4315,7 +4315,7 @@ def list_by_restore_point( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-08-01")) cls: ClsType[_models.DiskRestorePointList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4387,7 +4387,7 @@ async def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4609,7 +4609,7 @@ async def _revoke_access_initial( disk_restore_point_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_08_01/models/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_08_01/models/__init__.py index fe599fa951b2c..c363f90b54012 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_08_01/models/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_08_01/models/__init__.py @@ -5,72 +5,83 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._models_py3 import AccessUri -from ._models_py3 import ApiError -from ._models_py3 import ApiErrorBase -from ._models_py3 import CreationData -from ._models_py3 import Disk -from ._models_py3 import DiskAccess -from ._models_py3 import DiskAccessList -from ._models_py3 import DiskAccessUpdate -from ._models_py3 import DiskEncryptionSet -from ._models_py3 import DiskEncryptionSetList -from ._models_py3 import DiskEncryptionSetUpdate -from ._models_py3 import DiskList -from ._models_py3 import DiskRestorePoint -from ._models_py3 import DiskRestorePointList -from ._models_py3 import DiskSecurityProfile -from ._models_py3 import DiskSku -from ._models_py3 import DiskUpdate -from ._models_py3 import Encryption -from ._models_py3 import EncryptionSetIdentity -from ._models_py3 import EncryptionSettingsCollection -from ._models_py3 import EncryptionSettingsElement -from ._models_py3 import ExtendedLocation -from ._models_py3 import GrantAccessData -from ._models_py3 import ImageDiskReference -from ._models_py3 import InnerError -from ._models_py3 import KeyForDiskEncryptionSet -from ._models_py3 import KeyVaultAndKeyReference -from ._models_py3 import KeyVaultAndSecretReference -from ._models_py3 import PrivateEndpoint -from ._models_py3 import PrivateEndpointConnection -from ._models_py3 import PrivateEndpointConnectionListResult -from ._models_py3 import PrivateLinkResource -from ._models_py3 import PrivateLinkResourceListResult -from ._models_py3 import PrivateLinkServiceConnectionState -from ._models_py3 import PropertyUpdatesInProgress -from ._models_py3 import ProxyOnlyResource -from ._models_py3 import PurchasePlan -from ._models_py3 import Resource -from ._models_py3 import ResourceUriList -from ._models_py3 import ShareInfoElement -from ._models_py3 import Snapshot -from ._models_py3 import SnapshotList -from ._models_py3 import SnapshotSku -from ._models_py3 import SnapshotUpdate -from ._models_py3 import SourceVault -from ._models_py3 import SupportedCapabilities +from typing import TYPE_CHECKING -from ._compute_management_client_enums import AccessLevel -from ._compute_management_client_enums import DiskCreateOption -from ._compute_management_client_enums import DiskEncryptionSetIdentityType -from ._compute_management_client_enums import DiskEncryptionSetType -from ._compute_management_client_enums import DiskSecurityTypes -from ._compute_management_client_enums import DiskState -from ._compute_management_client_enums import DiskStorageAccountTypes -from ._compute_management_client_enums import EncryptionType -from ._compute_management_client_enums import ExtendedLocationTypes -from ._compute_management_client_enums import HyperVGeneration -from ._compute_management_client_enums import NetworkAccessPolicy -from ._compute_management_client_enums import OperatingSystemTypes -from ._compute_management_client_enums import PrivateEndpointConnectionProvisioningState -from ._compute_management_client_enums import PrivateEndpointServiceConnectionStatus -from ._compute_management_client_enums import PublicNetworkAccess -from ._compute_management_client_enums import SnapshotStorageAccountTypes +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + + +from ._models_py3 import ( # type: ignore + AccessUri, + ApiError, + ApiErrorBase, + CreationData, + Disk, + DiskAccess, + DiskAccessList, + DiskAccessUpdate, + DiskEncryptionSet, + DiskEncryptionSetList, + DiskEncryptionSetUpdate, + DiskList, + DiskRestorePoint, + DiskRestorePointList, + DiskSecurityProfile, + DiskSku, + DiskUpdate, + Encryption, + EncryptionSetIdentity, + EncryptionSettingsCollection, + EncryptionSettingsElement, + ExtendedLocation, + GrantAccessData, + ImageDiskReference, + InnerError, + KeyForDiskEncryptionSet, + KeyVaultAndKeyReference, + KeyVaultAndSecretReference, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateEndpointConnectionListResult, + PrivateLinkResource, + PrivateLinkResourceListResult, + PrivateLinkServiceConnectionState, + PropertyUpdatesInProgress, + ProxyOnlyResource, + PurchasePlan, + Resource, + ResourceUriList, + ShareInfoElement, + Snapshot, + SnapshotList, + SnapshotSku, + SnapshotUpdate, + SourceVault, + SupportedCapabilities, +) + +from ._compute_management_client_enums import ( # type: ignore + AccessLevel, + DiskCreateOption, + DiskEncryptionSetIdentityType, + DiskEncryptionSetType, + DiskSecurityTypes, + DiskState, + DiskStorageAccountTypes, + EncryptionType, + ExtendedLocationTypes, + HyperVGeneration, + NetworkAccessPolicy, + OperatingSystemTypes, + PrivateEndpointConnectionProvisioningState, + PrivateEndpointServiceConnectionStatus, + PublicNetworkAccess, + SnapshotStorageAccountTypes, +) 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__ = [ @@ -137,5 +148,5 @@ "PublicNetworkAccess", "SnapshotStorageAccountTypes", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_08_01/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_08_01/models/_models_py3.py index de592fdd2c432..331f71d8e3220 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_08_01/models/_models_py3.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_08_01/models/_models_py3.py @@ -1,5 +1,5 @@ -# 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. @@ -12,7 +12,6 @@ from ... import _serialization if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models @@ -297,7 +296,7 @@ def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kw self.tags = tags -class Disk(Resource): # pylint: disable=too-many-instance-attributes +class Disk(Resource): """Disk resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -761,7 +760,7 @@ def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> N self.tags = tags -class DiskEncryptionSet(Resource): # pylint: disable=too-many-instance-attributes +class DiskEncryptionSet(Resource): """disk encryption set resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -1044,7 +1043,7 @@ def __init__(self, **kwargs: Any) -> None: self.type = None -class DiskRestorePoint(ProxyOnlyResource): # pylint: disable=too-many-instance-attributes +class DiskRestorePoint(ProxyOnlyResource): """Properties of disk restore point. Variables are only populated by the server, and will be ignored when sending a request. @@ -1304,7 +1303,7 @@ def __init__(self, *, name: Optional[Union[str, "_models.DiskStorageAccountTypes self.tier = None -class DiskUpdate(_serialization.Model): # pylint: disable=too-many-instance-attributes +class DiskUpdate(_serialization.Model): """Disk update resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -2314,7 +2313,7 @@ def __init__(self, **kwargs: Any) -> None: self.vm_uri = None -class Snapshot(Resource): # pylint: disable=too-many-instance-attributes +class Snapshot(Resource): """Snapshot resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -2625,7 +2624,7 @@ def __init__( self.tier = None -class SnapshotUpdate(_serialization.Model): # pylint: disable=too-many-instance-attributes +class SnapshotUpdate(_serialization.Model): """Snapshot update resource. :ivar tags: Resource tags. diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_08_01/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_08_01/operations/__init__.py index fa2d8a9108a18..9cc1f6fb8062f 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_08_01/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_08_01/operations/__init__.py @@ -5,15 +5,21 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._operations import DisksOperations -from ._operations import SnapshotsOperations -from ._operations import DiskEncryptionSetsOperations -from ._operations import DiskAccessesOperations -from ._operations import DiskRestorePointOperations +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._operations import DisksOperations # type: ignore +from ._operations import SnapshotsOperations # type: ignore +from ._operations import DiskEncryptionSetsOperations # type: ignore +from ._operations import DiskAccessesOperations # type: ignore +from ._operations import DiskRestorePointOperations # 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__ = [ @@ -23,5 +29,5 @@ "DiskAccessesOperations", "DiskRestorePointOperations", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_08_01/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_08_01/operations/_operations.py index 60559972a189d..262624c1d3cea 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_08_01/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_08_01/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. @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -36,7 +36,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, HttpResponse], T, Dict[str, Any]], Any]] @@ -1280,7 +1280,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.Disk, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1464,7 +1464,7 @@ def get_long_running_output(pipeline_response): def _update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.DiskUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1659,7 +1659,7 @@ def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> _model :rtype: ~azure.mgmt.compute.v2021_08_01.models.Disk :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1702,7 +1702,7 @@ def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> _model return deserialized # type: ignore def _delete_initial(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1819,7 +1819,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-08-01")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1894,7 +1894,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Disk"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-08-01")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1961,7 +1961,7 @@ def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2151,7 +2151,7 @@ def get_long_running_output(pipeline_response): ) def _revoke_access_initial(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2278,7 +2278,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, snapshot_name: str, snapshot: Union[_models.Snapshot, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2466,7 +2466,7 @@ def _update_initial( snapshot: Union[_models.SnapshotUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2667,7 +2667,7 @@ def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> _m :rtype: ~azure.mgmt.compute.v2021_08_01.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2710,7 +2710,7 @@ def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> _m return deserialized # type: ignore def _delete_initial(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2827,7 +2827,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-08-01")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2902,7 +2902,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Snapshot"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-08-01")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2969,7 +2969,7 @@ def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3159,7 +3159,7 @@ def get_long_running_output(pipeline_response): ) def _revoke_access_initial(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3290,7 +3290,7 @@ def _create_or_update_initial( disk_encryption_set: Union[_models.DiskEncryptionSet, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3488,7 +3488,7 @@ def _update_initial( disk_encryption_set: Union[_models.DiskEncryptionSetUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3694,7 +3694,7 @@ def get(self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: :rtype: ~azure.mgmt.compute.v2021_08_01.models.DiskEncryptionSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3739,7 +3739,7 @@ def get(self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: def _delete_initial( self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3856,7 +3856,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-08-01")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3931,7 +3931,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.DiskEncryptionSet"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-08-01")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4013,7 +4013,7 @@ def list_associated_resources( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-08-01")) cls: ClsType[_models.ResourceUriList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4103,7 +4103,7 @@ def _create_or_update_initial( disk_access: Union[_models.DiskAccess, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4297,7 +4297,7 @@ def _update_initial( disk_access: Union[_models.DiskAccessUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4498,7 +4498,7 @@ def get(self, resource_group_name: str, disk_access_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.compute.v2021_08_01.models.DiskAccess :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4541,7 +4541,7 @@ def get(self, resource_group_name: str, disk_access_name: str, **kwargs: Any) -> return deserialized # type: ignore def _delete_initial(self, resource_group_name: str, disk_access_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4658,7 +4658,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-08-01")) cls: ClsType[_models.DiskAccessList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4733,7 +4733,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.DiskAccess"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-08-01")) cls: ClsType[_models.DiskAccessList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4809,7 +4809,7 @@ def get_private_link_resources( :rtype: ~azure.mgmt.compute.v2021_08_01.models.PrivateLinkResourceListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4859,7 +4859,7 @@ def _update_a_private_endpoint_connection_initial( # pylint: disable=name-too-l private_endpoint_connection: Union[_models.PrivateEndpointConnection, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5087,7 +5087,7 @@ def get_a_private_endpoint_connection( :rtype: ~azure.mgmt.compute.v2021_08_01.models.PrivateEndpointConnection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5133,7 +5133,7 @@ def get_a_private_endpoint_connection( def _delete_a_private_endpoint_connection_initial( # pylint: disable=name-too-long self, resource_group_name: str, disk_access_name: str, private_endpoint_connection_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5264,7 +5264,7 @@ def list_private_endpoint_connections( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-08-01")) cls: ClsType[_models.PrivateEndpointConnectionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5372,7 +5372,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_08_01.models.DiskRestorePoint :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5440,7 +5440,7 @@ def list_by_restore_point( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-08-01")) cls: ClsType[_models.DiskRestorePointList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5512,7 +5512,7 @@ def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5731,7 +5731,7 @@ def _revoke_access_initial( disk_restore_point_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_10_01/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_10_01/__init__.py index 3b1b6244b2375..ab7c46e8991db 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_10_01/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_10_01/__init__.py @@ -5,15 +5,21 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._compute_management_client import ComputeManagementClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._compute_management_client import ComputeManagementClient # 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__ = [ "ComputeManagementClient", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_10_01/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_10_01/_compute_management_client.py index 356bfe51fe3f2..c0db86ff27ea2 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_10_01/_compute_management_client.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_10_01/_compute_management_client.py @@ -28,11 +28,10 @@ ) if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class ComputeManagementClient: # pylint: disable=client-accepts-api-version-keyword +class ComputeManagementClient: """Compute Client. :ivar galleries: GalleriesOperations operations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_10_01/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_10_01/_configuration.py index 064b3cb4561d1..3d2615a22e906 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_10_01/_configuration.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_10_01/_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 ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ComputeManagementClient. Note that all parameters used to create this instance are saved as instance diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_10_01/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_10_01/_version.py index d79b2760319c5..e5754a47ce68f 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_10_01/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_10_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "33.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_10_01/aio/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_10_01/aio/__init__.py index 0715f50185586..d3fd1ba93379a 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_10_01/aio/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_10_01/aio/__init__.py @@ -5,12 +5,18 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._compute_management_client import ComputeManagementClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._compute_management_client import ComputeManagementClient # 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__ = [ "ComputeManagementClient", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_10_01/aio/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_10_01/aio/_compute_management_client.py index c58cda60a5ddd..4938e55303b1b 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_10_01/aio/_compute_management_client.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_10_01/aio/_compute_management_client.py @@ -28,11 +28,10 @@ ) if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class ComputeManagementClient: # pylint: disable=client-accepts-api-version-keyword +class ComputeManagementClient: """Compute Client. :ivar galleries: GalleriesOperations operations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_10_01/aio/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_10_01/aio/_configuration.py index 37ef3ec712287..d5fdb47b129ca 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_10_01/aio/_configuration.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_10_01/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 ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ComputeManagementClient. Note that all parameters used to create this instance are saved as instance diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_10_01/aio/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_10_01/aio/operations/__init__.py index e9fe56a3fdb26..1362411892f04 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_10_01/aio/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_10_01/aio/operations/__init__.py @@ -5,16 +5,22 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._operations import GalleriesOperations -from ._operations import GalleryImagesOperations -from ._operations import GalleryImageVersionsOperations -from ._operations import GalleryApplicationsOperations -from ._operations import GalleryApplicationVersionsOperations -from ._operations import GallerySharingProfileOperations +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._operations import GalleriesOperations # type: ignore +from ._operations import GalleryImagesOperations # type: ignore +from ._operations import GalleryImageVersionsOperations # type: ignore +from ._operations import GalleryApplicationsOperations # type: ignore +from ._operations import GalleryApplicationVersionsOperations # type: ignore +from ._operations import GallerySharingProfileOperations # type: ignore from ._patch import __all__ as _patch_all -from ._patch import * # pylint: disable=unused-wildcard-import +from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ @@ -25,5 +31,5 @@ "GalleryApplicationVersionsOperations", "GallerySharingProfileOperations", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_10_01/aio/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_10_01/aio/operations/_operations.py index bef1d2cf2713e..8962aadb0f770 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_10_01/aio/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_10_01/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. @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -65,7 +65,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]] @@ -93,7 +93,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, gallery_name: str, gallery: Union[_models.Gallery, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -286,7 +286,7 @@ async def _update_initial( gallery: Union[_models.GalleryUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -500,7 +500,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_10_01.models.Gallery :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -545,7 +545,7 @@ async def get( return deserialized # type: ignore async def _delete_initial(self, resource_group_name: str, gallery_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -660,7 +660,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-10-01")) cls: ClsType[_models.GalleryList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -735,7 +735,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Gallery"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-10-01")) cls: ClsType[_models.GalleryList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -824,7 +824,7 @@ async def _create_or_update_initial( gallery_image: Union[_models.GalleryImage, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1036,7 +1036,7 @@ async def _update_initial( gallery_image: Union[_models.GalleryImageUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1255,7 +1255,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_10_01.models.GalleryImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1301,7 +1301,7 @@ async def get( async def _delete_initial( self, resource_group_name: str, gallery_name: str, gallery_image_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1429,7 +1429,7 @@ def list_by_gallery( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-10-01")) cls: ClsType[_models.GalleryImageList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1521,7 +1521,7 @@ async def _create_or_update_initial( gallery_image_version: Union[_models.GalleryImageVersion, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1755,7 +1755,7 @@ async def _update_initial( gallery_image_version: Union[_models.GalleryImageVersionUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2011,7 +2011,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_10_01.models.GalleryImageVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2064,7 +2064,7 @@ async def _delete_initial( gallery_image_version_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2206,7 +2206,7 @@ def list_by_gallery_image( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-10-01")) cls: ClsType[_models.GalleryImageVersionList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2298,7 +2298,7 @@ async def _create_or_update_initial( gallery_application: Union[_models.GalleryApplication, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2514,7 +2514,7 @@ async def _update_initial( gallery_application: Union[_models.GalleryApplicationUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2740,7 +2740,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_10_01.models.GalleryApplication :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2786,7 +2786,7 @@ async def get( async def _delete_initial( self, resource_group_name: str, gallery_name: str, gallery_application_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2915,7 +2915,7 @@ def list_by_gallery( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-10-01")) cls: ClsType[_models.GalleryApplicationList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3007,7 +3007,7 @@ async def _create_or_update_initial( gallery_application_version: Union[_models.GalleryApplicationVersion, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3243,7 +3243,7 @@ async def _update_initial( gallery_application_version: Union[_models.GalleryApplicationVersionUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3501,7 +3501,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_10_01.models.GalleryApplicationVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3554,7 +3554,7 @@ async def _delete_initial( gallery_application_version_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3697,7 +3697,7 @@ def list_by_gallery_application( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-10-01")) cls: ClsType[_models.GalleryApplicationVersionList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3788,7 +3788,7 @@ async def _update_initial( sharing_update: Union[_models.SharingUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_10_01/models/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_10_01/models/__init__.py index dd09850629887..bd1ccef893c6d 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_10_01/models/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_10_01/models/__init__.py @@ -5,88 +5,99 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._models_py3 import ApiError -from ._models_py3 import ApiErrorBase -from ._models_py3 import CommunityGalleryInfo -from ._models_py3 import DataDiskImageEncryption -from ._models_py3 import Disallowed -from ._models_py3 import DiskImageEncryption -from ._models_py3 import EncryptionImages -from ._models_py3 import Gallery -from ._models_py3 import GalleryApplication -from ._models_py3 import GalleryApplicationList -from ._models_py3 import GalleryApplicationUpdate -from ._models_py3 import GalleryApplicationVersion -from ._models_py3 import GalleryApplicationVersionList -from ._models_py3 import GalleryApplicationVersionPublishingProfile -from ._models_py3 import GalleryApplicationVersionUpdate -from ._models_py3 import GalleryArtifactPublishingProfileBase -from ._models_py3 import GalleryArtifactSource -from ._models_py3 import GalleryArtifactVersionSource -from ._models_py3 import GalleryDataDiskImage -from ._models_py3 import GalleryDiskImage -from ._models_py3 import GalleryExtendedLocation -from ._models_py3 import GalleryIdentifier -from ._models_py3 import GalleryImage -from ._models_py3 import GalleryImageFeature -from ._models_py3 import GalleryImageIdentifier -from ._models_py3 import GalleryImageList -from ._models_py3 import GalleryImageUpdate -from ._models_py3 import GalleryImageVersion -from ._models_py3 import GalleryImageVersionList -from ._models_py3 import GalleryImageVersionPublishingProfile -from ._models_py3 import GalleryImageVersionStorageProfile -from ._models_py3 import GalleryImageVersionUpdate -from ._models_py3 import GalleryList -from ._models_py3 import GalleryOSDiskImage -from ._models_py3 import GalleryTargetExtendedLocation -from ._models_py3 import GalleryUpdate -from ._models_py3 import ImagePurchasePlan -from ._models_py3 import InnerError -from ._models_py3 import ManagedArtifact -from ._models_py3 import OSDiskImageEncryption -from ._models_py3 import OSDiskImageSecurityProfile -from ._models_py3 import RecommendedMachineConfiguration -from ._models_py3 import RegionalReplicationStatus -from ._models_py3 import RegionalSharingStatus -from ._models_py3 import ReplicationStatus -from ._models_py3 import Resource -from ._models_py3 import ResourceRange -from ._models_py3 import SharingProfile -from ._models_py3 import SharingProfileGroup -from ._models_py3 import SharingStatus -from ._models_py3 import SharingUpdate -from ._models_py3 import SoftDeletePolicy -from ._models_py3 import TargetRegion -from ._models_py3 import UpdateResourceDefinition -from ._models_py3 import UserArtifactManage -from ._models_py3 import UserArtifactSource +from typing import TYPE_CHECKING -from ._compute_management_client_enums import AggregatedReplicationState -from ._compute_management_client_enums import Architecture -from ._compute_management_client_enums import ConfidentialVMEncryptionType -from ._compute_management_client_enums import GalleryApplicationVersionPropertiesProvisioningState -from ._compute_management_client_enums import GalleryExpandParams -from ._compute_management_client_enums import GalleryExtendedLocationType -from ._compute_management_client_enums import GalleryImagePropertiesProvisioningState -from ._compute_management_client_enums import GalleryImageVersionPropertiesProvisioningState -from ._compute_management_client_enums import GalleryPropertiesProvisioningState -from ._compute_management_client_enums import GallerySharingPermissionTypes -from ._compute_management_client_enums import HostCaching -from ._compute_management_client_enums import HyperVGeneration -from ._compute_management_client_enums import OperatingSystemStateTypes -from ._compute_management_client_enums import OperatingSystemTypes -from ._compute_management_client_enums import ReplicationMode -from ._compute_management_client_enums import ReplicationState -from ._compute_management_client_enums import ReplicationStatusTypes -from ._compute_management_client_enums import SelectPermissions -from ._compute_management_client_enums import SharingProfileGroupTypes -from ._compute_management_client_enums import SharingState -from ._compute_management_client_enums import SharingUpdateOperationTypes -from ._compute_management_client_enums import StorageAccountType +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + + +from ._models_py3 import ( # type: ignore + ApiError, + ApiErrorBase, + CommunityGalleryInfo, + DataDiskImageEncryption, + Disallowed, + DiskImageEncryption, + EncryptionImages, + Gallery, + GalleryApplication, + GalleryApplicationList, + GalleryApplicationUpdate, + GalleryApplicationVersion, + GalleryApplicationVersionList, + GalleryApplicationVersionPublishingProfile, + GalleryApplicationVersionUpdate, + GalleryArtifactPublishingProfileBase, + GalleryArtifactSource, + GalleryArtifactVersionSource, + GalleryDataDiskImage, + GalleryDiskImage, + GalleryExtendedLocation, + GalleryIdentifier, + GalleryImage, + GalleryImageFeature, + GalleryImageIdentifier, + GalleryImageList, + GalleryImageUpdate, + GalleryImageVersion, + GalleryImageVersionList, + GalleryImageVersionPublishingProfile, + GalleryImageVersionStorageProfile, + GalleryImageVersionUpdate, + GalleryList, + GalleryOSDiskImage, + GalleryTargetExtendedLocation, + GalleryUpdate, + ImagePurchasePlan, + InnerError, + ManagedArtifact, + OSDiskImageEncryption, + OSDiskImageSecurityProfile, + RecommendedMachineConfiguration, + RegionalReplicationStatus, + RegionalSharingStatus, + ReplicationStatus, + Resource, + ResourceRange, + SharingProfile, + SharingProfileGroup, + SharingStatus, + SharingUpdate, + SoftDeletePolicy, + TargetRegion, + UpdateResourceDefinition, + UserArtifactManage, + UserArtifactSource, +) + +from ._compute_management_client_enums import ( # type: ignore + AggregatedReplicationState, + Architecture, + ConfidentialVMEncryptionType, + GalleryApplicationVersionPropertiesProvisioningState, + GalleryExpandParams, + GalleryExtendedLocationType, + GalleryImagePropertiesProvisioningState, + GalleryImageVersionPropertiesProvisioningState, + GalleryPropertiesProvisioningState, + GallerySharingPermissionTypes, + HostCaching, + HyperVGeneration, + OperatingSystemStateTypes, + OperatingSystemTypes, + ReplicationMode, + ReplicationState, + ReplicationStatusTypes, + SelectPermissions, + SharingProfileGroupTypes, + SharingState, + SharingUpdateOperationTypes, + StorageAccountType, +) 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__ = [ @@ -169,5 +180,5 @@ "SharingUpdateOperationTypes", "StorageAccountType", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_10_01/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_10_01/models/_models_py3.py index 515e128be7ee1..85f44fe442e73 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_10_01/models/_models_py3.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_10_01/models/_models_py3.py @@ -1,5 +1,5 @@ -# 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. @@ -13,7 +13,6 @@ from ... import _serialization if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models @@ -328,7 +327,7 @@ def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kw self.tags = tags -class Gallery(Resource): # pylint: disable=too-many-instance-attributes +class Gallery(Resource): """Specifies information about the Shared Image Gallery that you want to create or update. Variables are only populated by the server, and will be ignored when sending a request. @@ -421,7 +420,7 @@ def __init__( self.sharing_status = None -class GalleryApplication(Resource): # pylint: disable=too-many-instance-attributes +class GalleryApplication(Resource): """Specifies information about the gallery Application Definition that you want to create or update. @@ -904,9 +903,7 @@ def __init__( self.target_extended_locations = target_extended_locations -class GalleryApplicationVersionPublishingProfile( - GalleryArtifactPublishingProfileBase -): # pylint: disable=too-many-instance-attributes,name-too-long +class GalleryApplicationVersionPublishingProfile(GalleryArtifactPublishingProfileBase): # pylint: disable=name-too-long """The publishing profile of a gallery image version. Variables are only populated by the server, and will be ignored when sending a request. @@ -1308,7 +1305,7 @@ def __init__(self, **kwargs: Any) -> None: self.unique_name = None -class GalleryImage(Resource): # pylint: disable=too-many-instance-attributes +class GalleryImage(Resource): """Specifies information about the gallery image definition that you want to create or update. Variables are only populated by the server, and will be ignored when sending a request. @@ -1585,7 +1582,7 @@ def __init__(self, *, value: List["_models.GalleryImage"], next_link: Optional[s self.next_link = next_link -class GalleryImageUpdate(UpdateResourceDefinition): # pylint: disable=too-many-instance-attributes +class GalleryImageUpdate(UpdateResourceDefinition): """Specifies information about the gallery image definition that you want to update. Variables are only populated by the server, and will be ignored when sending a request. diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_10_01/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_10_01/operations/__init__.py index e9fe56a3fdb26..1362411892f04 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_10_01/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_10_01/operations/__init__.py @@ -5,16 +5,22 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._operations import GalleriesOperations -from ._operations import GalleryImagesOperations -from ._operations import GalleryImageVersionsOperations -from ._operations import GalleryApplicationsOperations -from ._operations import GalleryApplicationVersionsOperations -from ._operations import GallerySharingProfileOperations +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._operations import GalleriesOperations # type: ignore +from ._operations import GalleryImagesOperations # type: ignore +from ._operations import GalleryImageVersionsOperations # type: ignore +from ._operations import GalleryApplicationsOperations # type: ignore +from ._operations import GalleryApplicationVersionsOperations # type: ignore +from ._operations import GallerySharingProfileOperations # type: ignore from ._patch import __all__ as _patch_all -from ._patch import * # pylint: disable=unused-wildcard-import +from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ @@ -25,5 +31,5 @@ "GalleryApplicationVersionsOperations", "GallerySharingProfileOperations", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_10_01/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_10_01/operations/_operations.py index abf86101c3256..2a1ca166f9f59 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_10_01/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_10_01/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. @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -36,7 +36,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, HttpResponse], T, Dict[str, Any]], Any]] @@ -1021,7 +1021,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, gallery_name: str, gallery: Union[_models.Gallery, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1211,7 +1211,7 @@ def _update_initial( gallery: Union[_models.GalleryUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1422,7 +1422,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_10_01.models.Gallery :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1467,7 +1467,7 @@ def get( return deserialized # type: ignore def _delete_initial(self, resource_group_name: str, gallery_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1582,7 +1582,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-10-01")) cls: ClsType[_models.GalleryList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1657,7 +1657,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Gallery"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-10-01")) cls: ClsType[_models.GalleryList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1746,7 +1746,7 @@ def _create_or_update_initial( gallery_image: Union[_models.GalleryImage, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1958,7 +1958,7 @@ def _update_initial( gallery_image: Union[_models.GalleryImageUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2177,7 +2177,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_10_01.models.GalleryImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2223,7 +2223,7 @@ def get( def _delete_initial( self, resource_group_name: str, gallery_name: str, gallery_image_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2350,7 +2350,7 @@ def list_by_gallery( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-10-01")) cls: ClsType[_models.GalleryImageList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2442,7 +2442,7 @@ def _create_or_update_initial( gallery_image_version: Union[_models.GalleryImageVersion, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2676,7 +2676,7 @@ def _update_initial( gallery_image_version: Union[_models.GalleryImageVersionUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2932,7 +2932,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_10_01.models.GalleryImageVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2985,7 +2985,7 @@ def _delete_initial( gallery_image_version_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3127,7 +3127,7 @@ def list_by_gallery_image( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-10-01")) cls: ClsType[_models.GalleryImageVersionList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3219,7 +3219,7 @@ def _create_or_update_initial( gallery_application: Union[_models.GalleryApplication, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3435,7 +3435,7 @@ def _update_initial( gallery_application: Union[_models.GalleryApplicationUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3661,7 +3661,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_10_01.models.GalleryApplication :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3707,7 +3707,7 @@ def get( def _delete_initial( self, resource_group_name: str, gallery_name: str, gallery_application_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3835,7 +3835,7 @@ def list_by_gallery( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-10-01")) cls: ClsType[_models.GalleryApplicationList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3927,7 +3927,7 @@ def _create_or_update_initial( gallery_application_version: Union[_models.GalleryApplicationVersion, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4163,7 +4163,7 @@ def _update_initial( gallery_application_version: Union[_models.GalleryApplicationVersionUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4421,7 +4421,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_10_01.models.GalleryApplicationVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4474,7 +4474,7 @@ def _delete_initial( gallery_application_version_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4617,7 +4617,7 @@ def list_by_gallery_application( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-10-01")) cls: ClsType[_models.GalleryApplicationVersionList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4708,7 +4708,7 @@ def _update_initial( sharing_update: Union[_models.SharingUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_11_01/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_11_01/__init__.py index 3b1b6244b2375..ab7c46e8991db 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_11_01/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_11_01/__init__.py @@ -5,15 +5,21 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._compute_management_client import ComputeManagementClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._compute_management_client import ComputeManagementClient # 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__ = [ "ComputeManagementClient", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_11_01/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_11_01/_compute_management_client.py index 44a8b3d1b7abb..eb19c2f3f0c53 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_11_01/_compute_management_client.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_11_01/_compute_management_client.py @@ -48,11 +48,10 @@ ) if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class ComputeManagementClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes +class ComputeManagementClient: # pylint: disable=too-many-instance-attributes """Compute Client. :ivar operations: Operations operations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_11_01/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_11_01/_configuration.py index f10cad49d7d29..8f4229c1724fa 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_11_01/_configuration.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_11_01/_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 ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ComputeManagementClient. Note that all parameters used to create this instance are saved as instance diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_11_01/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_11_01/_version.py index d79b2760319c5..e5754a47ce68f 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_11_01/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_11_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "33.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_11_01/aio/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_11_01/aio/__init__.py index 0715f50185586..d3fd1ba93379a 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_11_01/aio/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_11_01/aio/__init__.py @@ -5,12 +5,18 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._compute_management_client import ComputeManagementClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._compute_management_client import ComputeManagementClient # 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__ = [ "ComputeManagementClient", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_11_01/aio/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_11_01/aio/_compute_management_client.py index 3255ba1f717d0..2fcacd8b6983b 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_11_01/aio/_compute_management_client.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_11_01/aio/_compute_management_client.py @@ -48,11 +48,10 @@ ) if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class ComputeManagementClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes +class ComputeManagementClient: # pylint: disable=too-many-instance-attributes """Compute Client. :ivar operations: Operations operations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_11_01/aio/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_11_01/aio/_configuration.py index b868444e9aa51..a11da5c42054d 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_11_01/aio/_configuration.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_11_01/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 ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ComputeManagementClient. Note that all parameters used to create this instance are saved as instance diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_11_01/aio/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_11_01/aio/operations/__init__.py index 4b14b8f55c656..2bd7636fd03e8 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_11_01/aio/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_11_01/aio/operations/__init__.py @@ -5,36 +5,42 @@ # Code generated by Microsoft (R) AutoRest 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 AvailabilitySetsOperations -from ._operations import ProximityPlacementGroupsOperations -from ._operations import DedicatedHostGroupsOperations -from ._operations import DedicatedHostsOperations -from ._operations import SshPublicKeysOperations -from ._operations import VirtualMachineExtensionImagesOperations -from ._operations import VirtualMachineExtensionsOperations -from ._operations import VirtualMachineImagesOperations -from ._operations import VirtualMachineImagesEdgeZoneOperations -from ._operations import UsageOperations -from ._operations import VirtualMachinesOperations -from ._operations import VirtualMachineScaleSetsOperations -from ._operations import VirtualMachineSizesOperations -from ._operations import ImagesOperations -from ._operations import RestorePointCollectionsOperations -from ._operations import RestorePointsOperations -from ._operations import CapacityReservationGroupsOperations -from ._operations import CapacityReservationsOperations -from ._operations import VirtualMachineScaleSetExtensionsOperations -from ._operations import VirtualMachineScaleSetRollingUpgradesOperations -from ._operations import VirtualMachineScaleSetVMExtensionsOperations -from ._operations import VirtualMachineScaleSetVMsOperations -from ._operations import LogAnalyticsOperations -from ._operations import VirtualMachineRunCommandsOperations -from ._operations import VirtualMachineScaleSetVMRunCommandsOperations +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 AvailabilitySetsOperations # type: ignore +from ._operations import ProximityPlacementGroupsOperations # type: ignore +from ._operations import DedicatedHostGroupsOperations # type: ignore +from ._operations import DedicatedHostsOperations # type: ignore +from ._operations import SshPublicKeysOperations # type: ignore +from ._operations import VirtualMachineExtensionImagesOperations # type: ignore +from ._operations import VirtualMachineExtensionsOperations # type: ignore +from ._operations import VirtualMachineImagesOperations # type: ignore +from ._operations import VirtualMachineImagesEdgeZoneOperations # type: ignore +from ._operations import UsageOperations # type: ignore +from ._operations import VirtualMachinesOperations # type: ignore +from ._operations import VirtualMachineScaleSetsOperations # type: ignore +from ._operations import VirtualMachineSizesOperations # type: ignore +from ._operations import ImagesOperations # type: ignore +from ._operations import RestorePointCollectionsOperations # type: ignore +from ._operations import RestorePointsOperations # type: ignore +from ._operations import CapacityReservationGroupsOperations # type: ignore +from ._operations import CapacityReservationsOperations # type: ignore +from ._operations import VirtualMachineScaleSetExtensionsOperations # type: ignore +from ._operations import VirtualMachineScaleSetRollingUpgradesOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMExtensionsOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMsOperations # type: ignore +from ._operations import LogAnalyticsOperations # type: ignore +from ._operations import VirtualMachineRunCommandsOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMRunCommandsOperations # 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__ = [ @@ -65,5 +71,5 @@ "VirtualMachineRunCommandsOperations", "VirtualMachineScaleSetVMRunCommandsOperations", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_11_01/aio/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_11_01/aio/operations/_operations.py index 0b010741abeb0..76da3246ffa31 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_11_01/aio/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_11_01/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. @@ -8,21 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import ( - Any, - AsyncIterable, - AsyncIterator, - Callable, - Dict, - IO, - List, - Optional, - Type, - TypeVar, - Union, - cast, - overload, -) +from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, List, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -223,7 +209,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]] @@ -264,7 +250,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.ComputeOperationValue"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.ComputeOperationListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -417,7 +403,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2021_11_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -544,7 +530,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2021_11_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -599,9 +585,7 @@ async def update( return deserialized # type: ignore @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, availability_set_name: str, **kwargs: Any - ) -> None: + async def delete(self, resource_group_name: str, availability_set_name: str, **kwargs: Any) -> None: """Delete an availability set. :param resource_group_name: The name of the resource group. Required. @@ -612,7 +596,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -662,7 +646,7 @@ async def get(self, resource_group_name: str, availability_set_name: str, **kwar :rtype: ~azure.mgmt.compute.v2021_11_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -724,7 +708,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -802,7 +786,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -885,7 +869,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1043,7 +1027,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2021_11_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1173,7 +1157,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2021_11_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1228,9 +1212,7 @@ async def update( return deserialized # type: ignore @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, proximity_placement_group_name: str, **kwargs: Any - ) -> None: + async def delete(self, resource_group_name: str, proximity_placement_group_name: str, **kwargs: Any) -> None: """Delete a proximity placement group. :param resource_group_name: The name of the resource group. Required. @@ -1241,7 +1223,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1301,7 +1283,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_11_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1360,7 +1342,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Proximit api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1440,7 +1422,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1601,7 +1583,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2021_11_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1728,7 +1710,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2021_11_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1783,9 +1765,7 @@ async def update( return deserialized # type: ignore @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, host_group_name: str, **kwargs: Any - ) -> None: + async def delete(self, resource_group_name: str, host_group_name: str, **kwargs: Any) -> None: """Delete a dedicated host group. :param resource_group_name: The name of the resource group. Required. @@ -1796,7 +1776,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1858,7 +1838,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_11_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1921,7 +1901,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1998,7 +1978,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Dedicate api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2087,7 +2067,7 @@ async def _create_or_update_initial( parameters: Union[_models.DedicatedHost, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2291,7 +2271,7 @@ async def _update_initial( parameters: Union[_models.DedicatedHostUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2490,7 +2470,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2621,7 +2601,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_11_01.models.DedicatedHost :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2687,7 +2667,7 @@ def list_by_host_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.DedicatedHostListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2752,7 +2732,7 @@ async def get_next(next_link=None): async def _restart_initial( self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2898,7 +2878,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.SshPubli api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2979,7 +2959,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3113,7 +3093,7 @@ async def create( :rtype: ~azure.mgmt.compute.v2021_11_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3241,7 +3221,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2021_11_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3296,9 +3276,7 @@ async def update( return deserialized # type: ignore @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, ssh_public_key_name: str, **kwargs: Any - ) -> None: + async def delete(self, resource_group_name: str, ssh_public_key_name: str, **kwargs: Any) -> None: """Delete an SSH public key. :param resource_group_name: The name of the resource group. Required. @@ -3309,7 +3287,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3361,7 +3339,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_11_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3419,7 +3397,7 @@ async def generate_key_pair( :rtype: ~azure.mgmt.compute.v2021_11_01.models.SshPublicKeyGenerateKeyPairResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3500,7 +3478,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_11_01.models.VirtualMachineExtensionImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3558,7 +3536,7 @@ async def list_types( :rtype: list[~azure.mgmt.compute.v2021_11_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3630,7 +3608,7 @@ async def list_versions( :rtype: list[~azure.mgmt.compute.v2021_11_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3705,7 +3683,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineExtension, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3915,7 +3893,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineExtensionUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4121,7 +4099,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_name: str, vm_extension_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4251,7 +4229,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_11_01.models.VirtualMachineExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4311,7 +4289,7 @@ async def list( :rtype: ~azure.mgmt.compute.v2021_11_01.models.VirtualMachineExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4395,7 +4373,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_11_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4474,7 +4452,7 @@ async def list( :rtype: list[~azure.mgmt.compute.v2021_11_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4535,7 +4513,7 @@ async def list_offers( :rtype: list[~azure.mgmt.compute.v2021_11_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4587,7 +4565,7 @@ async def list_publishers(self, location: str, **kwargs: Any) -> List[_models.Vi :rtype: list[~azure.mgmt.compute.v2021_11_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4644,7 +4622,7 @@ async def list_skus( :rtype: list[~azure.mgmt.compute.v2021_11_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4730,7 +4708,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_11_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4815,7 +4793,7 @@ async def list( :rtype: list[~azure.mgmt.compute.v2021_11_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4880,7 +4858,7 @@ async def list_offers( :rtype: list[~azure.mgmt.compute.v2021_11_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4937,7 +4915,7 @@ async def list_publishers( :rtype: list[~azure.mgmt.compute.v2021_11_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4998,7 +4976,7 @@ async def list_skus( :rtype: list[~azure.mgmt.compute.v2021_11_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5080,7 +5058,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.Usage"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.ListUsagesResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5180,7 +5158,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> AsyncIterable["_mode api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5248,7 +5226,7 @@ async def _capture_initial( parameters: Union[_models.VirtualMachineCaptureParameters, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5446,7 +5424,7 @@ async def _create_or_update_initial( parameters: Union[_models.VirtualMachine, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5641,7 +5619,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5829,7 +5807,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_name: str, *, force_deletion: Optional[bool] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5960,7 +5938,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_11_01.models.VirtualMachine :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6017,7 +5995,7 @@ async def instance_view( :rtype: ~azure.mgmt.compute.v2021_11_01.models.VirtualMachineInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6062,7 +6040,7 @@ async def instance_view( async def _convert_to_managed_disks_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6167,7 +6145,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _deallocate_initial( self, resource_group_name: str, vm_name: str, *, hibernate: Optional[bool] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6275,9 +6253,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace_async - async def generalize( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, vm_name: str, **kwargs: Any - ) -> None: + async def generalize(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> None: """Sets the OS state of the virtual machine to generalized. It is recommended to sysprep the virtual machine before performing this operation. :code:`
`For Windows, please refer to `Create a managed image of a generalized VM in Azure @@ -6293,7 +6269,7 @@ async def generalize( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6335,6 +6311,7 @@ async def generalize( # pylint: disable=inconsistent-return-statements def list( self, resource_group_name: str, *, filter: Optional[str] = None, **kwargs: Any ) -> AsyncIterable["_models.VirtualMachine"]: + # pylint: disable=line-too-long """Lists all of the virtual machines in the specified resource group. Use the nextLink property in the response to get the next page of virtual machines. @@ -6356,7 +6333,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6422,6 +6399,7 @@ async def get_next(next_link=None): def list_all( self, *, status_only: Optional[str] = None, filter: Optional[str] = None, **kwargs: Any ) -> AsyncIterable["_models.VirtualMachine"]: + # pylint: disable=line-too-long """Lists all of the virtual machines in the specified subscription. Use the nextLink property in the response to get the next page of virtual machines. @@ -6444,7 +6422,7 @@ def list_all( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6528,7 +6506,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6593,7 +6571,7 @@ async def get_next(next_link=None): async def _power_off_initial( self, resource_group_name: str, vm_name: str, *, skip_shutdown: bool = False, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6702,7 +6680,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _reapply_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6802,7 +6780,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _restart_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6902,7 +6880,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _start_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7002,7 +6980,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _redeploy_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7108,7 +7086,7 @@ async def _reimage_initial( parameters: Optional[Union[_models.VirtualMachineReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7313,7 +7291,7 @@ async def retrieve_boot_diagnostics_data( :rtype: ~azure.mgmt.compute.v2021_11_01.models.RetrieveBootDiagnosticsDataResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7359,7 +7337,7 @@ async def retrieve_boot_diagnostics_data( async def _perform_maintenance_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7461,9 +7439,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace_async - async def simulate_eviction( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, vm_name: str, **kwargs: Any - ) -> None: + async def simulate_eviction(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> None: """The operation to simulate the eviction of spot virtual machine. :param resource_group_name: The name of the resource group. Required. @@ -7474,7 +7450,7 @@ async def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7515,7 +7491,7 @@ async def simulate_eviction( # pylint: disable=inconsistent-return-statements async def _assess_patches_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7631,7 +7607,7 @@ async def _install_patches_initial( install_patches_input: Union[_models.VirtualMachineInstallPatchesParameters, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7829,7 +7805,7 @@ async def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8056,7 +8032,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> AsyncIterable["_mode api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8124,7 +8100,7 @@ async def _create_or_update_initial( parameters: Union[_models.VirtualMachineScaleSet, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8316,7 +8292,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineScaleSetUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8505,7 +8481,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, *, force_deletion: Optional[bool] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8634,7 +8610,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_11_01.models.VirtualMachineScaleSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8684,7 +8660,7 @@ async def _deallocate_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8881,7 +8857,7 @@ async def _delete_instances_initial( force_deletion: Optional[bool] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9089,7 +9065,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2021_11_01.models.VirtualMachineScaleSetInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9149,7 +9125,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9228,7 +9204,7 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.VirtualMachineScaleS api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.VirtualMachineScaleSetListWithLinkResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9311,7 +9287,7 @@ def list_skus( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.VirtualMachineScaleSetListSkusResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9377,6 +9353,7 @@ async def get_next(next_link=None): def get_os_upgrade_history( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> AsyncIterable["_models.UpgradeOperationHistoricalStatusInfo"]: + # pylint: disable=line-too-long """Gets list of OS upgrades on a VM scale set instance. :param resource_group_name: The name of the resource group. Required. @@ -9395,7 +9372,7 @@ def get_os_upgrade_history( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.VirtualMachineScaleSetListOSUpgradeHistory] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9466,7 +9443,7 @@ async def _power_off_initial( skip_shutdown: bool = False, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9679,7 +9656,7 @@ async def _restart_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9868,7 +9845,7 @@ async def _start_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10057,7 +10034,7 @@ async def _redeploy_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10249,7 +10226,7 @@ async def _perform_maintenance_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10447,7 +10424,7 @@ async def _update_instances_initial( vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10633,7 +10610,7 @@ async def _reimage_initial( vm_scale_set_reimage_input: Optional[Union[_models.VirtualMachineScaleSetReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10826,7 +10803,7 @@ async def _reimage_all_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11042,7 +11019,7 @@ async def force_recovery_service_fabric_platform_update_domain_walk( # pylint: :rtype: ~azure.mgmt.compute.v2021_11_01.models.RecoveryWalkResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11088,7 +11065,7 @@ async def force_recovery_service_fabric_platform_update_domain_walk( # pylint: return deserialized # type: ignore @overload - async def convert_to_single_placement_group( # pylint: disable=inconsistent-return-statements + async def convert_to_single_placement_group( self, resource_group_name: str, vm_scale_set_name: str, @@ -11116,7 +11093,7 @@ async def convert_to_single_placement_group( # pylint: disable=inconsistent-ret """ @overload - async def convert_to_single_placement_group( # pylint: disable=inconsistent-return-statements + async def convert_to_single_placement_group( self, resource_group_name: str, vm_scale_set_name: str, @@ -11143,7 +11120,7 @@ async def convert_to_single_placement_group( # pylint: disable=inconsistent-ret """ @distributed_trace_async - async def convert_to_single_placement_group( # pylint: disable=inconsistent-return-statements + async def convert_to_single_placement_group( self, resource_group_name: str, vm_scale_set_name: str, @@ -11166,7 +11143,7 @@ async def convert_to_single_placement_group( # pylint: disable=inconsistent-ret :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11223,7 +11200,7 @@ async def _set_orchestration_service_state_initial( parameters: Union[_models.OrchestrationServiceStateInput, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11441,7 +11418,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.VirtualMa api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11526,7 +11503,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, image_name: str, parameters: Union[_models.Image, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11708,7 +11685,7 @@ async def _update_initial( parameters: Union[_models.ImageUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11888,7 +11865,7 @@ def get_long_running_output(pipeline_response): ) async def _delete_initial(self, resource_group_name: str, image_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12003,7 +11980,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_11_01.models.Image :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12062,7 +12039,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12138,7 +12115,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Image"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12300,7 +12277,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2021_11_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12430,7 +12407,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2021_11_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12487,7 +12464,7 @@ async def update( async def _delete_initial( self, resource_group_name: str, restore_point_collection_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12613,7 +12590,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_11_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12674,7 +12651,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.RestorePointCollectionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12753,7 +12730,7 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.RestorePointCollecti api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.RestorePointCollectionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12842,7 +12819,7 @@ async def _create_initial( parameters: Union[_models.RestorePoint, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13041,7 +13018,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, restore_point_collection_name: str, restore_point_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13171,7 +13148,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_11_01.models.RestorePoint :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13315,7 +13292,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2021_11_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13448,7 +13425,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2021_11_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13503,9 +13480,7 @@ async def update( return deserialized # type: ignore @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, capacity_reservation_group_name: str, **kwargs: Any - ) -> None: + async def delete(self, resource_group_name: str, capacity_reservation_group_name: str, **kwargs: Any) -> None: """The operation to delete a capacity reservation group. This operation is allowed only if all the associated resources are disassociated from the reservation group and all capacity reservations under the reservation group have also been deleted. Please refer to @@ -13519,7 +13494,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13583,7 +13558,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_11_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13657,7 +13632,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.CapacityReservationGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13744,7 +13719,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.CapacityReservationGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13834,7 +13809,7 @@ async def _create_or_update_initial( parameters: Union[_models.CapacityReservation, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14044,7 +14019,7 @@ async def _update_initial( parameters: Union[_models.CapacityReservationUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14247,7 +14222,7 @@ async def _delete_initial( capacity_reservation_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14385,7 +14360,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_11_01.models.CapacityReservation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14451,7 +14426,7 @@ def list_by_capacity_reservation_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.CapacityReservationListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14542,7 +14517,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtension, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14753,7 +14728,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtensionUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14960,7 +14935,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, vmss_extension_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15090,7 +15065,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_11_01.models.VirtualMachineScaleSetExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15156,7 +15131,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.VirtualMachineScaleSetExtensionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15242,7 +15217,7 @@ def __init__(self, *args, **kwargs) -> None: async def _cancel_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15346,7 +15321,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_os_upgrade_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15452,7 +15427,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_extension_upgrade_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15569,7 +15544,7 @@ async def get_latest( :rtype: ~azure.mgmt.compute.v2021_11_01.models.RollingUpgradeStatusInfo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15641,7 +15616,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetVMExtension, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15861,7 +15836,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetVMExtensionUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16076,7 +16051,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, vm_extension_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16212,7 +16187,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_11_01.models.VirtualMachineScaleSetVMExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16281,7 +16256,7 @@ async def list( :rtype: ~azure.mgmt.compute.v2021_11_01.models.VirtualMachineScaleSetVMExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16358,7 +16333,7 @@ async def _reimage_initial( ] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16557,7 +16532,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _reimage_all_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16666,7 +16641,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _deallocate_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16781,7 +16756,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineScaleSetVM, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16991,7 +16966,7 @@ async def _delete_initial( force_deletion: Optional[bool] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17133,7 +17108,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_11_01.models.VirtualMachineScaleSetVM :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17193,7 +17168,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2021_11_01.models.VirtualMachineScaleSetVMInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17275,7 +17250,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.VirtualMachineScaleSetVMListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17349,7 +17324,7 @@ async def _power_off_initial( skip_shutdown: bool = False, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17471,7 +17446,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _restart_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17579,7 +17554,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17687,7 +17662,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _redeploy_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17821,7 +17796,7 @@ async def retrieve_boot_diagnostics_data( :rtype: ~azure.mgmt.compute.v2021_11_01.models.RetrieveBootDiagnosticsDataResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17868,7 +17843,7 @@ async def retrieve_boot_diagnostics_data( async def _perform_maintenance_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17974,7 +17949,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace_async - async def simulate_eviction( # pylint: disable=inconsistent-return-statements + async def simulate_eviction( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: """The operation to simulate the eviction of spot virtual machine in a VM scale set. @@ -17989,7 +17964,7 @@ async def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18036,7 +18011,7 @@ async def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18258,7 +18233,7 @@ def __init__(self, *args, **kwargs) -> None: async def _export_request_rate_by_interval_initial( self, location: str, parameters: Union[_models.RequestRateByIntervalInput, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18436,7 +18411,7 @@ def get_long_running_output(pipeline_response): async def _export_throttled_requests_initial( self, location: str, parameters: Union[_models.ThrottledRequestsInput, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18647,7 +18622,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.RunComman api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.RunCommandListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18720,7 +18695,7 @@ async def get(self, location: str, command_id: str, **kwargs: Any) -> _models.Ru :rtype: ~azure.mgmt.compute.v2021_11_01.models.RunCommandDocument :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18770,7 +18745,7 @@ async def _create_or_update_initial( run_command: Union[_models.VirtualMachineRunCommand, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18979,7 +18954,7 @@ async def _update_initial( run_command: Union[_models.VirtualMachineRunCommandUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19184,7 +19159,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_name: str, run_command_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19314,7 +19289,7 @@ async def get_by_virtual_machine( :rtype: ~azure.mgmt.compute.v2021_11_01.models.VirtualMachineRunCommand :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19382,7 +19357,7 @@ def list_by_virtual_machine( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.VirtualMachineRunCommandsListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19475,7 +19450,7 @@ async def _create_or_update_initial( run_command: Union[_models.VirtualMachineRunCommand, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19693,7 +19668,7 @@ async def _update_initial( run_command: Union[_models.VirtualMachineRunCommandUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19906,7 +19881,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, run_command_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20042,7 +20017,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_11_01.models.VirtualMachineRunCommand :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20119,7 +20094,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.VirtualMachineRunCommandsListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_11_01/models/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_11_01/models/__init__.py index 846eae6604ca5..a87abb2d39818 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_11_01/models/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_11_01/models/__init__.py @@ -5,321 +5,332 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._models_py3 import AdditionalCapabilities -from ._models_py3 import AdditionalUnattendContent -from ._models_py3 import ApiEntityReference -from ._models_py3 import ApiError -from ._models_py3 import ApiErrorBase -from ._models_py3 import ApplicationProfile -from ._models_py3 import AutomaticOSUpgradePolicy -from ._models_py3 import AutomaticOSUpgradeProperties -from ._models_py3 import AutomaticRepairsPolicy -from ._models_py3 import AvailabilitySet -from ._models_py3 import AvailabilitySetListResult -from ._models_py3 import AvailabilitySetUpdate -from ._models_py3 import AvailablePatchSummary -from ._models_py3 import BillingProfile -from ._models_py3 import BootDiagnostics -from ._models_py3 import BootDiagnosticsInstanceView -from ._models_py3 import CapacityReservation -from ._models_py3 import CapacityReservationGroup -from ._models_py3 import CapacityReservationGroupInstanceView -from ._models_py3 import CapacityReservationGroupListResult -from ._models_py3 import CapacityReservationGroupUpdate -from ._models_py3 import CapacityReservationInstanceView -from ._models_py3 import CapacityReservationInstanceViewWithName -from ._models_py3 import CapacityReservationListResult -from ._models_py3 import CapacityReservationProfile -from ._models_py3 import CapacityReservationUpdate -from ._models_py3 import CapacityReservationUtilization -from ._models_py3 import ComputeOperationListResult -from ._models_py3 import ComputeOperationValue -from ._models_py3 import DataDisk -from ._models_py3 import DataDiskImage -from ._models_py3 import DedicatedHost -from ._models_py3 import DedicatedHostAllocatableVM -from ._models_py3 import DedicatedHostAvailableCapacity -from ._models_py3 import DedicatedHostGroup -from ._models_py3 import DedicatedHostGroupInstanceView -from ._models_py3 import DedicatedHostGroupListResult -from ._models_py3 import DedicatedHostGroupUpdate -from ._models_py3 import DedicatedHostInstanceView -from ._models_py3 import DedicatedHostInstanceViewWithName -from ._models_py3 import DedicatedHostListResult -from ._models_py3 import DedicatedHostUpdate -from ._models_py3 import DiagnosticsProfile -from ._models_py3 import DiffDiskSettings -from ._models_py3 import DisallowedConfiguration -from ._models_py3 import DiskEncryptionSetParameters -from ._models_py3 import DiskEncryptionSettings -from ._models_py3 import DiskInstanceView -from ._models_py3 import DiskRestorePointInstanceView -from ._models_py3 import DiskRestorePointReplicationStatus -from ._models_py3 import ExtendedLocation -from ._models_py3 import HardwareProfile -from ._models_py3 import Image -from ._models_py3 import ImageDataDisk -from ._models_py3 import ImageDisk -from ._models_py3 import ImageListResult -from ._models_py3 import ImageOSDisk -from ._models_py3 import ImageReference -from ._models_py3 import ImageStorageProfile -from ._models_py3 import ImageUpdate -from ._models_py3 import InnerError -from ._models_py3 import InstanceViewStatus -from ._models_py3 import KeyVaultKeyReference -from ._models_py3 import KeyVaultSecretReference -from ._models_py3 import LastPatchInstallationSummary -from ._models_py3 import LinuxConfiguration -from ._models_py3 import LinuxParameters -from ._models_py3 import LinuxPatchSettings -from ._models_py3 import ListUsagesResult -from ._models_py3 import LogAnalyticsInputBase -from ._models_py3 import LogAnalyticsOperationResult -from ._models_py3 import LogAnalyticsOutput -from ._models_py3 import MaintenanceRedeployStatus -from ._models_py3 import ManagedDiskParameters -from ._models_py3 import NetworkInterfaceReference -from ._models_py3 import NetworkProfile -from ._models_py3 import OSDisk -from ._models_py3 import OSDiskImage -from ._models_py3 import OSProfile -from ._models_py3 import OrchestrationServiceStateInput -from ._models_py3 import OrchestrationServiceSummary -from ._models_py3 import PatchInstallationDetail -from ._models_py3 import PatchSettings -from ._models_py3 import Plan -from ._models_py3 import ProximityPlacementGroup -from ._models_py3 import ProximityPlacementGroupListResult -from ._models_py3 import ProximityPlacementGroupUpdate -from ._models_py3 import ProxyResource -from ._models_py3 import PublicIPAddressSku -from ._models_py3 import PurchasePlan -from ._models_py3 import RecoveryWalkResponse -from ._models_py3 import RequestRateByIntervalInput -from ._models_py3 import Resource -from ._models_py3 import RestorePoint -from ._models_py3 import RestorePointCollection -from ._models_py3 import RestorePointCollectionListResult -from ._models_py3 import RestorePointCollectionSourceProperties -from ._models_py3 import RestorePointCollectionUpdate -from ._models_py3 import RestorePointInstanceView -from ._models_py3 import RestorePointSourceMetadata -from ._models_py3 import RestorePointSourceVMDataDisk -from ._models_py3 import RestorePointSourceVMOSDisk -from ._models_py3 import RestorePointSourceVMStorageProfile -from ._models_py3 import RetrieveBootDiagnosticsDataResult -from ._models_py3 import RollbackStatusInfo -from ._models_py3 import RollingUpgradePolicy -from ._models_py3 import RollingUpgradeProgressInfo -from ._models_py3 import RollingUpgradeRunningStatus -from ._models_py3 import RollingUpgradeStatusInfo -from ._models_py3 import RunCommandDocument -from ._models_py3 import RunCommandDocumentBase -from ._models_py3 import RunCommandInput -from ._models_py3 import RunCommandInputParameter -from ._models_py3 import RunCommandListResult -from ._models_py3 import RunCommandParameterDefinition -from ._models_py3 import RunCommandResult -from ._models_py3 import ScaleInPolicy -from ._models_py3 import ScheduledEventsProfile -from ._models_py3 import SecurityProfile -from ._models_py3 import Sku -from ._models_py3 import SpotRestorePolicy -from ._models_py3 import SshConfiguration -from ._models_py3 import SshPublicKey -from ._models_py3 import SshPublicKeyGenerateKeyPairResult -from ._models_py3 import SshPublicKeyResource -from ._models_py3 import SshPublicKeyUpdateResource -from ._models_py3 import SshPublicKeysGroupListResult -from ._models_py3 import StorageProfile -from ._models_py3 import SubResource -from ._models_py3 import SubResourceReadOnly -from ._models_py3 import SubResourceWithColocationStatus -from ._models_py3 import TerminateNotificationProfile -from ._models_py3 import ThrottledRequestsInput -from ._models_py3 import UefiSettings -from ._models_py3 import UpdateResource -from ._models_py3 import UpgradeOperationHistoricalStatusInfo -from ._models_py3 import UpgradeOperationHistoricalStatusInfoProperties -from ._models_py3 import UpgradeOperationHistoryStatus -from ._models_py3 import UpgradePolicy -from ._models_py3 import Usage -from ._models_py3 import UsageName -from ._models_py3 import UserAssignedIdentitiesValue -from ._models_py3 import VMDiskSecurityProfile -from ._models_py3 import VMGalleryApplication -from ._models_py3 import VMScaleSetConvertToSinglePlacementGroupInput -from ._models_py3 import VMSizeProperties -from ._models_py3 import VaultCertificate -from ._models_py3 import VaultSecretGroup -from ._models_py3 import VirtualHardDisk -from ._models_py3 import VirtualMachine -from ._models_py3 import VirtualMachineAgentInstanceView -from ._models_py3 import VirtualMachineAssessPatchesResult -from ._models_py3 import VirtualMachineCaptureParameters -from ._models_py3 import VirtualMachineCaptureResult -from ._models_py3 import VirtualMachineExtension -from ._models_py3 import VirtualMachineExtensionHandlerInstanceView -from ._models_py3 import VirtualMachineExtensionImage -from ._models_py3 import VirtualMachineExtensionInstanceView -from ._models_py3 import VirtualMachineExtensionUpdate -from ._models_py3 import VirtualMachineExtensionsListResult -from ._models_py3 import VirtualMachineHealthStatus -from ._models_py3 import VirtualMachineIdentity -from ._models_py3 import VirtualMachineImage -from ._models_py3 import VirtualMachineImageFeature -from ._models_py3 import VirtualMachineImageResource -from ._models_py3 import VirtualMachineInstallPatchesParameters -from ._models_py3 import VirtualMachineInstallPatchesResult -from ._models_py3 import VirtualMachineInstanceView -from ._models_py3 import VirtualMachineIpTag -from ._models_py3 import VirtualMachineListResult -from ._models_py3 import VirtualMachineNetworkInterfaceConfiguration -from ._models_py3 import VirtualMachineNetworkInterfaceDnsSettingsConfiguration -from ._models_py3 import VirtualMachineNetworkInterfaceIPConfiguration -from ._models_py3 import VirtualMachinePatchStatus -from ._models_py3 import VirtualMachinePublicIPAddressConfiguration -from ._models_py3 import VirtualMachinePublicIPAddressDnsSettingsConfiguration -from ._models_py3 import VirtualMachineReimageParameters -from ._models_py3 import VirtualMachineRunCommand -from ._models_py3 import VirtualMachineRunCommandInstanceView -from ._models_py3 import VirtualMachineRunCommandScriptSource -from ._models_py3 import VirtualMachineRunCommandUpdate -from ._models_py3 import VirtualMachineRunCommandsListResult -from ._models_py3 import VirtualMachineScaleSet -from ._models_py3 import VirtualMachineScaleSetDataDisk -from ._models_py3 import VirtualMachineScaleSetExtension -from ._models_py3 import VirtualMachineScaleSetExtensionListResult -from ._models_py3 import VirtualMachineScaleSetExtensionProfile -from ._models_py3 import VirtualMachineScaleSetExtensionUpdate -from ._models_py3 import VirtualMachineScaleSetHardwareProfile -from ._models_py3 import VirtualMachineScaleSetIPConfiguration -from ._models_py3 import VirtualMachineScaleSetIdentity -from ._models_py3 import VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue -from ._models_py3 import VirtualMachineScaleSetInstanceView -from ._models_py3 import VirtualMachineScaleSetInstanceViewStatusesSummary -from ._models_py3 import VirtualMachineScaleSetIpTag -from ._models_py3 import VirtualMachineScaleSetListOSUpgradeHistory -from ._models_py3 import VirtualMachineScaleSetListResult -from ._models_py3 import VirtualMachineScaleSetListSkusResult -from ._models_py3 import VirtualMachineScaleSetListWithLinkResult -from ._models_py3 import VirtualMachineScaleSetManagedDiskParameters -from ._models_py3 import VirtualMachineScaleSetNetworkConfiguration -from ._models_py3 import VirtualMachineScaleSetNetworkConfigurationDnsSettings -from ._models_py3 import VirtualMachineScaleSetNetworkProfile -from ._models_py3 import VirtualMachineScaleSetOSDisk -from ._models_py3 import VirtualMachineScaleSetOSProfile -from ._models_py3 import VirtualMachineScaleSetPublicIPAddressConfiguration -from ._models_py3 import VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings -from ._models_py3 import VirtualMachineScaleSetReimageParameters -from ._models_py3 import VirtualMachineScaleSetSku -from ._models_py3 import VirtualMachineScaleSetSkuCapacity -from ._models_py3 import VirtualMachineScaleSetStorageProfile -from ._models_py3 import VirtualMachineScaleSetUpdate -from ._models_py3 import VirtualMachineScaleSetUpdateIPConfiguration -from ._models_py3 import VirtualMachineScaleSetUpdateNetworkConfiguration -from ._models_py3 import VirtualMachineScaleSetUpdateNetworkProfile -from ._models_py3 import VirtualMachineScaleSetUpdateOSDisk -from ._models_py3 import VirtualMachineScaleSetUpdateOSProfile -from ._models_py3 import VirtualMachineScaleSetUpdatePublicIPAddressConfiguration -from ._models_py3 import VirtualMachineScaleSetUpdateStorageProfile -from ._models_py3 import VirtualMachineScaleSetUpdateVMProfile -from ._models_py3 import VirtualMachineScaleSetVM -from ._models_py3 import VirtualMachineScaleSetVMExtension -from ._models_py3 import VirtualMachineScaleSetVMExtensionUpdate -from ._models_py3 import VirtualMachineScaleSetVMExtensionsListResult -from ._models_py3 import VirtualMachineScaleSetVMExtensionsSummary -from ._models_py3 import VirtualMachineScaleSetVMInstanceIDs -from ._models_py3 import VirtualMachineScaleSetVMInstanceRequiredIDs -from ._models_py3 import VirtualMachineScaleSetVMInstanceView -from ._models_py3 import VirtualMachineScaleSetVMListResult -from ._models_py3 import VirtualMachineScaleSetVMNetworkProfileConfiguration -from ._models_py3 import VirtualMachineScaleSetVMProfile -from ._models_py3 import VirtualMachineScaleSetVMProtectionPolicy -from ._models_py3 import VirtualMachineScaleSetVMReimageParameters -from ._models_py3 import VirtualMachineSize -from ._models_py3 import VirtualMachineSizeListResult -from ._models_py3 import VirtualMachineSoftwarePatchProperties -from ._models_py3 import VirtualMachineStatusCodeCount -from ._models_py3 import VirtualMachineUpdate -from ._models_py3 import WinRMConfiguration -from ._models_py3 import WinRMListener -from ._models_py3 import WindowsConfiguration -from ._models_py3 import WindowsParameters +from typing import TYPE_CHECKING -from ._compute_management_client_enums import ArchitectureTypes -from ._compute_management_client_enums import AvailabilitySetSkuTypes -from ._compute_management_client_enums import CachingTypes -from ._compute_management_client_enums import CapacityReservationGroupInstanceViewTypes -from ._compute_management_client_enums import CapacityReservationInstanceViewTypes -from ._compute_management_client_enums import ConsistencyModeTypes -from ._compute_management_client_enums import DedicatedHostLicenseTypes -from ._compute_management_client_enums import DeleteOptions -from ._compute_management_client_enums import DiffDiskOptions -from ._compute_management_client_enums import DiffDiskPlacement -from ._compute_management_client_enums import DiskCreateOptionTypes -from ._compute_management_client_enums import DiskDeleteOptionTypes -from ._compute_management_client_enums import DiskDetachOptionTypes -from ._compute_management_client_enums import ExecutionState -from ._compute_management_client_enums import ExpandTypesForGetCapacityReservationGroups -from ._compute_management_client_enums import ExpandTypesForGetVMScaleSets -from ._compute_management_client_enums import ExtendedLocationTypes -from ._compute_management_client_enums import HyperVGenerationType -from ._compute_management_client_enums import HyperVGenerationTypes -from ._compute_management_client_enums import IPVersion -from ._compute_management_client_enums import IPVersions -from ._compute_management_client_enums import InstanceViewTypes -from ._compute_management_client_enums import IntervalInMins -from ._compute_management_client_enums import LinuxPatchAssessmentMode -from ._compute_management_client_enums import LinuxVMGuestPatchMode -from ._compute_management_client_enums import MaintenanceOperationResultCodeTypes -from ._compute_management_client_enums import NetworkApiVersion -from ._compute_management_client_enums import OperatingSystemStateTypes -from ._compute_management_client_enums import OperatingSystemType -from ._compute_management_client_enums import OperatingSystemTypes -from ._compute_management_client_enums import OrchestrationMode -from ._compute_management_client_enums import OrchestrationServiceNames -from ._compute_management_client_enums import OrchestrationServiceState -from ._compute_management_client_enums import OrchestrationServiceStateAction -from ._compute_management_client_enums import PatchAssessmentState -from ._compute_management_client_enums import PatchInstallationState -from ._compute_management_client_enums import PatchOperationStatus -from ._compute_management_client_enums import ProtocolTypes -from ._compute_management_client_enums import ProximityPlacementGroupType -from ._compute_management_client_enums import PublicIPAddressSkuName -from ._compute_management_client_enums import PublicIPAddressSkuTier -from ._compute_management_client_enums import PublicIPAllocationMethod -from ._compute_management_client_enums import RepairAction -from ._compute_management_client_enums import ResourceIdentityType -from ._compute_management_client_enums import RestorePointCollectionExpandOptions -from ._compute_management_client_enums import RestorePointExpandOptions -from ._compute_management_client_enums import RollingUpgradeActionType -from ._compute_management_client_enums import RollingUpgradeStatusCode -from ._compute_management_client_enums import SecurityEncryptionTypes -from ._compute_management_client_enums import SecurityTypes -from ._compute_management_client_enums import SettingNames -from ._compute_management_client_enums import StatusLevelTypes -from ._compute_management_client_enums import StorageAccountTypes -from ._compute_management_client_enums import UpgradeMode -from ._compute_management_client_enums import UpgradeOperationInvoker -from ._compute_management_client_enums import UpgradeState -from ._compute_management_client_enums import VMGuestPatchClassificationLinux -from ._compute_management_client_enums import VMGuestPatchClassificationWindows -from ._compute_management_client_enums import VMGuestPatchRebootBehavior -from ._compute_management_client_enums import VMGuestPatchRebootSetting -from ._compute_management_client_enums import VMGuestPatchRebootStatus -from ._compute_management_client_enums import VirtualMachineEvictionPolicyTypes -from ._compute_management_client_enums import VirtualMachinePriorityTypes -from ._compute_management_client_enums import VirtualMachineScaleSetScaleInRules -from ._compute_management_client_enums import VirtualMachineScaleSetSkuScaleType -from ._compute_management_client_enums import VirtualMachineSizeTypes -from ._compute_management_client_enums import VmDiskTypes -from ._compute_management_client_enums import WindowsPatchAssessmentMode -from ._compute_management_client_enums import WindowsVMGuestPatchMode +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + + +from ._models_py3 import ( # type: ignore + AdditionalCapabilities, + AdditionalUnattendContent, + ApiEntityReference, + ApiError, + ApiErrorBase, + ApplicationProfile, + AutomaticOSUpgradePolicy, + AutomaticOSUpgradeProperties, + AutomaticRepairsPolicy, + AvailabilitySet, + AvailabilitySetListResult, + AvailabilitySetUpdate, + AvailablePatchSummary, + BillingProfile, + BootDiagnostics, + BootDiagnosticsInstanceView, + CapacityReservation, + CapacityReservationGroup, + CapacityReservationGroupInstanceView, + CapacityReservationGroupListResult, + CapacityReservationGroupUpdate, + CapacityReservationInstanceView, + CapacityReservationInstanceViewWithName, + CapacityReservationListResult, + CapacityReservationProfile, + CapacityReservationUpdate, + CapacityReservationUtilization, + ComputeOperationListResult, + ComputeOperationValue, + DataDisk, + DataDiskImage, + DedicatedHost, + DedicatedHostAllocatableVM, + DedicatedHostAvailableCapacity, + DedicatedHostGroup, + DedicatedHostGroupInstanceView, + DedicatedHostGroupListResult, + DedicatedHostGroupUpdate, + DedicatedHostInstanceView, + DedicatedHostInstanceViewWithName, + DedicatedHostListResult, + DedicatedHostUpdate, + DiagnosticsProfile, + DiffDiskSettings, + DisallowedConfiguration, + DiskEncryptionSetParameters, + DiskEncryptionSettings, + DiskInstanceView, + DiskRestorePointInstanceView, + DiskRestorePointReplicationStatus, + ExtendedLocation, + HardwareProfile, + Image, + ImageDataDisk, + ImageDisk, + ImageListResult, + ImageOSDisk, + ImageReference, + ImageStorageProfile, + ImageUpdate, + InnerError, + InstanceViewStatus, + KeyVaultKeyReference, + KeyVaultSecretReference, + LastPatchInstallationSummary, + LinuxConfiguration, + LinuxParameters, + LinuxPatchSettings, + ListUsagesResult, + LogAnalyticsInputBase, + LogAnalyticsOperationResult, + LogAnalyticsOutput, + MaintenanceRedeployStatus, + ManagedDiskParameters, + NetworkInterfaceReference, + NetworkProfile, + OSDisk, + OSDiskImage, + OSProfile, + OrchestrationServiceStateInput, + OrchestrationServiceSummary, + PatchInstallationDetail, + PatchSettings, + Plan, + ProximityPlacementGroup, + ProximityPlacementGroupListResult, + ProximityPlacementGroupUpdate, + ProxyResource, + PublicIPAddressSku, + PurchasePlan, + RecoveryWalkResponse, + RequestRateByIntervalInput, + Resource, + RestorePoint, + RestorePointCollection, + RestorePointCollectionListResult, + RestorePointCollectionSourceProperties, + RestorePointCollectionUpdate, + RestorePointInstanceView, + RestorePointSourceMetadata, + RestorePointSourceVMDataDisk, + RestorePointSourceVMOSDisk, + RestorePointSourceVMStorageProfile, + RetrieveBootDiagnosticsDataResult, + RollbackStatusInfo, + RollingUpgradePolicy, + RollingUpgradeProgressInfo, + RollingUpgradeRunningStatus, + RollingUpgradeStatusInfo, + RunCommandDocument, + RunCommandDocumentBase, + RunCommandInput, + RunCommandInputParameter, + RunCommandListResult, + RunCommandParameterDefinition, + RunCommandResult, + ScaleInPolicy, + ScheduledEventsProfile, + SecurityProfile, + Sku, + SpotRestorePolicy, + SshConfiguration, + SshPublicKey, + SshPublicKeyGenerateKeyPairResult, + SshPublicKeyResource, + SshPublicKeyUpdateResource, + SshPublicKeysGroupListResult, + StorageProfile, + SubResource, + SubResourceReadOnly, + SubResourceWithColocationStatus, + TerminateNotificationProfile, + ThrottledRequestsInput, + UefiSettings, + UpdateResource, + UpgradeOperationHistoricalStatusInfo, + UpgradeOperationHistoricalStatusInfoProperties, + UpgradeOperationHistoryStatus, + UpgradePolicy, + Usage, + UsageName, + UserAssignedIdentitiesValue, + VMDiskSecurityProfile, + VMGalleryApplication, + VMScaleSetConvertToSinglePlacementGroupInput, + VMSizeProperties, + VaultCertificate, + VaultSecretGroup, + VirtualHardDisk, + VirtualMachine, + VirtualMachineAgentInstanceView, + VirtualMachineAssessPatchesResult, + VirtualMachineCaptureParameters, + VirtualMachineCaptureResult, + VirtualMachineExtension, + VirtualMachineExtensionHandlerInstanceView, + VirtualMachineExtensionImage, + VirtualMachineExtensionInstanceView, + VirtualMachineExtensionUpdate, + VirtualMachineExtensionsListResult, + VirtualMachineHealthStatus, + VirtualMachineIdentity, + VirtualMachineImage, + VirtualMachineImageFeature, + VirtualMachineImageResource, + VirtualMachineInstallPatchesParameters, + VirtualMachineInstallPatchesResult, + VirtualMachineInstanceView, + VirtualMachineIpTag, + VirtualMachineListResult, + VirtualMachineNetworkInterfaceConfiguration, + VirtualMachineNetworkInterfaceDnsSettingsConfiguration, + VirtualMachineNetworkInterfaceIPConfiguration, + VirtualMachinePatchStatus, + VirtualMachinePublicIPAddressConfiguration, + VirtualMachinePublicIPAddressDnsSettingsConfiguration, + VirtualMachineReimageParameters, + VirtualMachineRunCommand, + VirtualMachineRunCommandInstanceView, + VirtualMachineRunCommandScriptSource, + VirtualMachineRunCommandUpdate, + VirtualMachineRunCommandsListResult, + VirtualMachineScaleSet, + VirtualMachineScaleSetDataDisk, + VirtualMachineScaleSetExtension, + VirtualMachineScaleSetExtensionListResult, + VirtualMachineScaleSetExtensionProfile, + VirtualMachineScaleSetExtensionUpdate, + VirtualMachineScaleSetHardwareProfile, + VirtualMachineScaleSetIPConfiguration, + VirtualMachineScaleSetIdentity, + VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue, + VirtualMachineScaleSetInstanceView, + VirtualMachineScaleSetInstanceViewStatusesSummary, + VirtualMachineScaleSetIpTag, + VirtualMachineScaleSetListOSUpgradeHistory, + VirtualMachineScaleSetListResult, + VirtualMachineScaleSetListSkusResult, + VirtualMachineScaleSetListWithLinkResult, + VirtualMachineScaleSetManagedDiskParameters, + VirtualMachineScaleSetNetworkConfiguration, + VirtualMachineScaleSetNetworkConfigurationDnsSettings, + VirtualMachineScaleSetNetworkProfile, + VirtualMachineScaleSetOSDisk, + VirtualMachineScaleSetOSProfile, + VirtualMachineScaleSetPublicIPAddressConfiguration, + VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings, + VirtualMachineScaleSetReimageParameters, + VirtualMachineScaleSetSku, + VirtualMachineScaleSetSkuCapacity, + VirtualMachineScaleSetStorageProfile, + VirtualMachineScaleSetUpdate, + VirtualMachineScaleSetUpdateIPConfiguration, + VirtualMachineScaleSetUpdateNetworkConfiguration, + VirtualMachineScaleSetUpdateNetworkProfile, + VirtualMachineScaleSetUpdateOSDisk, + VirtualMachineScaleSetUpdateOSProfile, + VirtualMachineScaleSetUpdatePublicIPAddressConfiguration, + VirtualMachineScaleSetUpdateStorageProfile, + VirtualMachineScaleSetUpdateVMProfile, + VirtualMachineScaleSetVM, + VirtualMachineScaleSetVMExtension, + VirtualMachineScaleSetVMExtensionUpdate, + VirtualMachineScaleSetVMExtensionsListResult, + VirtualMachineScaleSetVMExtensionsSummary, + VirtualMachineScaleSetVMInstanceIDs, + VirtualMachineScaleSetVMInstanceRequiredIDs, + VirtualMachineScaleSetVMInstanceView, + VirtualMachineScaleSetVMListResult, + VirtualMachineScaleSetVMNetworkProfileConfiguration, + VirtualMachineScaleSetVMProfile, + VirtualMachineScaleSetVMProtectionPolicy, + VirtualMachineScaleSetVMReimageParameters, + VirtualMachineSize, + VirtualMachineSizeListResult, + VirtualMachineSoftwarePatchProperties, + VirtualMachineStatusCodeCount, + VirtualMachineUpdate, + WinRMConfiguration, + WinRMListener, + WindowsConfiguration, + WindowsParameters, +) + +from ._compute_management_client_enums import ( # type: ignore + ArchitectureTypes, + AvailabilitySetSkuTypes, + CachingTypes, + CapacityReservationGroupInstanceViewTypes, + CapacityReservationInstanceViewTypes, + ConsistencyModeTypes, + DedicatedHostLicenseTypes, + DeleteOptions, + DiffDiskOptions, + DiffDiskPlacement, + DiskCreateOptionTypes, + DiskDeleteOptionTypes, + DiskDetachOptionTypes, + ExecutionState, + ExpandTypesForGetCapacityReservationGroups, + ExpandTypesForGetVMScaleSets, + ExtendedLocationTypes, + HyperVGenerationType, + HyperVGenerationTypes, + IPVersion, + IPVersions, + InstanceViewTypes, + IntervalInMins, + LinuxPatchAssessmentMode, + LinuxVMGuestPatchMode, + MaintenanceOperationResultCodeTypes, + NetworkApiVersion, + OperatingSystemStateTypes, + OperatingSystemType, + OperatingSystemTypes, + OrchestrationMode, + OrchestrationServiceNames, + OrchestrationServiceState, + OrchestrationServiceStateAction, + PatchAssessmentState, + PatchInstallationState, + PatchOperationStatus, + ProtocolTypes, + ProximityPlacementGroupType, + PublicIPAddressSkuName, + PublicIPAddressSkuTier, + PublicIPAllocationMethod, + RepairAction, + ResourceIdentityType, + RestorePointCollectionExpandOptions, + RestorePointExpandOptions, + RollingUpgradeActionType, + RollingUpgradeStatusCode, + SecurityEncryptionTypes, + SecurityTypes, + SettingNames, + StatusLevelTypes, + StorageAccountTypes, + UpgradeMode, + UpgradeOperationInvoker, + UpgradeState, + VMGuestPatchClassificationLinux, + VMGuestPatchClassificationWindows, + VMGuestPatchRebootBehavior, + VMGuestPatchRebootSetting, + VMGuestPatchRebootStatus, + VirtualMachineEvictionPolicyTypes, + VirtualMachinePriorityTypes, + VirtualMachineScaleSetScaleInRules, + VirtualMachineScaleSetSkuScaleType, + VirtualMachineSizeTypes, + VmDiskTypes, + WindowsPatchAssessmentMode, + WindowsVMGuestPatchMode, +) 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__ = [ @@ -635,5 +646,5 @@ "WindowsPatchAssessmentMode", "WindowsVMGuestPatchMode", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_11_01/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_11_01/models/_models_py3.py index 78b3ddb06e27f..c2ffca4f6d5bc 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_11_01/models/_models_py3.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_11_01/models/_models_py3.py @@ -1,5 +1,5 @@ -# 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. @@ -16,10 +16,9 @@ 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 if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object @@ -428,7 +427,7 @@ def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kw self.tags = tags -class AvailabilitySet(Resource): # pylint: disable=too-many-instance-attributes +class AvailabilitySet(Resource): """Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see `Availability sets @@ -848,7 +847,7 @@ def __init__(self, **kwargs: Any) -> None: self.status = None -class CapacityReservation(Resource): # pylint: disable=too-many-instance-attributes +class CapacityReservation(Resource): """Specifies information about the capacity reservation. Variables are only populated by the server, and will be ignored when sending a request. @@ -1463,7 +1462,7 @@ def __init__(self, **kwargs: Any) -> None: self.provider = None -class DataDisk(_serialization.Model): # pylint: disable=too-many-instance-attributes +class DataDisk(_serialization.Model): """Describes a data disk. Variables are only populated by the server, and will be ignored when sending a request. @@ -1674,7 +1673,7 @@ def __init__(self, **kwargs: Any) -> None: self.lun = None -class DedicatedHost(Resource): # pylint: disable=too-many-instance-attributes +class DedicatedHost(Resource): """Specifies information about the Dedicated host. Variables are only populated by the server, and will be ignored when sending a request. @@ -3552,7 +3551,7 @@ def __init__(self, *, secret_url: str, source_vault: "_models.SubResource", **kw self.source_vault = source_vault -class LastPatchInstallationSummary(_serialization.Model): # pylint: disable=too-many-instance-attributes +class LastPatchInstallationSummary(_serialization.Model): """Describes the properties of the last installed patch summary. Variables are only populated by the server, and will be ignored when sending a request. @@ -4264,7 +4263,7 @@ def __init__(self, **kwargs: Any) -> None: self.service_state = None -class OSDisk(_serialization.Model): # pylint: disable=too-many-instance-attributes +class OSDisk(_serialization.Model): """Specifies information about the operating system disk used by the virtual machine. :code:`
`:code:`
` For more information about disks, see `About disks and VHDs for Azure virtual machines `_. @@ -7412,7 +7411,7 @@ def __init__(self, *, uri: Optional[str] = None, **kwargs: Any) -> None: self.uri = uri -class VirtualMachine(Resource): # pylint: disable=too-many-instance-attributes +class VirtualMachine(Resource): """Describes a Virtual Machine. Variables are only populated by the server, and will be ignored when sending a request. @@ -7994,7 +7993,7 @@ def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylin self.resources = None -class VirtualMachineExtension(Resource): # pylint: disable=too-many-instance-attributes +class VirtualMachineExtension(Resource): """Describes a Virtual Machine Extension. Variables are only populated by the server, and will be ignored when sending a request. @@ -8349,7 +8348,7 @@ def __init__(self, *, value: Optional[List["_models.VirtualMachineExtension"]] = self.value = value -class VirtualMachineExtensionUpdate(UpdateResource): # pylint: disable=too-many-instance-attributes +class VirtualMachineExtensionUpdate(UpdateResource): """Describes a Virtual Machine Extension. :ivar tags: Resource tags. @@ -8606,7 +8605,7 @@ def __init__( self.extended_location = extended_location -class VirtualMachineImage(VirtualMachineImageResource): # pylint: disable=too-many-instance-attributes +class VirtualMachineImage(VirtualMachineImageResource): """Describes a Virtual Machine Image. All required parameters must be populated in order to send to server. @@ -8822,7 +8821,7 @@ def __init__( self.linux_parameters = linux_parameters -class VirtualMachineInstallPatchesResult(_serialization.Model): # pylint: disable=too-many-instance-attributes +class VirtualMachineInstallPatchesResult(_serialization.Model): """The result summary of an installation operation. Variables are only populated by the server, and will be ignored when sending a request. @@ -8912,7 +8911,7 @@ def __init__(self, **kwargs: Any) -> None: self.error = None -class VirtualMachineInstanceView(_serialization.Model): # pylint: disable=too-many-instance-attributes +class VirtualMachineInstanceView(_serialization.Model): """The instance view of a virtual machine. Variables are only populated by the server, and will be ignored when sending a request. @@ -9576,7 +9575,7 @@ def __init__(self, *, temp_disk: Optional[bool] = None, **kwargs: Any) -> None: self.temp_disk = temp_disk -class VirtualMachineRunCommand(Resource): # pylint: disable=too-many-instance-attributes +class VirtualMachineRunCommand(Resource): """Describes a Virtual Machine run command. Variables are only populated by the server, and will be ignored when sending a request. @@ -9859,7 +9858,7 @@ def __init__( self.next_link = next_link -class VirtualMachineRunCommandUpdate(UpdateResource): # pylint: disable=too-many-instance-attributes +class VirtualMachineRunCommandUpdate(UpdateResource): """Describes a Virtual Machine run command. Variables are only populated by the server, and will be ignored when sending a request. @@ -9972,7 +9971,7 @@ def __init__( self.instance_view = None -class VirtualMachineScaleSet(Resource): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSet(Resource): """Describes a Virtual Machine Scale Set. Variables are only populated by the server, and will be ignored when sending a request. @@ -10341,7 +10340,7 @@ def __init__( self.disk_m_bps_read_write = disk_m_bps_read_write -class VirtualMachineScaleSetExtension(SubResourceReadOnly): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetExtension(SubResourceReadOnly): """Describes a Virtual Machine Scale Set Extension. Variables are only populated by the server, and will be ignored when sending a request. @@ -10558,7 +10557,7 @@ def __init__( self.extensions_time_budget = extensions_time_budget -class VirtualMachineScaleSetExtensionUpdate(SubResourceReadOnly): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetExtensionUpdate(SubResourceReadOnly): """Describes a Virtual Machine Scale Set Extension. Variables are only populated by the server, and will be ignored when sending a request. @@ -11995,7 +11994,7 @@ def __init__( self.data_disks = data_disks -class VirtualMachineScaleSetUpdate(UpdateResource): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetUpdate(UpdateResource): """Describes a Virtual Machine Scale Set. :ivar tags: Resource tags. @@ -12732,7 +12731,7 @@ def __init__( self.user_data = user_data -class VirtualMachineScaleSetVM(Resource): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetVM(Resource): """Describes a virtual machine scale set virtual machine. Variables are only populated by the server, and will be ignored when sending a request. @@ -12985,7 +12984,7 @@ def __init__( # pylint: disable=too-many-locals self.user_data = user_data -class VirtualMachineScaleSetVMExtension(SubResourceReadOnly): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetVMExtension(SubResourceReadOnly): """Describes a VMSS VM Extension. Variables are only populated by the server, and will be ignored when sending a request. @@ -13176,7 +13175,7 @@ def __init__(self, **kwargs: Any) -> None: self.statuses_summary = None -class VirtualMachineScaleSetVMExtensionUpdate(SubResourceReadOnly): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetVMExtensionUpdate(SubResourceReadOnly): """Describes a VMSS VM Extension. Variables are only populated by the server, and will be ignored when sending a request. @@ -13351,7 +13350,7 @@ def __init__(self, *, instance_ids: List[str], **kwargs: Any) -> None: self.instance_ids = instance_ids -class VirtualMachineScaleSetVMInstanceView(_serialization.Model): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetVMInstanceView(_serialization.Model): """The instance view of a virtual machine scale set VM. Variables are only populated by the server, and will be ignored when sending a request. @@ -13535,7 +13534,7 @@ def __init__( self.network_interface_configurations = network_interface_configurations -class VirtualMachineScaleSetVMProfile(_serialization.Model): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetVMProfile(_serialization.Model): """Describes a virtual machine scale set virtual machine profile. :ivar os_profile: Specifies the operating system settings for the virtual machines in the scale @@ -13954,7 +13953,7 @@ def __init__(self, **kwargs: Any) -> None: self.count = None -class VirtualMachineUpdate(UpdateResource): # pylint: disable=too-many-instance-attributes +class VirtualMachineUpdate(UpdateResource): """Describes a Virtual Machine Update. Variables are only populated by the server, and will be ignored when sending a request. diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_11_01/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_11_01/operations/__init__.py index 4b14b8f55c656..2bd7636fd03e8 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_11_01/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_11_01/operations/__init__.py @@ -5,36 +5,42 @@ # Code generated by Microsoft (R) AutoRest 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 AvailabilitySetsOperations -from ._operations import ProximityPlacementGroupsOperations -from ._operations import DedicatedHostGroupsOperations -from ._operations import DedicatedHostsOperations -from ._operations import SshPublicKeysOperations -from ._operations import VirtualMachineExtensionImagesOperations -from ._operations import VirtualMachineExtensionsOperations -from ._operations import VirtualMachineImagesOperations -from ._operations import VirtualMachineImagesEdgeZoneOperations -from ._operations import UsageOperations -from ._operations import VirtualMachinesOperations -from ._operations import VirtualMachineScaleSetsOperations -from ._operations import VirtualMachineSizesOperations -from ._operations import ImagesOperations -from ._operations import RestorePointCollectionsOperations -from ._operations import RestorePointsOperations -from ._operations import CapacityReservationGroupsOperations -from ._operations import CapacityReservationsOperations -from ._operations import VirtualMachineScaleSetExtensionsOperations -from ._operations import VirtualMachineScaleSetRollingUpgradesOperations -from ._operations import VirtualMachineScaleSetVMExtensionsOperations -from ._operations import VirtualMachineScaleSetVMsOperations -from ._operations import LogAnalyticsOperations -from ._operations import VirtualMachineRunCommandsOperations -from ._operations import VirtualMachineScaleSetVMRunCommandsOperations +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 AvailabilitySetsOperations # type: ignore +from ._operations import ProximityPlacementGroupsOperations # type: ignore +from ._operations import DedicatedHostGroupsOperations # type: ignore +from ._operations import DedicatedHostsOperations # type: ignore +from ._operations import SshPublicKeysOperations # type: ignore +from ._operations import VirtualMachineExtensionImagesOperations # type: ignore +from ._operations import VirtualMachineExtensionsOperations # type: ignore +from ._operations import VirtualMachineImagesOperations # type: ignore +from ._operations import VirtualMachineImagesEdgeZoneOperations # type: ignore +from ._operations import UsageOperations # type: ignore +from ._operations import VirtualMachinesOperations # type: ignore +from ._operations import VirtualMachineScaleSetsOperations # type: ignore +from ._operations import VirtualMachineSizesOperations # type: ignore +from ._operations import ImagesOperations # type: ignore +from ._operations import RestorePointCollectionsOperations # type: ignore +from ._operations import RestorePointsOperations # type: ignore +from ._operations import CapacityReservationGroupsOperations # type: ignore +from ._operations import CapacityReservationsOperations # type: ignore +from ._operations import VirtualMachineScaleSetExtensionsOperations # type: ignore +from ._operations import VirtualMachineScaleSetRollingUpgradesOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMExtensionsOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMsOperations # type: ignore +from ._operations import LogAnalyticsOperations # type: ignore +from ._operations import VirtualMachineRunCommandsOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMRunCommandsOperations # 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__ = [ @@ -65,5 +71,5 @@ "VirtualMachineRunCommandsOperations", "VirtualMachineScaleSetVMRunCommandsOperations", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_11_01/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_11_01/operations/_operations.py index 7f30e13b443d0..6e065c2fb2ca6 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_11_01/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_11_01/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. @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Iterable, Iterator, List, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Iterable, Iterator, List, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -36,7 +36,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, HttpResponse], T, Dict[str, Any]], Any]] @@ -5936,7 +5936,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.ComputeOperationValue"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.ComputeOperationListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6089,7 +6089,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2021_11_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6216,7 +6216,7 @@ def update( :rtype: ~azure.mgmt.compute.v2021_11_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6284,7 +6284,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6334,7 +6334,7 @@ def get(self, resource_group_name: str, availability_set_name: str, **kwargs: An :rtype: ~azure.mgmt.compute.v2021_11_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6395,7 +6395,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6472,7 +6472,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Ava api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6554,7 +6554,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6712,7 +6712,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2021_11_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6842,7 +6842,7 @@ def update( :rtype: ~azure.mgmt.compute.v2021_11_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6910,7 +6910,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6970,7 +6970,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_11_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7029,7 +7029,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.ProximityPlac api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7109,7 +7109,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7270,7 +7270,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2021_11_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7397,7 +7397,7 @@ def update( :rtype: ~azure.mgmt.compute.v2021_11_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7465,7 +7465,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7527,7 +7527,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_11_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7587,7 +7587,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7663,7 +7663,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.DedicatedHost api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7752,7 +7752,7 @@ def _create_or_update_initial( parameters: Union[_models.DedicatedHost, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7953,7 +7953,7 @@ def _update_initial( parameters: Union[_models.DedicatedHostUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8149,7 +8149,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8280,7 +8280,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_11_01.models.DedicatedHost :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8345,7 +8345,7 @@ def list_by_host_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.DedicatedHostListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8410,7 +8410,7 @@ def get_next(next_link=None): def _restart_initial( self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8556,7 +8556,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.SshPublicKeyR api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8637,7 +8637,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8771,7 +8771,7 @@ def create( :rtype: ~azure.mgmt.compute.v2021_11_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8899,7 +8899,7 @@ def update( :rtype: ~azure.mgmt.compute.v2021_11_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8967,7 +8967,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9017,7 +9017,7 @@ def get(self, resource_group_name: str, ssh_public_key_name: str, **kwargs: Any) :rtype: ~azure.mgmt.compute.v2021_11_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9075,7 +9075,7 @@ def generate_key_pair( :rtype: ~azure.mgmt.compute.v2021_11_01.models.SshPublicKeyGenerateKeyPairResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9156,7 +9156,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_11_01.models.VirtualMachineExtensionImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9214,7 +9214,7 @@ def list_types( :rtype: list[~azure.mgmt.compute.v2021_11_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9286,7 +9286,7 @@ def list_versions( :rtype: list[~azure.mgmt.compute.v2021_11_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9361,7 +9361,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineExtension, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9571,7 +9571,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineExtensionUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9777,7 +9777,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_name: str, vm_extension_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9907,7 +9907,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_11_01.models.VirtualMachineExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9967,7 +9967,7 @@ def list( :rtype: ~azure.mgmt.compute.v2021_11_01.models.VirtualMachineExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10051,7 +10051,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_11_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10130,7 +10130,7 @@ def list( :rtype: list[~azure.mgmt.compute.v2021_11_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10191,7 +10191,7 @@ def list_offers( :rtype: list[~azure.mgmt.compute.v2021_11_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10243,7 +10243,7 @@ def list_publishers(self, location: str, **kwargs: Any) -> List[_models.VirtualM :rtype: list[~azure.mgmt.compute.v2021_11_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10300,7 +10300,7 @@ def list_skus( :rtype: list[~azure.mgmt.compute.v2021_11_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10386,7 +10386,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_11_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10471,7 +10471,7 @@ def list( :rtype: list[~azure.mgmt.compute.v2021_11_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10536,7 +10536,7 @@ def list_offers( :rtype: list[~azure.mgmt.compute.v2021_11_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10593,7 +10593,7 @@ def list_publishers( :rtype: list[~azure.mgmt.compute.v2021_11_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10654,7 +10654,7 @@ def list_skus( :rtype: list[~azure.mgmt.compute.v2021_11_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10736,7 +10736,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.Usage"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.ListUsagesResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10835,7 +10835,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> Iterable["_models.Vi api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10903,7 +10903,7 @@ def _capture_initial( parameters: Union[_models.VirtualMachineCaptureParameters, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11101,7 +11101,7 @@ def _create_or_update_initial( parameters: Union[_models.VirtualMachine, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11293,7 +11293,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11478,7 +11478,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_name: str, *, force_deletion: Optional[bool] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11609,7 +11609,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_11_01.models.VirtualMachine :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11666,7 +11666,7 @@ def instance_view( :rtype: ~azure.mgmt.compute.v2021_11_01.models.VirtualMachineInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11711,7 +11711,7 @@ def instance_view( def _convert_to_managed_disks_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11814,7 +11814,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _deallocate_initial( self, resource_group_name: str, vm_name: str, *, hibernate: Optional[bool] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11940,7 +11940,7 @@ def generalize( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11982,6 +11982,7 @@ def generalize( # pylint: disable=inconsistent-return-statements def list( self, resource_group_name: str, *, filter: Optional[str] = None, **kwargs: Any ) -> Iterable["_models.VirtualMachine"]: + # pylint: disable=line-too-long """Lists all of the virtual machines in the specified resource group. Use the nextLink property in the response to get the next page of virtual machines. @@ -12002,7 +12003,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12068,6 +12069,7 @@ def get_next(next_link=None): def list_all( self, *, status_only: Optional[str] = None, filter: Optional[str] = None, **kwargs: Any ) -> Iterable["_models.VirtualMachine"]: + # pylint: disable=line-too-long """Lists all of the virtual machines in the specified subscription. Use the nextLink property in the response to get the next page of virtual machines. @@ -12089,7 +12091,7 @@ def list_all( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12172,7 +12174,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12237,7 +12239,7 @@ def get_next(next_link=None): def _power_off_initial( self, resource_group_name: str, vm_name: str, *, skip_shutdown: bool = False, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12346,7 +12348,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _reapply_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12446,7 +12448,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _restart_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12546,7 +12548,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _start_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12646,7 +12648,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _redeploy_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12752,7 +12754,7 @@ def _reimage_initial( parameters: Optional[Union[_models.VirtualMachineReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12957,7 +12959,7 @@ def retrieve_boot_diagnostics_data( :rtype: ~azure.mgmt.compute.v2021_11_01.models.RetrieveBootDiagnosticsDataResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13001,7 +13003,7 @@ def retrieve_boot_diagnostics_data( return deserialized # type: ignore def _perform_maintenance_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13114,7 +13116,7 @@ def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13153,7 +13155,7 @@ def simulate_eviction( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore def _assess_patches_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13269,7 +13271,7 @@ def _install_patches_initial( install_patches_input: Union[_models.VirtualMachineInstallPatchesParameters, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13467,7 +13469,7 @@ def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13691,7 +13693,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> Iterable["_models.Vi api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13759,7 +13761,7 @@ def _create_or_update_initial( parameters: Union[_models.VirtualMachineScaleSet, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13951,7 +13953,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineScaleSetUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14140,7 +14142,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, *, force_deletion: Optional[bool] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14269,7 +14271,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_11_01.models.VirtualMachineScaleSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14319,7 +14321,7 @@ def _deallocate_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14516,7 +14518,7 @@ def _delete_instances_initial( force_deletion: Optional[bool] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14724,7 +14726,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2021_11_01.models.VirtualMachineScaleSetInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14784,7 +14786,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Vir api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14863,7 +14865,7 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.VirtualMachineScaleSet"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.VirtualMachineScaleSetListWithLinkResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14946,7 +14948,7 @@ def list_skus( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.VirtualMachineScaleSetListSkusResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15030,7 +15032,7 @@ def get_os_upgrade_history( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.VirtualMachineScaleSetListOSUpgradeHistory] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15101,7 +15103,7 @@ def _power_off_initial( skip_shutdown: bool = False, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15314,7 +15316,7 @@ def _restart_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15503,7 +15505,7 @@ def _start_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15692,7 +15694,7 @@ def _redeploy_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15884,7 +15886,7 @@ def _perform_maintenance_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16082,7 +16084,7 @@ def _update_instances_initial( vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16268,7 +16270,7 @@ def _reimage_initial( vm_scale_set_reimage_input: Optional[Union[_models.VirtualMachineScaleSetReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16461,7 +16463,7 @@ def _reimage_all_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16677,7 +16679,7 @@ def force_recovery_service_fabric_platform_update_domain_walk( # pylint: disabl :rtype: ~azure.mgmt.compute.v2021_11_01.models.RecoveryWalkResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16723,7 +16725,7 @@ def force_recovery_service_fabric_platform_update_domain_walk( # pylint: disabl return deserialized # type: ignore @overload - def convert_to_single_placement_group( # pylint: disable=inconsistent-return-statements + def convert_to_single_placement_group( self, resource_group_name: str, vm_scale_set_name: str, @@ -16751,7 +16753,7 @@ def convert_to_single_placement_group( # pylint: disable=inconsistent-return-st """ @overload - def convert_to_single_placement_group( # pylint: disable=inconsistent-return-statements + def convert_to_single_placement_group( self, resource_group_name: str, vm_scale_set_name: str, @@ -16801,7 +16803,7 @@ def convert_to_single_placement_group( # pylint: disable=inconsistent-return-st :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16858,7 +16860,7 @@ def _set_orchestration_service_state_initial( parameters: Union[_models.OrchestrationServiceStateInput, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17075,7 +17077,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.VirtualMachine api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17160,7 +17162,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, image_name: str, parameters: Union[_models.Image, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17342,7 +17344,7 @@ def _update_initial( parameters: Union[_models.ImageUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17522,7 +17524,7 @@ def get_long_running_output(pipeline_response): ) def _delete_initial(self, resource_group_name: str, image_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17637,7 +17639,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_11_01.models.Image :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17696,7 +17698,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17772,7 +17774,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Image"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17934,7 +17936,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2021_11_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18064,7 +18066,7 @@ def update( :rtype: ~azure.mgmt.compute.v2021_11_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18121,7 +18123,7 @@ def update( def _delete_initial( self, resource_group_name: str, restore_point_collection_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18247,7 +18249,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_11_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18308,7 +18310,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Res api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.RestorePointCollectionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18387,7 +18389,7 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.RestorePointCollection"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.RestorePointCollectionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18476,7 +18478,7 @@ def _create_initial( parameters: Union[_models.RestorePoint, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18675,7 +18677,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, restore_point_collection_name: str, restore_point_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18805,7 +18807,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_11_01.models.RestorePoint :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18949,7 +18951,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2021_11_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19082,7 +19084,7 @@ def update( :rtype: ~azure.mgmt.compute.v2021_11_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19153,7 +19155,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19217,7 +19219,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_11_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19291,7 +19293,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.CapacityReservationGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19378,7 +19380,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.CapacityReservationGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19468,7 +19470,7 @@ def _create_or_update_initial( parameters: Union[_models.CapacityReservation, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19678,7 +19680,7 @@ def _update_initial( parameters: Union[_models.CapacityReservationUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19881,7 +19883,7 @@ def _delete_initial( capacity_reservation_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20019,7 +20021,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_11_01.models.CapacityReservation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20085,7 +20087,7 @@ def list_by_capacity_reservation_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.CapacityReservationListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20176,7 +20178,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtension, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20387,7 +20389,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtensionUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20594,7 +20596,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, vmss_extension_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20724,7 +20726,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_11_01.models.VirtualMachineScaleSetExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20790,7 +20792,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.VirtualMachineScaleSetExtensionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20874,7 +20876,7 @@ def __init__(self, *args, **kwargs): self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") def _cancel_initial(self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20976,7 +20978,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_os_upgrade_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21082,7 +21084,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_extension_upgrade_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21199,7 +21201,7 @@ def get_latest( :rtype: ~azure.mgmt.compute.v2021_11_01.models.RollingUpgradeStatusInfo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21271,7 +21273,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetVMExtension, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21491,7 +21493,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetVMExtensionUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21706,7 +21708,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, vm_extension_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21842,7 +21844,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_11_01.models.VirtualMachineScaleSetVMExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21911,7 +21913,7 @@ def list( :rtype: ~azure.mgmt.compute.v2021_11_01.models.VirtualMachineScaleSetVMExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21988,7 +21990,7 @@ def _reimage_initial( ] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22187,7 +22189,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _reimage_all_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22296,7 +22298,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _deallocate_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22411,7 +22413,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineScaleSetVM, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22621,7 +22623,7 @@ def _delete_initial( force_deletion: Optional[bool] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22763,7 +22765,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_11_01.models.VirtualMachineScaleSetVM :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22823,7 +22825,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2021_11_01.models.VirtualMachineScaleSetVMInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22905,7 +22907,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.VirtualMachineScaleSetVMListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22979,7 +22981,7 @@ def _power_off_initial( skip_shutdown: bool = False, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23101,7 +23103,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _restart_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23209,7 +23211,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23317,7 +23319,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _redeploy_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23451,7 +23453,7 @@ def retrieve_boot_diagnostics_data( :rtype: ~azure.mgmt.compute.v2021_11_01.models.RetrieveBootDiagnosticsDataResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23498,7 +23500,7 @@ def retrieve_boot_diagnostics_data( def _perform_maintenance_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23619,7 +23621,7 @@ def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23666,7 +23668,7 @@ def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23885,7 +23887,7 @@ def __init__(self, *args, **kwargs): def _export_request_rate_by_interval_initial( self, location: str, parameters: Union[_models.RequestRateByIntervalInput, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24062,7 +24064,7 @@ def get_long_running_output(pipeline_response): def _export_throttled_requests_initial( self, location: str, parameters: Union[_models.ThrottledRequestsInput, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24272,7 +24274,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.RunCommandDocu api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.RunCommandListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24345,7 +24347,7 @@ def get(self, location: str, command_id: str, **kwargs: Any) -> _models.RunComma :rtype: ~azure.mgmt.compute.v2021_11_01.models.RunCommandDocument :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24395,7 +24397,7 @@ def _create_or_update_initial( run_command: Union[_models.VirtualMachineRunCommand, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24604,7 +24606,7 @@ def _update_initial( run_command: Union[_models.VirtualMachineRunCommandUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24809,7 +24811,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_name: str, run_command_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24939,7 +24941,7 @@ def get_by_virtual_machine( :rtype: ~azure.mgmt.compute.v2021_11_01.models.VirtualMachineRunCommand :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25007,7 +25009,7 @@ def list_by_virtual_machine( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.VirtualMachineRunCommandsListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25100,7 +25102,7 @@ def _create_or_update_initial( run_command: Union[_models.VirtualMachineRunCommand, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25318,7 +25320,7 @@ def _update_initial( run_command: Union[_models.VirtualMachineRunCommandUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25531,7 +25533,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, run_command_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25667,7 +25669,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_11_01.models.VirtualMachineRunCommand :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25744,7 +25746,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-11-01")) cls: ClsType[_models.VirtualMachineRunCommandsListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_12_01/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_12_01/__init__.py index 3b1b6244b2375..ab7c46e8991db 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_12_01/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_12_01/__init__.py @@ -5,15 +5,21 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._compute_management_client import ComputeManagementClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._compute_management_client import ComputeManagementClient # 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__ = [ "ComputeManagementClient", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_12_01/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_12_01/_compute_management_client.py index 45555c565fb61..c0fdfd70a1d5c 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_12_01/_compute_management_client.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_12_01/_compute_management_client.py @@ -27,11 +27,10 @@ ) if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class ComputeManagementClient: # pylint: disable=client-accepts-api-version-keyword +class ComputeManagementClient: """Compute Client. :ivar disks: DisksOperations operations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_12_01/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_12_01/_configuration.py index 61ae48ac51dac..ad9c9ab7817fe 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_12_01/_configuration.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_12_01/_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 ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ComputeManagementClient. Note that all parameters used to create this instance are saved as instance diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_12_01/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_12_01/_version.py index d79b2760319c5..e5754a47ce68f 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_12_01/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_12_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "33.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_12_01/aio/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_12_01/aio/__init__.py index 0715f50185586..d3fd1ba93379a 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_12_01/aio/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_12_01/aio/__init__.py @@ -5,12 +5,18 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._compute_management_client import ComputeManagementClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._compute_management_client import ComputeManagementClient # 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__ = [ "ComputeManagementClient", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_12_01/aio/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_12_01/aio/_compute_management_client.py index 5666dc9e6bcb8..5adb7eda0ba8e 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_12_01/aio/_compute_management_client.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_12_01/aio/_compute_management_client.py @@ -27,11 +27,10 @@ ) if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class ComputeManagementClient: # pylint: disable=client-accepts-api-version-keyword +class ComputeManagementClient: """Compute Client. :ivar disks: DisksOperations operations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_12_01/aio/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_12_01/aio/_configuration.py index 90c29065701d6..1a2122e8d0dae 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_12_01/aio/_configuration.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_12_01/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 ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ComputeManagementClient. Note that all parameters used to create this instance are saved as instance diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_12_01/aio/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_12_01/aio/operations/__init__.py index fa2d8a9108a18..9cc1f6fb8062f 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_12_01/aio/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_12_01/aio/operations/__init__.py @@ -5,15 +5,21 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._operations import DisksOperations -from ._operations import SnapshotsOperations -from ._operations import DiskEncryptionSetsOperations -from ._operations import DiskAccessesOperations -from ._operations import DiskRestorePointOperations +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._operations import DisksOperations # type: ignore +from ._operations import SnapshotsOperations # type: ignore +from ._operations import DiskEncryptionSetsOperations # type: ignore +from ._operations import DiskAccessesOperations # type: ignore +from ._operations import DiskRestorePointOperations # 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__ = [ @@ -23,5 +29,5 @@ "DiskAccessesOperations", "DiskRestorePointOperations", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_12_01/aio/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_12_01/aio/operations/_operations.py index 12cb109196af1..521cb5f8f2be4 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_12_01/aio/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_12_01/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. @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -76,7 +76,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]] @@ -104,7 +104,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.Disk, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -288,7 +288,7 @@ def get_long_running_output(pipeline_response): async def _update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.DiskUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -483,7 +483,7 @@ async def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.compute.v2021_12_01.models.Disk :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -526,7 +526,7 @@ async def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> return deserialized # type: ignore async def _delete_initial(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -643,7 +643,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-12-01")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -718,7 +718,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Disk"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-12-01")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -785,7 +785,7 @@ async def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -980,7 +980,7 @@ def get_long_running_output(pipeline_response): async def _revoke_access_initial( self, resource_group_name: str, disk_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1109,7 +1109,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, snapshot_name: str, snapshot: Union[_models.Snapshot, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1300,7 +1300,7 @@ async def _update_initial( snapshot: Union[_models.SnapshotUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1504,7 +1504,7 @@ async def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) :rtype: ~azure.mgmt.compute.v2021_12_01.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1549,7 +1549,7 @@ async def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) async def _delete_initial( self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1667,7 +1667,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-12-01")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1743,7 +1743,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Snapshot"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-12-01")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1810,7 +1810,7 @@ async def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2005,7 +2005,7 @@ def get_long_running_output(pipeline_response): async def _revoke_access_initial( self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2138,7 +2138,7 @@ async def _create_or_update_initial( disk_encryption_set: Union[_models.DiskEncryptionSet, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2339,7 +2339,7 @@ async def _update_initial( disk_encryption_set: Union[_models.DiskEncryptionSetUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2550,7 +2550,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_12_01.models.DiskEncryptionSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2595,7 +2595,7 @@ async def get( async def _delete_initial( self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2717,7 +2717,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-12-01")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2793,7 +2793,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.DiskEncryptionSet"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-12-01")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2875,7 +2875,7 @@ def list_associated_resources( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-12-01")) cls: ClsType[_models.ResourceUriList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2965,7 +2965,7 @@ async def _create_or_update_initial( disk_access: Union[_models.DiskAccess, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3162,7 +3162,7 @@ async def _update_initial( disk_access: Union[_models.DiskAccessUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3366,7 +3366,7 @@ async def get(self, resource_group_name: str, disk_access_name: str, **kwargs: A :rtype: ~azure.mgmt.compute.v2021_12_01.models.DiskAccess :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3411,7 +3411,7 @@ async def get(self, resource_group_name: str, disk_access_name: str, **kwargs: A async def _delete_initial( self, resource_group_name: str, disk_access_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3531,7 +3531,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-12-01")) cls: ClsType[_models.DiskAccessList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3607,7 +3607,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.DiskAccess"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-12-01")) cls: ClsType[_models.DiskAccessList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3683,7 +3683,7 @@ async def get_private_link_resources( :rtype: ~azure.mgmt.compute.v2021_12_01.models.PrivateLinkResourceListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3733,7 +3733,7 @@ async def _update_a_private_endpoint_connection_initial( # pylint: disable=name private_endpoint_connection: Union[_models.PrivateEndpointConnection, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3961,7 +3961,7 @@ async def get_a_private_endpoint_connection( :rtype: ~azure.mgmt.compute.v2021_12_01.models.PrivateEndpointConnection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4007,7 +4007,7 @@ async def get_a_private_endpoint_connection( async def _delete_a_private_endpoint_connection_initial( # pylint: disable=name-too-long self, resource_group_name: str, disk_access_name: str, private_endpoint_connection_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4138,7 +4138,7 @@ def list_private_endpoint_connections( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-12-01")) cls: ClsType[_models.PrivateEndpointConnectionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4246,7 +4246,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2021_12_01.models.DiskRestorePoint :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4315,7 +4315,7 @@ def list_by_restore_point( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-12-01")) cls: ClsType[_models.DiskRestorePointList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4387,7 +4387,7 @@ async def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4609,7 +4609,7 @@ async def _revoke_access_initial( disk_restore_point_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_12_01/models/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_12_01/models/__init__.py index 168af6a875439..def6ae66595d0 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_12_01/models/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_12_01/models/__init__.py @@ -5,74 +5,85 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._models_py3 import AccessUri -from ._models_py3 import ApiError -from ._models_py3 import ApiErrorBase -from ._models_py3 import CreationData -from ._models_py3 import Disk -from ._models_py3 import DiskAccess -from ._models_py3 import DiskAccessList -from ._models_py3 import DiskAccessUpdate -from ._models_py3 import DiskEncryptionSet -from ._models_py3 import DiskEncryptionSetList -from ._models_py3 import DiskEncryptionSetUpdate -from ._models_py3 import DiskList -from ._models_py3 import DiskRestorePoint -from ._models_py3 import DiskRestorePointList -from ._models_py3 import DiskSecurityProfile -from ._models_py3 import DiskSku -from ._models_py3 import DiskUpdate -from ._models_py3 import Encryption -from ._models_py3 import EncryptionSetIdentity -from ._models_py3 import EncryptionSettingsCollection -from ._models_py3 import EncryptionSettingsElement -from ._models_py3 import ExtendedLocation -from ._models_py3 import GrantAccessData -from ._models_py3 import ImageDiskReference -from ._models_py3 import InnerError -from ._models_py3 import KeyForDiskEncryptionSet -from ._models_py3 import KeyVaultAndKeyReference -from ._models_py3 import KeyVaultAndSecretReference -from ._models_py3 import PrivateEndpoint -from ._models_py3 import PrivateEndpointConnection -from ._models_py3 import PrivateEndpointConnectionListResult -from ._models_py3 import PrivateLinkResource -from ._models_py3 import PrivateLinkResourceListResult -from ._models_py3 import PrivateLinkServiceConnectionState -from ._models_py3 import PropertyUpdatesInProgress -from ._models_py3 import ProxyOnlyResource -from ._models_py3 import PurchasePlan -from ._models_py3 import Resource -from ._models_py3 import ResourceUriList -from ._models_py3 import ShareInfoElement -from ._models_py3 import Snapshot -from ._models_py3 import SnapshotList -from ._models_py3 import SnapshotSku -from ._models_py3 import SnapshotUpdate -from ._models_py3 import SourceVault -from ._models_py3 import SupportedCapabilities +from typing import TYPE_CHECKING -from ._compute_management_client_enums import AccessLevel -from ._compute_management_client_enums import Architecture -from ._compute_management_client_enums import DataAccessAuthMode -from ._compute_management_client_enums import DiskCreateOption -from ._compute_management_client_enums import DiskEncryptionSetIdentityType -from ._compute_management_client_enums import DiskEncryptionSetType -from ._compute_management_client_enums import DiskSecurityTypes -from ._compute_management_client_enums import DiskState -from ._compute_management_client_enums import DiskStorageAccountTypes -from ._compute_management_client_enums import EncryptionType -from ._compute_management_client_enums import ExtendedLocationTypes -from ._compute_management_client_enums import HyperVGeneration -from ._compute_management_client_enums import NetworkAccessPolicy -from ._compute_management_client_enums import OperatingSystemTypes -from ._compute_management_client_enums import PrivateEndpointConnectionProvisioningState -from ._compute_management_client_enums import PrivateEndpointServiceConnectionStatus -from ._compute_management_client_enums import PublicNetworkAccess -from ._compute_management_client_enums import SnapshotStorageAccountTypes +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + + +from ._models_py3 import ( # type: ignore + AccessUri, + ApiError, + ApiErrorBase, + CreationData, + Disk, + DiskAccess, + DiskAccessList, + DiskAccessUpdate, + DiskEncryptionSet, + DiskEncryptionSetList, + DiskEncryptionSetUpdate, + DiskList, + DiskRestorePoint, + DiskRestorePointList, + DiskSecurityProfile, + DiskSku, + DiskUpdate, + Encryption, + EncryptionSetIdentity, + EncryptionSettingsCollection, + EncryptionSettingsElement, + ExtendedLocation, + GrantAccessData, + ImageDiskReference, + InnerError, + KeyForDiskEncryptionSet, + KeyVaultAndKeyReference, + KeyVaultAndSecretReference, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateEndpointConnectionListResult, + PrivateLinkResource, + PrivateLinkResourceListResult, + PrivateLinkServiceConnectionState, + PropertyUpdatesInProgress, + ProxyOnlyResource, + PurchasePlan, + Resource, + ResourceUriList, + ShareInfoElement, + Snapshot, + SnapshotList, + SnapshotSku, + SnapshotUpdate, + SourceVault, + SupportedCapabilities, +) + +from ._compute_management_client_enums import ( # type: ignore + AccessLevel, + Architecture, + DataAccessAuthMode, + DiskCreateOption, + DiskEncryptionSetIdentityType, + DiskEncryptionSetType, + DiskSecurityTypes, + DiskState, + DiskStorageAccountTypes, + EncryptionType, + ExtendedLocationTypes, + HyperVGeneration, + NetworkAccessPolicy, + OperatingSystemTypes, + PrivateEndpointConnectionProvisioningState, + PrivateEndpointServiceConnectionStatus, + PublicNetworkAccess, + SnapshotStorageAccountTypes, +) 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__ = [ @@ -141,5 +152,5 @@ "PublicNetworkAccess", "SnapshotStorageAccountTypes", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_12_01/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_12_01/models/_models_py3.py index 1db27e7e4b0eb..c27b558e04b43 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_12_01/models/_models_py3.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_12_01/models/_models_py3.py @@ -1,5 +1,5 @@ -# 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. @@ -12,7 +12,6 @@ from ... import _serialization if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models @@ -297,7 +296,7 @@ def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kw self.tags = tags -class Disk(Resource): # pylint: disable=too-many-instance-attributes +class Disk(Resource): """Disk resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -772,7 +771,7 @@ def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> N self.tags = tags -class DiskEncryptionSet(Resource): # pylint: disable=too-many-instance-attributes +class DiskEncryptionSet(Resource): """disk encryption set resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -1055,7 +1054,7 @@ def __init__(self, **kwargs: Any) -> None: self.type = None -class DiskRestorePoint(ProxyOnlyResource): # pylint: disable=too-many-instance-attributes +class DiskRestorePoint(ProxyOnlyResource): """Properties of disk restore point. Variables are only populated by the server, and will be ignored when sending a request. @@ -1315,7 +1314,7 @@ def __init__(self, *, name: Optional[Union[str, "_models.DiskStorageAccountTypes self.tier = None -class DiskUpdate(_serialization.Model): # pylint: disable=too-many-instance-attributes +class DiskUpdate(_serialization.Model): """Disk update resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -2334,7 +2333,7 @@ def __init__(self, **kwargs: Any) -> None: self.vm_uri = None -class Snapshot(Resource): # pylint: disable=too-many-instance-attributes +class Snapshot(Resource): """Snapshot resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -2656,7 +2655,7 @@ def __init__( self.tier = None -class SnapshotUpdate(_serialization.Model): # pylint: disable=too-many-instance-attributes +class SnapshotUpdate(_serialization.Model): """Snapshot update resource. :ivar tags: Resource tags. diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_12_01/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_12_01/operations/__init__.py index fa2d8a9108a18..9cc1f6fb8062f 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_12_01/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_12_01/operations/__init__.py @@ -5,15 +5,21 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._operations import DisksOperations -from ._operations import SnapshotsOperations -from ._operations import DiskEncryptionSetsOperations -from ._operations import DiskAccessesOperations -from ._operations import DiskRestorePointOperations +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._operations import DisksOperations # type: ignore +from ._operations import SnapshotsOperations # type: ignore +from ._operations import DiskEncryptionSetsOperations # type: ignore +from ._operations import DiskAccessesOperations # type: ignore +from ._operations import DiskRestorePointOperations # 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__ = [ @@ -23,5 +29,5 @@ "DiskAccessesOperations", "DiskRestorePointOperations", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_12_01/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_12_01/operations/_operations.py index 76182efa78a09..1d0810eda885f 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_12_01/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_12_01/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. @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -36,7 +36,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, HttpResponse], T, Dict[str, Any]], Any]] @@ -1280,7 +1280,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.Disk, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1464,7 +1464,7 @@ def get_long_running_output(pipeline_response): def _update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.DiskUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1659,7 +1659,7 @@ def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> _model :rtype: ~azure.mgmt.compute.v2021_12_01.models.Disk :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1702,7 +1702,7 @@ def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> _model return deserialized # type: ignore def _delete_initial(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1819,7 +1819,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-12-01")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1894,7 +1894,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Disk"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-12-01")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1961,7 +1961,7 @@ def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2151,7 +2151,7 @@ def get_long_running_output(pipeline_response): ) def _revoke_access_initial(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2278,7 +2278,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, snapshot_name: str, snapshot: Union[_models.Snapshot, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2466,7 +2466,7 @@ def _update_initial( snapshot: Union[_models.SnapshotUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2667,7 +2667,7 @@ def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> _m :rtype: ~azure.mgmt.compute.v2021_12_01.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2710,7 +2710,7 @@ def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> _m return deserialized # type: ignore def _delete_initial(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2827,7 +2827,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-12-01")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2902,7 +2902,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Snapshot"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-12-01")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2969,7 +2969,7 @@ def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3159,7 +3159,7 @@ def get_long_running_output(pipeline_response): ) def _revoke_access_initial(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3290,7 +3290,7 @@ def _create_or_update_initial( disk_encryption_set: Union[_models.DiskEncryptionSet, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3488,7 +3488,7 @@ def _update_initial( disk_encryption_set: Union[_models.DiskEncryptionSetUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3694,7 +3694,7 @@ def get(self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: :rtype: ~azure.mgmt.compute.v2021_12_01.models.DiskEncryptionSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3739,7 +3739,7 @@ def get(self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: def _delete_initial( self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3856,7 +3856,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-12-01")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3931,7 +3931,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.DiskEncryptionSet"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-12-01")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4013,7 +4013,7 @@ def list_associated_resources( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-12-01")) cls: ClsType[_models.ResourceUriList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4103,7 +4103,7 @@ def _create_or_update_initial( disk_access: Union[_models.DiskAccess, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4297,7 +4297,7 @@ def _update_initial( disk_access: Union[_models.DiskAccessUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4498,7 +4498,7 @@ def get(self, resource_group_name: str, disk_access_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.compute.v2021_12_01.models.DiskAccess :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4541,7 +4541,7 @@ def get(self, resource_group_name: str, disk_access_name: str, **kwargs: Any) -> return deserialized # type: ignore def _delete_initial(self, resource_group_name: str, disk_access_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4658,7 +4658,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-12-01")) cls: ClsType[_models.DiskAccessList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4733,7 +4733,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.DiskAccess"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-12-01")) cls: ClsType[_models.DiskAccessList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4809,7 +4809,7 @@ def get_private_link_resources( :rtype: ~azure.mgmt.compute.v2021_12_01.models.PrivateLinkResourceListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4859,7 +4859,7 @@ def _update_a_private_endpoint_connection_initial( # pylint: disable=name-too-l private_endpoint_connection: Union[_models.PrivateEndpointConnection, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5087,7 +5087,7 @@ def get_a_private_endpoint_connection( :rtype: ~azure.mgmt.compute.v2021_12_01.models.PrivateEndpointConnection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5133,7 +5133,7 @@ def get_a_private_endpoint_connection( def _delete_a_private_endpoint_connection_initial( # pylint: disable=name-too-long self, resource_group_name: str, disk_access_name: str, private_endpoint_connection_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5264,7 +5264,7 @@ def list_private_endpoint_connections( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-12-01")) cls: ClsType[_models.PrivateEndpointConnectionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5372,7 +5372,7 @@ def get( :rtype: ~azure.mgmt.compute.v2021_12_01.models.DiskRestorePoint :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5440,7 +5440,7 @@ def list_by_restore_point( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-12-01")) cls: ClsType[_models.DiskRestorePointList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5512,7 +5512,7 @@ def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5731,7 +5731,7 @@ def _revoke_access_initial( disk_restore_point_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_01_03/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_01_03/__init__.py index 3b1b6244b2375..ab7c46e8991db 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_01_03/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_01_03/__init__.py @@ -5,15 +5,21 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._compute_management_client import ComputeManagementClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._compute_management_client import ComputeManagementClient # 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__ = [ "ComputeManagementClient", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_01_03/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_01_03/_compute_management_client.py index c5de41afb3364..32f81e179fb8d 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_01_03/_compute_management_client.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_01_03/_compute_management_client.py @@ -34,11 +34,10 @@ ) if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class ComputeManagementClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes +class ComputeManagementClient: # pylint: disable=too-many-instance-attributes """Compute Client. :ivar galleries: GalleriesOperations operations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_01_03/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_01_03/_configuration.py index a37b947f5a2de..8e2fa4a1e61a0 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_01_03/_configuration.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_01_03/_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 ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ComputeManagementClient. Note that all parameters used to create this instance are saved as instance diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_01_03/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_01_03/_version.py index d79b2760319c5..e5754a47ce68f 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_01_03/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_01_03/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "33.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_01_03/aio/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_01_03/aio/__init__.py index 0715f50185586..d3fd1ba93379a 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_01_03/aio/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_01_03/aio/__init__.py @@ -5,12 +5,18 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._compute_management_client import ComputeManagementClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._compute_management_client import ComputeManagementClient # 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__ = [ "ComputeManagementClient", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_01_03/aio/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_01_03/aio/_compute_management_client.py index 9d95d1c367f3f..22fdc5fe351fd 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_01_03/aio/_compute_management_client.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_01_03/aio/_compute_management_client.py @@ -34,11 +34,10 @@ ) if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class ComputeManagementClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes +class ComputeManagementClient: # pylint: disable=too-many-instance-attributes """Compute Client. :ivar galleries: GalleriesOperations operations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_01_03/aio/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_01_03/aio/_configuration.py index b69881c2d2fe9..d7483e6750f4e 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_01_03/aio/_configuration.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_01_03/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 ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ComputeManagementClient. Note that all parameters used to create this instance are saved as instance diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_01_03/aio/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_01_03/aio/operations/__init__.py index 322500f753256..139d983a58402 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_01_03/aio/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_01_03/aio/operations/__init__.py @@ -5,22 +5,28 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._operations import GalleriesOperations -from ._operations import GalleryImagesOperations -from ._operations import GalleryImageVersionsOperations -from ._operations import GalleryApplicationsOperations -from ._operations import GalleryApplicationVersionsOperations -from ._operations import GallerySharingProfileOperations -from ._operations import SharedGalleriesOperations -from ._operations import SharedGalleryImagesOperations -from ._operations import SharedGalleryImageVersionsOperations -from ._operations import CommunityGalleriesOperations -from ._operations import CommunityGalleryImagesOperations -from ._operations import CommunityGalleryImageVersionsOperations +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._operations import GalleriesOperations # type: ignore +from ._operations import GalleryImagesOperations # type: ignore +from ._operations import GalleryImageVersionsOperations # type: ignore +from ._operations import GalleryApplicationsOperations # type: ignore +from ._operations import GalleryApplicationVersionsOperations # type: ignore +from ._operations import GallerySharingProfileOperations # type: ignore +from ._operations import SharedGalleriesOperations # type: ignore +from ._operations import SharedGalleryImagesOperations # type: ignore +from ._operations import SharedGalleryImageVersionsOperations # type: ignore +from ._operations import CommunityGalleriesOperations # type: ignore +from ._operations import CommunityGalleryImagesOperations # type: ignore +from ._operations import CommunityGalleryImageVersionsOperations # 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__ = [ @@ -37,5 +43,5 @@ "CommunityGalleryImagesOperations", "CommunityGalleryImageVersionsOperations", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_01_03/aio/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_01_03/aio/operations/_operations.py index 81f02c83a6339..abf9f2d9aec79 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_01_03/aio/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_01_03/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. @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -76,7 +76,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]] @@ -104,7 +104,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, gallery_name: str, gallery: Union[_models.Gallery, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -297,7 +297,7 @@ async def _update_initial( gallery: Union[_models.GalleryUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -511,7 +511,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_01_03.models.Gallery :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -556,7 +556,7 @@ async def get( return deserialized # type: ignore async def _delete_initial(self, resource_group_name: str, gallery_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -671,7 +671,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-01-03")) cls: ClsType[_models.GalleryList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -746,7 +746,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Gallery"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-01-03")) cls: ClsType[_models.GalleryList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -835,7 +835,7 @@ async def _create_or_update_initial( gallery_image: Union[_models.GalleryImage, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1047,7 +1047,7 @@ async def _update_initial( gallery_image: Union[_models.GalleryImageUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1266,7 +1266,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_01_03.models.GalleryImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1312,7 +1312,7 @@ async def get( async def _delete_initial( self, resource_group_name: str, gallery_name: str, gallery_image_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1440,7 +1440,7 @@ def list_by_gallery( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-01-03")) cls: ClsType[_models.GalleryImageList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1532,7 +1532,7 @@ async def _create_or_update_initial( gallery_image_version: Union[_models.GalleryImageVersion, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1766,7 +1766,7 @@ async def _update_initial( gallery_image_version: Union[_models.GalleryImageVersionUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2022,7 +2022,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_01_03.models.GalleryImageVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2075,7 +2075,7 @@ async def _delete_initial( gallery_image_version_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2217,7 +2217,7 @@ def list_by_gallery_image( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-01-03")) cls: ClsType[_models.GalleryImageVersionList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2309,7 +2309,7 @@ async def _create_or_update_initial( gallery_application: Union[_models.GalleryApplication, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2525,7 +2525,7 @@ async def _update_initial( gallery_application: Union[_models.GalleryApplicationUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2751,7 +2751,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_01_03.models.GalleryApplication :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2797,7 +2797,7 @@ async def get( async def _delete_initial( self, resource_group_name: str, gallery_name: str, gallery_application_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2926,7 +2926,7 @@ def list_by_gallery( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-01-03")) cls: ClsType[_models.GalleryApplicationList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3018,7 +3018,7 @@ async def _create_or_update_initial( gallery_application_version: Union[_models.GalleryApplicationVersion, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3254,7 +3254,7 @@ async def _update_initial( gallery_application_version: Union[_models.GalleryApplicationVersionUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3512,7 +3512,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_01_03.models.GalleryApplicationVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3565,7 +3565,7 @@ async def _delete_initial( gallery_application_version_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3708,7 +3708,7 @@ def list_by_gallery_application( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-01-03")) cls: ClsType[_models.GalleryApplicationVersionList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3799,7 +3799,7 @@ async def _update_initial( sharing_update: Union[_models.SharingUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4027,7 +4027,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-01-03")) cls: ClsType[_models.SharedGalleryList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4101,7 +4101,7 @@ async def get(self, location: str, gallery_unique_name: str, **kwargs: Any) -> _ :rtype: ~azure.mgmt.compute.v2022_01_03.models.SharedGallery :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4193,7 +4193,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-01-03")) cls: ClsType[_models.SharedGalleryImageList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4273,7 +4273,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_01_03.models.SharedGalleryImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4371,7 +4371,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-01-03")) cls: ClsType[_models.SharedGalleryImageVersionList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4462,7 +4462,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_01_03.models.SharedGalleryImageVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4539,7 +4539,7 @@ async def get(self, location: str, public_gallery_name: str, **kwargs: Any) -> _ :rtype: ~azure.mgmt.compute.v2022_01_03.models.CommunityGallery :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4618,7 +4618,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_01_03.models.CommunityGalleryImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4683,7 +4683,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-01-03")) cls: ClsType[_models.CommunityGalleryImageList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4792,7 +4792,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_01_03.models.CommunityGalleryImageVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4860,7 +4860,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-01-03")) cls: ClsType[_models.CommunityGalleryImageVersionList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_01_03/models/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_01_03/models/__init__.py index d37d2880d517e..d948d910b7975 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_01_03/models/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_01_03/models/__init__.py @@ -5,112 +5,123 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._models_py3 import ApiError -from ._models_py3 import ApiErrorBase -from ._models_py3 import CommunityGallery -from ._models_py3 import CommunityGalleryImage -from ._models_py3 import CommunityGalleryImageList -from ._models_py3 import CommunityGalleryImageVersion -from ._models_py3 import CommunityGalleryImageVersionList -from ._models_py3 import CommunityGalleryInfo -from ._models_py3 import DataDiskImageEncryption -from ._models_py3 import Disallowed -from ._models_py3 import DiskImageEncryption -from ._models_py3 import EncryptionImages -from ._models_py3 import ExtendedLocation -from ._models_py3 import Gallery -from ._models_py3 import GalleryApplication -from ._models_py3 import GalleryApplicationList -from ._models_py3 import GalleryApplicationUpdate -from ._models_py3 import GalleryApplicationVersion -from ._models_py3 import GalleryApplicationVersionList -from ._models_py3 import GalleryApplicationVersionPublishingProfile -from ._models_py3 import GalleryApplicationVersionUpdate -from ._models_py3 import GalleryArtifactPublishingProfileBase -from ._models_py3 import GalleryArtifactSource -from ._models_py3 import GalleryArtifactVersionSource -from ._models_py3 import GalleryDataDiskImage -from ._models_py3 import GalleryDiskImage -from ._models_py3 import GalleryExtendedLocation -from ._models_py3 import GalleryIdentifier -from ._models_py3 import GalleryImage -from ._models_py3 import GalleryImageFeature -from ._models_py3 import GalleryImageIdentifier -from ._models_py3 import GalleryImageList -from ._models_py3 import GalleryImageUpdate -from ._models_py3 import GalleryImageVersion -from ._models_py3 import GalleryImageVersionList -from ._models_py3 import GalleryImageVersionPublishingProfile -from ._models_py3 import GalleryImageVersionStorageProfile -from ._models_py3 import GalleryImageVersionUpdate -from ._models_py3 import GalleryList -from ._models_py3 import GalleryOSDiskImage -from ._models_py3 import GalleryTargetExtendedLocation -from ._models_py3 import GalleryUpdate -from ._models_py3 import ImagePurchasePlan -from ._models_py3 import InnerError -from ._models_py3 import ManagedArtifact -from ._models_py3 import OSDiskImageEncryption -from ._models_py3 import OSDiskImageSecurityProfile -from ._models_py3 import PirCommunityGalleryResource -from ._models_py3 import PirResource -from ._models_py3 import PirSharedGalleryResource -from ._models_py3 import RecommendedMachineConfiguration -from ._models_py3 import RegionalReplicationStatus -from ._models_py3 import RegionalSharingStatus -from ._models_py3 import ReplicationStatus -from ._models_py3 import Resource -from ._models_py3 import ResourceRange -from ._models_py3 import ResourceWithOptionalLocation -from ._models_py3 import SharedGallery -from ._models_py3 import SharedGalleryDataDiskImage -from ._models_py3 import SharedGalleryDiskImage -from ._models_py3 import SharedGalleryImage -from ._models_py3 import SharedGalleryImageList -from ._models_py3 import SharedGalleryImageVersion -from ._models_py3 import SharedGalleryImageVersionList -from ._models_py3 import SharedGalleryImageVersionStorageProfile -from ._models_py3 import SharedGalleryList -from ._models_py3 import SharedGalleryOSDiskImage -from ._models_py3 import SharingProfile -from ._models_py3 import SharingProfileGroup -from ._models_py3 import SharingStatus -from ._models_py3 import SharingUpdate -from ._models_py3 import SoftDeletePolicy -from ._models_py3 import SubResource -from ._models_py3 import SubResourceReadOnly -from ._models_py3 import TargetRegion -from ._models_py3 import UpdateResourceDefinition -from ._models_py3 import UserArtifactManage -from ._models_py3 import UserArtifactSettings -from ._models_py3 import UserArtifactSource -from ._models_py3 import UserAssignedIdentitiesValue +from typing import TYPE_CHECKING -from ._compute_management_client_enums import AggregatedReplicationState -from ._compute_management_client_enums import Architecture -from ._compute_management_client_enums import ConfidentialVMEncryptionType -from ._compute_management_client_enums import ExtendedLocationTypes -from ._compute_management_client_enums import GalleryExpandParams -from ._compute_management_client_enums import GalleryExtendedLocationType -from ._compute_management_client_enums import GalleryProvisioningState -from ._compute_management_client_enums import GallerySharingPermissionTypes -from ._compute_management_client_enums import HostCaching -from ._compute_management_client_enums import HyperVGeneration -from ._compute_management_client_enums import OperatingSystemStateTypes -from ._compute_management_client_enums import OperatingSystemTypes -from ._compute_management_client_enums import ReplicationMode -from ._compute_management_client_enums import ReplicationState -from ._compute_management_client_enums import ReplicationStatusTypes -from ._compute_management_client_enums import SelectPermissions -from ._compute_management_client_enums import SharedGalleryHostCaching -from ._compute_management_client_enums import SharedToValues -from ._compute_management_client_enums import SharingProfileGroupTypes -from ._compute_management_client_enums import SharingState -from ._compute_management_client_enums import SharingUpdateOperationTypes -from ._compute_management_client_enums import StorageAccountType +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + + +from ._models_py3 import ( # type: ignore + ApiError, + ApiErrorBase, + CommunityGallery, + CommunityGalleryImage, + CommunityGalleryImageList, + CommunityGalleryImageVersion, + CommunityGalleryImageVersionList, + CommunityGalleryInfo, + DataDiskImageEncryption, + Disallowed, + DiskImageEncryption, + EncryptionImages, + ExtendedLocation, + Gallery, + GalleryApplication, + GalleryApplicationList, + GalleryApplicationUpdate, + GalleryApplicationVersion, + GalleryApplicationVersionList, + GalleryApplicationVersionPublishingProfile, + GalleryApplicationVersionUpdate, + GalleryArtifactPublishingProfileBase, + GalleryArtifactSource, + GalleryArtifactVersionSource, + GalleryDataDiskImage, + GalleryDiskImage, + GalleryExtendedLocation, + GalleryIdentifier, + GalleryImage, + GalleryImageFeature, + GalleryImageIdentifier, + GalleryImageList, + GalleryImageUpdate, + GalleryImageVersion, + GalleryImageVersionList, + GalleryImageVersionPublishingProfile, + GalleryImageVersionStorageProfile, + GalleryImageVersionUpdate, + GalleryList, + GalleryOSDiskImage, + GalleryTargetExtendedLocation, + GalleryUpdate, + ImagePurchasePlan, + InnerError, + ManagedArtifact, + OSDiskImageEncryption, + OSDiskImageSecurityProfile, + PirCommunityGalleryResource, + PirResource, + PirSharedGalleryResource, + RecommendedMachineConfiguration, + RegionalReplicationStatus, + RegionalSharingStatus, + ReplicationStatus, + Resource, + ResourceRange, + ResourceWithOptionalLocation, + SharedGallery, + SharedGalleryDataDiskImage, + SharedGalleryDiskImage, + SharedGalleryImage, + SharedGalleryImageList, + SharedGalleryImageVersion, + SharedGalleryImageVersionList, + SharedGalleryImageVersionStorageProfile, + SharedGalleryList, + SharedGalleryOSDiskImage, + SharingProfile, + SharingProfileGroup, + SharingStatus, + SharingUpdate, + SoftDeletePolicy, + SubResource, + SubResourceReadOnly, + TargetRegion, + UpdateResourceDefinition, + UserArtifactManage, + UserArtifactSettings, + UserArtifactSource, + UserAssignedIdentitiesValue, +) + +from ._compute_management_client_enums import ( # type: ignore + AggregatedReplicationState, + Architecture, + ConfidentialVMEncryptionType, + ExtendedLocationTypes, + GalleryExpandParams, + GalleryExtendedLocationType, + GalleryProvisioningState, + GallerySharingPermissionTypes, + HostCaching, + HyperVGeneration, + OperatingSystemStateTypes, + OperatingSystemTypes, + ReplicationMode, + ReplicationState, + ReplicationStatusTypes, + SelectPermissions, + SharedGalleryHostCaching, + SharedToValues, + SharingProfileGroupTypes, + SharingState, + SharingUpdateOperationTypes, + StorageAccountType, +) 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__ = [ @@ -217,5 +228,5 @@ "SharingUpdateOperationTypes", "StorageAccountType", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_01_03/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_01_03/models/_models_py3.py index 02f3d78c0cc6c..92c7eb03c0331 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_01_03/models/_models_py3.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_01_03/models/_models_py3.py @@ -1,5 +1,5 @@ -# 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. @@ -13,7 +13,6 @@ from ... import _serialization if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models @@ -160,7 +159,7 @@ class CommunityGallery(PirCommunityGalleryResource): """ -class CommunityGalleryImage(PirCommunityGalleryResource): # pylint: disable=too-many-instance-attributes +class CommunityGalleryImage(PirCommunityGalleryResource): """Specifies information about the gallery image definition that you want to create or update. Variables are only populated by the server, and will be ignored when sending a request. @@ -714,7 +713,7 @@ def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kw self.tags = tags -class Gallery(Resource): # pylint: disable=too-many-instance-attributes +class Gallery(Resource): """Specifies information about the Shared Image Gallery that you want to create or update. Variables are only populated by the server, and will be ignored when sending a request. @@ -807,7 +806,7 @@ def __init__( self.sharing_status = None -class GalleryApplication(Resource): # pylint: disable=too-many-instance-attributes +class GalleryApplication(Resource): """Specifies information about the gallery Application Definition that you want to create or update. @@ -1290,9 +1289,7 @@ def __init__( self.target_extended_locations = target_extended_locations -class GalleryApplicationVersionPublishingProfile( - GalleryArtifactPublishingProfileBase -): # pylint: disable=too-many-instance-attributes,name-too-long +class GalleryApplicationVersionPublishingProfile(GalleryArtifactPublishingProfileBase): # pylint: disable=name-too-long """The publishing profile of a gallery image version. Variables are only populated by the server, and will be ignored when sending a request. @@ -1712,7 +1709,7 @@ def __init__(self, **kwargs: Any) -> None: self.unique_name = None -class GalleryImage(Resource): # pylint: disable=too-many-instance-attributes +class GalleryImage(Resource): """Specifies information about the gallery image definition that you want to create or update. Variables are only populated by the server, and will be ignored when sending a request. @@ -1989,7 +1986,7 @@ def __init__(self, *, value: List["_models.GalleryImage"], next_link: Optional[s self.next_link = next_link -class GalleryImageUpdate(UpdateResourceDefinition): # pylint: disable=too-many-instance-attributes +class GalleryImageUpdate(UpdateResourceDefinition): """Specifies information about the gallery image definition that you want to update. Variables are only populated by the server, and will be ignored when sending a request. @@ -3145,7 +3142,7 @@ def __init__( self.lun = lun -class SharedGalleryImage(PirSharedGalleryResource): # pylint: disable=too-many-instance-attributes +class SharedGalleryImage(PirSharedGalleryResource): """Specifies information about the gallery image definition that you want to create or update. Variables are only populated by the server, and will be ignored when sending a request. diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_01_03/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_01_03/operations/__init__.py index 322500f753256..139d983a58402 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_01_03/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_01_03/operations/__init__.py @@ -5,22 +5,28 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._operations import GalleriesOperations -from ._operations import GalleryImagesOperations -from ._operations import GalleryImageVersionsOperations -from ._operations import GalleryApplicationsOperations -from ._operations import GalleryApplicationVersionsOperations -from ._operations import GallerySharingProfileOperations -from ._operations import SharedGalleriesOperations -from ._operations import SharedGalleryImagesOperations -from ._operations import SharedGalleryImageVersionsOperations -from ._operations import CommunityGalleriesOperations -from ._operations import CommunityGalleryImagesOperations -from ._operations import CommunityGalleryImageVersionsOperations +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._operations import GalleriesOperations # type: ignore +from ._operations import GalleryImagesOperations # type: ignore +from ._operations import GalleryImageVersionsOperations # type: ignore +from ._operations import GalleryApplicationsOperations # type: ignore +from ._operations import GalleryApplicationVersionsOperations # type: ignore +from ._operations import GallerySharingProfileOperations # type: ignore +from ._operations import SharedGalleriesOperations # type: ignore +from ._operations import SharedGalleryImagesOperations # type: ignore +from ._operations import SharedGalleryImageVersionsOperations # type: ignore +from ._operations import CommunityGalleriesOperations # type: ignore +from ._operations import CommunityGalleryImagesOperations # type: ignore +from ._operations import CommunityGalleryImageVersionsOperations # 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__ = [ @@ -37,5 +43,5 @@ "CommunityGalleryImagesOperations", "CommunityGalleryImageVersionsOperations", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_01_03/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_01_03/operations/_operations.py index 8e4c708d3f5d7..30c2d2a3af0f5 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_01_03/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_01_03/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. @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -36,7 +36,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, HttpResponse], T, Dict[str, Any]], Any]] @@ -1400,7 +1400,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, gallery_name: str, gallery: Union[_models.Gallery, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1590,7 +1590,7 @@ def _update_initial( gallery: Union[_models.GalleryUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1801,7 +1801,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_01_03.models.Gallery :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1846,7 +1846,7 @@ def get( return deserialized # type: ignore def _delete_initial(self, resource_group_name: str, gallery_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1961,7 +1961,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-01-03")) cls: ClsType[_models.GalleryList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2036,7 +2036,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Gallery"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-01-03")) cls: ClsType[_models.GalleryList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2125,7 +2125,7 @@ def _create_or_update_initial( gallery_image: Union[_models.GalleryImage, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2337,7 +2337,7 @@ def _update_initial( gallery_image: Union[_models.GalleryImageUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2556,7 +2556,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_01_03.models.GalleryImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2602,7 +2602,7 @@ def get( def _delete_initial( self, resource_group_name: str, gallery_name: str, gallery_image_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2729,7 +2729,7 @@ def list_by_gallery( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-01-03")) cls: ClsType[_models.GalleryImageList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2821,7 +2821,7 @@ def _create_or_update_initial( gallery_image_version: Union[_models.GalleryImageVersion, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3055,7 +3055,7 @@ def _update_initial( gallery_image_version: Union[_models.GalleryImageVersionUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3311,7 +3311,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_01_03.models.GalleryImageVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3364,7 +3364,7 @@ def _delete_initial( gallery_image_version_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3506,7 +3506,7 @@ def list_by_gallery_image( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-01-03")) cls: ClsType[_models.GalleryImageVersionList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3598,7 +3598,7 @@ def _create_or_update_initial( gallery_application: Union[_models.GalleryApplication, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3814,7 +3814,7 @@ def _update_initial( gallery_application: Union[_models.GalleryApplicationUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4040,7 +4040,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_01_03.models.GalleryApplication :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4086,7 +4086,7 @@ def get( def _delete_initial( self, resource_group_name: str, gallery_name: str, gallery_application_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4214,7 +4214,7 @@ def list_by_gallery( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-01-03")) cls: ClsType[_models.GalleryApplicationList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4306,7 +4306,7 @@ def _create_or_update_initial( gallery_application_version: Union[_models.GalleryApplicationVersion, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4542,7 +4542,7 @@ def _update_initial( gallery_application_version: Union[_models.GalleryApplicationVersionUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4800,7 +4800,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_01_03.models.GalleryApplicationVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4853,7 +4853,7 @@ def _delete_initial( gallery_application_version_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4996,7 +4996,7 @@ def list_by_gallery_application( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-01-03")) cls: ClsType[_models.GalleryApplicationVersionList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5087,7 +5087,7 @@ def _update_initial( sharing_update: Union[_models.SharingUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5311,7 +5311,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-01-03")) cls: ClsType[_models.SharedGalleryList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5385,7 +5385,7 @@ def get(self, location: str, gallery_unique_name: str, **kwargs: Any) -> _models :rtype: ~azure.mgmt.compute.v2022_01_03.models.SharedGallery :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5476,7 +5476,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-01-03")) cls: ClsType[_models.SharedGalleryImageList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5556,7 +5556,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_01_03.models.SharedGalleryImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5654,7 +5654,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-01-03")) cls: ClsType[_models.SharedGalleryImageVersionList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5745,7 +5745,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_01_03.models.SharedGalleryImageVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5822,7 +5822,7 @@ def get(self, location: str, public_gallery_name: str, **kwargs: Any) -> _models :rtype: ~azure.mgmt.compute.v2022_01_03.models.CommunityGallery :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5901,7 +5901,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_01_03.models.CommunityGalleryImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5964,7 +5964,7 @@ def list(self, location: str, public_gallery_name: str, **kwargs: Any) -> Iterab api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-01-03")) cls: ClsType[_models.CommunityGalleryImageList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6073,7 +6073,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_01_03.models.CommunityGalleryImageVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6141,7 +6141,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-01-03")) cls: ClsType[_models.CommunityGalleryImageVersionList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_01/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_01/__init__.py index 3b1b6244b2375..ab7c46e8991db 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_01/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_01/__init__.py @@ -5,15 +5,21 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._compute_management_client import ComputeManagementClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._compute_management_client import ComputeManagementClient # 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__ = [ "ComputeManagementClient", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_01/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_01/_compute_management_client.py index 2e661d9bae400..5b99e6e5cdedb 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_01/_compute_management_client.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_01/_compute_management_client.py @@ -48,11 +48,10 @@ ) if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class ComputeManagementClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes +class ComputeManagementClient: # pylint: disable=too-many-instance-attributes """Compute Client. :ivar operations: Operations operations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_01/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_01/_configuration.py index 10629f815c560..597344774a4fe 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_01/_configuration.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_01/_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 ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ComputeManagementClient. Note that all parameters used to create this instance are saved as instance diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_01/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_01/_version.py index d79b2760319c5..e5754a47ce68f 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_01/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "33.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_01/aio/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_01/aio/__init__.py index 0715f50185586..d3fd1ba93379a 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_01/aio/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_01/aio/__init__.py @@ -5,12 +5,18 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._compute_management_client import ComputeManagementClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._compute_management_client import ComputeManagementClient # 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__ = [ "ComputeManagementClient", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_01/aio/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_01/aio/_compute_management_client.py index 0f46094dfdf60..9bd55b8e58c3e 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_01/aio/_compute_management_client.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_01/aio/_compute_management_client.py @@ -48,11 +48,10 @@ ) if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class ComputeManagementClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes +class ComputeManagementClient: # pylint: disable=too-many-instance-attributes """Compute Client. :ivar operations: Operations operations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_01/aio/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_01/aio/_configuration.py index ae96c8a88df6c..9f1243e15d9b1 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_01/aio/_configuration.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_01/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 ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ComputeManagementClient. Note that all parameters used to create this instance are saved as instance diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_01/aio/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_01/aio/operations/__init__.py index 3cc8e8e7a73a8..5cc9a11e23416 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_01/aio/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_01/aio/operations/__init__.py @@ -5,36 +5,42 @@ # Code generated by Microsoft (R) AutoRest 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 UsageOperations -from ._operations import VirtualMachineSizesOperations -from ._operations import VirtualMachineScaleSetsOperations -from ._operations import VirtualMachineScaleSetExtensionsOperations -from ._operations import VirtualMachineScaleSetRollingUpgradesOperations -from ._operations import VirtualMachineScaleSetVMExtensionsOperations -from ._operations import VirtualMachineScaleSetVMsOperations -from ._operations import VirtualMachineExtensionsOperations -from ._operations import VirtualMachinesOperations -from ._operations import VirtualMachineImagesOperations -from ._operations import VirtualMachineImagesEdgeZoneOperations -from ._operations import VirtualMachineExtensionImagesOperations -from ._operations import AvailabilitySetsOperations -from ._operations import ProximityPlacementGroupsOperations -from ._operations import DedicatedHostGroupsOperations -from ._operations import DedicatedHostsOperations -from ._operations import SshPublicKeysOperations -from ._operations import ImagesOperations -from ._operations import RestorePointCollectionsOperations -from ._operations import RestorePointsOperations -from ._operations import CapacityReservationGroupsOperations -from ._operations import CapacityReservationsOperations -from ._operations import LogAnalyticsOperations -from ._operations import VirtualMachineRunCommandsOperations -from ._operations import VirtualMachineScaleSetVMRunCommandsOperations +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 UsageOperations # type: ignore +from ._operations import VirtualMachineSizesOperations # type: ignore +from ._operations import VirtualMachineScaleSetsOperations # type: ignore +from ._operations import VirtualMachineScaleSetExtensionsOperations # type: ignore +from ._operations import VirtualMachineScaleSetRollingUpgradesOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMExtensionsOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMsOperations # type: ignore +from ._operations import VirtualMachineExtensionsOperations # type: ignore +from ._operations import VirtualMachinesOperations # type: ignore +from ._operations import VirtualMachineImagesOperations # type: ignore +from ._operations import VirtualMachineImagesEdgeZoneOperations # type: ignore +from ._operations import VirtualMachineExtensionImagesOperations # type: ignore +from ._operations import AvailabilitySetsOperations # type: ignore +from ._operations import ProximityPlacementGroupsOperations # type: ignore +from ._operations import DedicatedHostGroupsOperations # type: ignore +from ._operations import DedicatedHostsOperations # type: ignore +from ._operations import SshPublicKeysOperations # type: ignore +from ._operations import ImagesOperations # type: ignore +from ._operations import RestorePointCollectionsOperations # type: ignore +from ._operations import RestorePointsOperations # type: ignore +from ._operations import CapacityReservationGroupsOperations # type: ignore +from ._operations import CapacityReservationsOperations # type: ignore +from ._operations import LogAnalyticsOperations # type: ignore +from ._operations import VirtualMachineRunCommandsOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMRunCommandsOperations # 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__ = [ @@ -65,5 +71,5 @@ "VirtualMachineRunCommandsOperations", "VirtualMachineScaleSetVMRunCommandsOperations", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_01/aio/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_01/aio/operations/_operations.py index 39c96bf5eb23e..aac25406ffba9 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_01/aio/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_01/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. @@ -8,21 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import ( - Any, - AsyncIterable, - AsyncIterator, - Callable, - Dict, - IO, - List, - Optional, - Type, - TypeVar, - Union, - cast, - overload, -) +from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, List, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -224,7 +210,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]] @@ -265,7 +251,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.ComputeOperationValue"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.ComputeOperationListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -362,7 +348,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.Usage"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.ListUsagesResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -462,7 +448,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.VirtualMa api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -563,7 +549,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> AsyncIterable["_mode api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -631,7 +617,7 @@ async def _create_or_update_initial( parameters: Union[_models.VirtualMachineScaleSet, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -823,7 +809,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineScaleSetUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1012,7 +998,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, *, force_deletion: Optional[bool] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1141,7 +1127,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_03_01.models.VirtualMachineScaleSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1191,7 +1177,7 @@ async def _deallocate_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1388,7 +1374,7 @@ async def _delete_instances_initial( force_deletion: Optional[bool] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1596,7 +1582,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2022_03_01.models.VirtualMachineScaleSetInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1656,7 +1642,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1735,7 +1721,7 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.VirtualMachineScaleS api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.VirtualMachineScaleSetListWithLinkResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1818,7 +1804,7 @@ def list_skus( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.VirtualMachineScaleSetListSkusResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1884,6 +1870,7 @@ async def get_next(next_link=None): def get_os_upgrade_history( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> AsyncIterable["_models.UpgradeOperationHistoricalStatusInfo"]: + # pylint: disable=line-too-long """Gets list of OS upgrades on a VM scale set instance. :param resource_group_name: The name of the resource group. Required. @@ -1902,7 +1889,7 @@ def get_os_upgrade_history( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.VirtualMachineScaleSetListOSUpgradeHistory] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1973,7 +1960,7 @@ async def _power_off_initial( skip_shutdown: bool = False, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2186,7 +2173,7 @@ async def _restart_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2375,7 +2362,7 @@ async def _start_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2564,7 +2551,7 @@ async def _redeploy_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2756,7 +2743,7 @@ async def _perform_maintenance_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2954,7 +2941,7 @@ async def _update_instances_initial( vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3140,7 +3127,7 @@ async def _reimage_initial( vm_scale_set_reimage_input: Optional[Union[_models.VirtualMachineScaleSetReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3333,7 +3320,7 @@ async def _reimage_all_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3549,7 +3536,7 @@ async def force_recovery_service_fabric_platform_update_domain_walk( # pylint: :rtype: ~azure.mgmt.compute.v2022_03_01.models.RecoveryWalkResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3595,7 +3582,7 @@ async def force_recovery_service_fabric_platform_update_domain_walk( # pylint: return deserialized # type: ignore @overload - async def convert_to_single_placement_group( # pylint: disable=inconsistent-return-statements + async def convert_to_single_placement_group( self, resource_group_name: str, vm_scale_set_name: str, @@ -3623,7 +3610,7 @@ async def convert_to_single_placement_group( # pylint: disable=inconsistent-ret """ @overload - async def convert_to_single_placement_group( # pylint: disable=inconsistent-return-statements + async def convert_to_single_placement_group( self, resource_group_name: str, vm_scale_set_name: str, @@ -3650,7 +3637,7 @@ async def convert_to_single_placement_group( # pylint: disable=inconsistent-ret """ @distributed_trace_async - async def convert_to_single_placement_group( # pylint: disable=inconsistent-return-statements + async def convert_to_single_placement_group( self, resource_group_name: str, vm_scale_set_name: str, @@ -3673,7 +3660,7 @@ async def convert_to_single_placement_group( # pylint: disable=inconsistent-ret :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3730,7 +3717,7 @@ async def _set_orchestration_service_state_initial( parameters: Union[_models.OrchestrationServiceStateInput, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3938,7 +3925,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtension, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4149,7 +4136,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtensionUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4356,7 +4343,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, vmss_extension_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4486,7 +4473,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_03_01.models.VirtualMachineScaleSetExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4552,7 +4539,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.VirtualMachineScaleSetExtensionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4638,7 +4625,7 @@ def __init__(self, *args, **kwargs) -> None: async def _cancel_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4742,7 +4729,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_os_upgrade_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4848,7 +4835,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_extension_upgrade_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4965,7 +4952,7 @@ async def get_latest( :rtype: ~azure.mgmt.compute.v2022_03_01.models.RollingUpgradeStatusInfo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5037,7 +5024,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetVMExtension, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5257,7 +5244,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetVMExtensionUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5472,7 +5459,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, vm_extension_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5608,7 +5595,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_03_01.models.VirtualMachineScaleSetVMExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5677,7 +5664,7 @@ async def list( :rtype: ~azure.mgmt.compute.v2022_03_01.models.VirtualMachineScaleSetVMExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5754,7 +5741,7 @@ async def _reimage_initial( ] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5953,7 +5940,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _reimage_all_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6062,7 +6049,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _deallocate_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6177,7 +6164,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineScaleSetVM, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6387,7 +6374,7 @@ async def _delete_initial( force_deletion: Optional[bool] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6529,7 +6516,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_03_01.models.VirtualMachineScaleSetVM :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6589,7 +6576,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2022_03_01.models.VirtualMachineScaleSetVMInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6671,7 +6658,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.VirtualMachineScaleSetVMListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6745,7 +6732,7 @@ async def _power_off_initial( skip_shutdown: bool = False, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6867,7 +6854,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _restart_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6975,7 +6962,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7083,7 +7070,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _redeploy_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7217,7 +7204,7 @@ async def retrieve_boot_diagnostics_data( :rtype: ~azure.mgmt.compute.v2022_03_01.models.RetrieveBootDiagnosticsDataResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7264,7 +7251,7 @@ async def retrieve_boot_diagnostics_data( async def _perform_maintenance_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7370,7 +7357,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace_async - async def simulate_eviction( # pylint: disable=inconsistent-return-statements + async def simulate_eviction( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: """The operation to simulate the eviction of spot virtual machine in a VM scale set. @@ -7385,7 +7372,7 @@ async def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7432,7 +7419,7 @@ async def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7659,7 +7646,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineExtension, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7869,7 +7856,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineExtensionUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8075,7 +8062,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_name: str, vm_extension_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8205,7 +8192,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_03_01.models.VirtualMachineExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8265,7 +8252,7 @@ async def list( :rtype: ~azure.mgmt.compute.v2022_03_01.models.VirtualMachineExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8347,7 +8334,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> AsyncIterable["_mode api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8415,7 +8402,7 @@ async def _capture_initial( parameters: Union[_models.VirtualMachineCaptureParameters, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8613,7 +8600,7 @@ async def _create_or_update_initial( parameters: Union[_models.VirtualMachine, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8808,7 +8795,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8996,7 +8983,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_name: str, *, force_deletion: Optional[bool] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9127,7 +9114,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_03_01.models.VirtualMachine :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9184,7 +9171,7 @@ async def instance_view( :rtype: ~azure.mgmt.compute.v2022_03_01.models.VirtualMachineInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9229,7 +9216,7 @@ async def instance_view( async def _convert_to_managed_disks_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9334,7 +9321,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _deallocate_initial( self, resource_group_name: str, vm_name: str, *, hibernate: Optional[bool] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9442,9 +9429,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace_async - async def generalize( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, vm_name: str, **kwargs: Any - ) -> None: + async def generalize(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> None: """Sets the OS state of the virtual machine to generalized. It is recommended to sysprep the virtual machine before performing this operation. :code:`
`For Windows, please refer to `Create a managed image of a generalized VM in Azure @@ -9460,7 +9445,7 @@ async def generalize( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9502,6 +9487,7 @@ async def generalize( # pylint: disable=inconsistent-return-statements def list( self, resource_group_name: str, *, filter: Optional[str] = None, **kwargs: Any ) -> AsyncIterable["_models.VirtualMachine"]: + # pylint: disable=line-too-long """Lists all of the virtual machines in the specified resource group. Use the nextLink property in the response to get the next page of virtual machines. @@ -9523,7 +9509,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9589,6 +9575,7 @@ async def get_next(next_link=None): def list_all( self, *, status_only: Optional[str] = None, filter: Optional[str] = None, **kwargs: Any ) -> AsyncIterable["_models.VirtualMachine"]: + # pylint: disable=line-too-long """Lists all of the virtual machines in the specified subscription. Use the nextLink property in the response to get the next page of virtual machines. @@ -9611,7 +9598,7 @@ def list_all( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9695,7 +9682,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9760,7 +9747,7 @@ async def get_next(next_link=None): async def _power_off_initial( self, resource_group_name: str, vm_name: str, *, skip_shutdown: bool = False, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9869,7 +9856,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _reapply_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9969,7 +9956,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _restart_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10069,7 +10056,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _start_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10169,7 +10156,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _redeploy_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10275,7 +10262,7 @@ async def _reimage_initial( parameters: Optional[Union[_models.VirtualMachineReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10480,7 +10467,7 @@ async def retrieve_boot_diagnostics_data( :rtype: ~azure.mgmt.compute.v2022_03_01.models.RetrieveBootDiagnosticsDataResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10526,7 +10513,7 @@ async def retrieve_boot_diagnostics_data( async def _perform_maintenance_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10628,9 +10615,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace_async - async def simulate_eviction( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, vm_name: str, **kwargs: Any - ) -> None: + async def simulate_eviction(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> None: """The operation to simulate the eviction of spot virtual machine. :param resource_group_name: The name of the resource group. Required. @@ -10641,7 +10626,7 @@ async def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10682,7 +10667,7 @@ async def simulate_eviction( # pylint: disable=inconsistent-return-statements async def _assess_patches_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10798,7 +10783,7 @@ async def _install_patches_initial( install_patches_input: Union[_models.VirtualMachineInstallPatchesParameters, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10996,7 +10981,7 @@ async def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11224,7 +11209,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_03_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11303,7 +11288,7 @@ async def list( :rtype: list[~azure.mgmt.compute.v2022_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11364,7 +11349,7 @@ async def list_offers( :rtype: list[~azure.mgmt.compute.v2022_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11416,7 +11401,7 @@ async def list_publishers(self, location: str, **kwargs: Any) -> List[_models.Vi :rtype: list[~azure.mgmt.compute.v2022_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11473,7 +11458,7 @@ async def list_skus( :rtype: list[~azure.mgmt.compute.v2022_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11530,7 +11515,7 @@ async def list_by_edge_zone( :rtype: ~azure.mgmt.compute.v2022_03_01.models.VmImagesInEdgeZoneListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11615,7 +11600,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_03_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11700,7 +11685,7 @@ async def list( :rtype: list[~azure.mgmt.compute.v2022_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11765,7 +11750,7 @@ async def list_offers( :rtype: list[~azure.mgmt.compute.v2022_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11822,7 +11807,7 @@ async def list_publishers( :rtype: list[~azure.mgmt.compute.v2022_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11883,7 +11868,7 @@ async def list_skus( :rtype: list[~azure.mgmt.compute.v2022_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11966,7 +11951,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_03_01.models.VirtualMachineExtensionImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12024,7 +12009,7 @@ async def list_types( :rtype: list[~azure.mgmt.compute.v2022_03_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12096,7 +12081,7 @@ async def list_versions( :rtype: list[~azure.mgmt.compute.v2022_03_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12236,7 +12221,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2022_03_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12363,7 +12348,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2022_03_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12418,9 +12403,7 @@ async def update( return deserialized # type: ignore @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, availability_set_name: str, **kwargs: Any - ) -> None: + async def delete(self, resource_group_name: str, availability_set_name: str, **kwargs: Any) -> None: """Delete an availability set. :param resource_group_name: The name of the resource group. Required. @@ -12431,7 +12414,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12481,7 +12464,7 @@ async def get(self, resource_group_name: str, availability_set_name: str, **kwar :rtype: ~azure.mgmt.compute.v2022_03_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12543,7 +12526,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12621,7 +12604,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12704,7 +12687,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12862,7 +12845,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2022_03_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12992,7 +12975,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2022_03_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13047,9 +13030,7 @@ async def update( return deserialized # type: ignore @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, proximity_placement_group_name: str, **kwargs: Any - ) -> None: + async def delete(self, resource_group_name: str, proximity_placement_group_name: str, **kwargs: Any) -> None: """Delete a proximity placement group. :param resource_group_name: The name of the resource group. Required. @@ -13060,7 +13041,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13120,7 +13101,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_03_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13179,7 +13160,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Proximit api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13259,7 +13240,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13420,7 +13401,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2022_03_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13547,7 +13528,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2022_03_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13602,9 +13583,7 @@ async def update( return deserialized # type: ignore @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, host_group_name: str, **kwargs: Any - ) -> None: + async def delete(self, resource_group_name: str, host_group_name: str, **kwargs: Any) -> None: """Delete a dedicated host group. :param resource_group_name: The name of the resource group. Required. @@ -13615,7 +13594,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13677,7 +13656,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_03_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13740,7 +13719,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13817,7 +13796,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Dedicate api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13906,7 +13885,7 @@ async def _create_or_update_initial( parameters: Union[_models.DedicatedHost, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14110,7 +14089,7 @@ async def _update_initial( parameters: Union[_models.DedicatedHostUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14309,7 +14288,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14440,7 +14419,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_03_01.models.DedicatedHost :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14506,7 +14485,7 @@ def list_by_host_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.DedicatedHostListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14571,7 +14550,7 @@ async def get_next(next_link=None): async def _restart_initial( self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14717,7 +14696,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.SshPubli api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14798,7 +14777,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14932,7 +14911,7 @@ async def create( :rtype: ~azure.mgmt.compute.v2022_03_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15060,7 +15039,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2022_03_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15115,9 +15094,7 @@ async def update( return deserialized # type: ignore @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, ssh_public_key_name: str, **kwargs: Any - ) -> None: + async def delete(self, resource_group_name: str, ssh_public_key_name: str, **kwargs: Any) -> None: """Delete an SSH public key. :param resource_group_name: The name of the resource group. Required. @@ -15128,7 +15105,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15180,7 +15157,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_03_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15238,7 +15215,7 @@ async def generate_key_pair( :rtype: ~azure.mgmt.compute.v2022_03_01.models.SshPublicKeyGenerateKeyPairResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15304,7 +15281,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, image_name: str, parameters: Union[_models.Image, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15486,7 +15463,7 @@ async def _update_initial( parameters: Union[_models.ImageUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15666,7 +15643,7 @@ def get_long_running_output(pipeline_response): ) async def _delete_initial(self, resource_group_name: str, image_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15781,7 +15758,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_03_01.models.Image :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15840,7 +15817,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15916,7 +15893,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Image"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16078,7 +16055,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2022_03_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16208,7 +16185,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2022_03_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16265,7 +16242,7 @@ async def update( async def _delete_initial( self, resource_group_name: str, restore_point_collection_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16391,7 +16368,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_03_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16452,7 +16429,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.RestorePointCollectionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16531,7 +16508,7 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.RestorePointCollecti api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.RestorePointCollectionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16620,7 +16597,7 @@ async def _create_initial( parameters: Union[_models.RestorePoint, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16819,7 +16796,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, restore_point_collection_name: str, restore_point_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16949,7 +16926,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_03_01.models.RestorePoint :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17093,7 +17070,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2022_03_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17226,7 +17203,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2022_03_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17281,9 +17258,7 @@ async def update( return deserialized # type: ignore @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, capacity_reservation_group_name: str, **kwargs: Any - ) -> None: + async def delete(self, resource_group_name: str, capacity_reservation_group_name: str, **kwargs: Any) -> None: """The operation to delete a capacity reservation group. This operation is allowed only if all the associated resources are disassociated from the reservation group and all capacity reservations under the reservation group have also been deleted. Please refer to @@ -17297,7 +17272,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17361,7 +17336,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_03_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17435,7 +17410,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.CapacityReservationGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17522,7 +17497,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.CapacityReservationGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17612,7 +17587,7 @@ async def _create_or_update_initial( parameters: Union[_models.CapacityReservation, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17822,7 +17797,7 @@ async def _update_initial( parameters: Union[_models.CapacityReservationUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18025,7 +18000,7 @@ async def _delete_initial( capacity_reservation_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18163,7 +18138,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_03_01.models.CapacityReservation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18229,7 +18204,7 @@ def list_by_capacity_reservation_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.CapacityReservationListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18315,7 +18290,7 @@ def __init__(self, *args, **kwargs) -> None: async def _export_request_rate_by_interval_initial( self, location: str, parameters: Union[_models.RequestRateByIntervalInput, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18493,7 +18468,7 @@ def get_long_running_output(pipeline_response): async def _export_throttled_requests_initial( self, location: str, parameters: Union[_models.ThrottledRequestsInput, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18704,7 +18679,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.RunComman api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.RunCommandListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18777,7 +18752,7 @@ async def get(self, location: str, command_id: str, **kwargs: Any) -> _models.Ru :rtype: ~azure.mgmt.compute.v2022_03_01.models.RunCommandDocument :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18827,7 +18802,7 @@ async def _create_or_update_initial( run_command: Union[_models.VirtualMachineRunCommand, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19036,7 +19011,7 @@ async def _update_initial( run_command: Union[_models.VirtualMachineRunCommandUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19241,7 +19216,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_name: str, run_command_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19371,7 +19346,7 @@ async def get_by_virtual_machine( :rtype: ~azure.mgmt.compute.v2022_03_01.models.VirtualMachineRunCommand :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19439,7 +19414,7 @@ def list_by_virtual_machine( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.VirtualMachineRunCommandsListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19532,7 +19507,7 @@ async def _create_or_update_initial( run_command: Union[_models.VirtualMachineRunCommand, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19750,7 +19725,7 @@ async def _update_initial( run_command: Union[_models.VirtualMachineRunCommandUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19963,7 +19938,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, run_command_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20099,7 +20074,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_03_01.models.VirtualMachineRunCommand :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20176,7 +20151,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.VirtualMachineRunCommandsListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_01/models/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_01/models/__init__.py index c5b79e33af8aa..7b44cdf0ab088 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_01/models/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_01/models/__init__.py @@ -5,328 +5,339 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._models_py3 import AdditionalCapabilities -from ._models_py3 import AdditionalUnattendContent -from ._models_py3 import ApiEntityReference -from ._models_py3 import ApiError -from ._models_py3 import ApiErrorBase -from ._models_py3 import ApplicationProfile -from ._models_py3 import AutomaticOSUpgradePolicy -from ._models_py3 import AutomaticOSUpgradeProperties -from ._models_py3 import AutomaticRepairsPolicy -from ._models_py3 import AvailabilitySet -from ._models_py3 import AvailabilitySetListResult -from ._models_py3 import AvailabilitySetUpdate -from ._models_py3 import AvailablePatchSummary -from ._models_py3 import BillingProfile -from ._models_py3 import BootDiagnostics -from ._models_py3 import BootDiagnosticsInstanceView -from ._models_py3 import CapacityReservation -from ._models_py3 import CapacityReservationGroup -from ._models_py3 import CapacityReservationGroupInstanceView -from ._models_py3 import CapacityReservationGroupListResult -from ._models_py3 import CapacityReservationGroupUpdate -from ._models_py3 import CapacityReservationInstanceView -from ._models_py3 import CapacityReservationInstanceViewWithName -from ._models_py3 import CapacityReservationListResult -from ._models_py3 import CapacityReservationProfile -from ._models_py3 import CapacityReservationUpdate -from ._models_py3 import CapacityReservationUtilization -from ._models_py3 import ComputeOperationListResult -from ._models_py3 import ComputeOperationValue -from ._models_py3 import DataDisk -from ._models_py3 import DataDiskImage -from ._models_py3 import DedicatedHost -from ._models_py3 import DedicatedHostAllocatableVM -from ._models_py3 import DedicatedHostAvailableCapacity -from ._models_py3 import DedicatedHostGroup -from ._models_py3 import DedicatedHostGroupInstanceView -from ._models_py3 import DedicatedHostGroupListResult -from ._models_py3 import DedicatedHostGroupPropertiesAdditionalCapabilities -from ._models_py3 import DedicatedHostGroupUpdate -from ._models_py3 import DedicatedHostInstanceView -from ._models_py3 import DedicatedHostInstanceViewWithName -from ._models_py3 import DedicatedHostListResult -from ._models_py3 import DedicatedHostUpdate -from ._models_py3 import DiagnosticsProfile -from ._models_py3 import DiffDiskSettings -from ._models_py3 import DisallowedConfiguration -from ._models_py3 import DiskEncryptionSetParameters -from ._models_py3 import DiskEncryptionSettings -from ._models_py3 import DiskInstanceView -from ._models_py3 import DiskRestorePointInstanceView -from ._models_py3 import DiskRestorePointReplicationStatus -from ._models_py3 import ExtendedLocation -from ._models_py3 import HardwareProfile -from ._models_py3 import Image -from ._models_py3 import ImageDataDisk -from ._models_py3 import ImageDisk -from ._models_py3 import ImageListResult -from ._models_py3 import ImageOSDisk -from ._models_py3 import ImageReference -from ._models_py3 import ImageStorageProfile -from ._models_py3 import ImageUpdate -from ._models_py3 import InnerError -from ._models_py3 import InstanceViewStatus -from ._models_py3 import KeyVaultKeyReference -from ._models_py3 import KeyVaultSecretReference -from ._models_py3 import LastPatchInstallationSummary -from ._models_py3 import LinuxConfiguration -from ._models_py3 import LinuxParameters -from ._models_py3 import LinuxPatchSettings -from ._models_py3 import LinuxVMGuestPatchAutomaticByPlatformSettings -from ._models_py3 import ListUsagesResult -from ._models_py3 import LogAnalyticsInputBase -from ._models_py3 import LogAnalyticsOperationResult -from ._models_py3 import LogAnalyticsOutput -from ._models_py3 import MaintenanceRedeployStatus -from ._models_py3 import ManagedDiskParameters -from ._models_py3 import NetworkInterfaceReference -from ._models_py3 import NetworkProfile -from ._models_py3 import OSDisk -from ._models_py3 import OSDiskImage -from ._models_py3 import OSProfile -from ._models_py3 import OrchestrationServiceStateInput -from ._models_py3 import OrchestrationServiceSummary -from ._models_py3 import PatchInstallationDetail -from ._models_py3 import PatchSettings -from ._models_py3 import Plan -from ._models_py3 import ProximityPlacementGroup -from ._models_py3 import ProximityPlacementGroupListResult -from ._models_py3 import ProximityPlacementGroupPropertiesIntent -from ._models_py3 import ProximityPlacementGroupUpdate -from ._models_py3 import ProxyResource -from ._models_py3 import PublicIPAddressSku -from ._models_py3 import PurchasePlan -from ._models_py3 import RecoveryWalkResponse -from ._models_py3 import RequestRateByIntervalInput -from ._models_py3 import Resource -from ._models_py3 import ResourceWithOptionalLocation -from ._models_py3 import RestorePoint -from ._models_py3 import RestorePointCollection -from ._models_py3 import RestorePointCollectionListResult -from ._models_py3 import RestorePointCollectionSourceProperties -from ._models_py3 import RestorePointCollectionUpdate -from ._models_py3 import RestorePointInstanceView -from ._models_py3 import RestorePointSourceMetadata -from ._models_py3 import RestorePointSourceVMDataDisk -from ._models_py3 import RestorePointSourceVMOSDisk -from ._models_py3 import RestorePointSourceVMStorageProfile -from ._models_py3 import RetrieveBootDiagnosticsDataResult -from ._models_py3 import RollbackStatusInfo -from ._models_py3 import RollingUpgradePolicy -from ._models_py3 import RollingUpgradeProgressInfo -from ._models_py3 import RollingUpgradeRunningStatus -from ._models_py3 import RollingUpgradeStatusInfo -from ._models_py3 import RunCommandDocument -from ._models_py3 import RunCommandDocumentBase -from ._models_py3 import RunCommandInput -from ._models_py3 import RunCommandInputParameter -from ._models_py3 import RunCommandListResult -from ._models_py3 import RunCommandParameterDefinition -from ._models_py3 import RunCommandResult -from ._models_py3 import ScaleInPolicy -from ._models_py3 import ScheduledEventsProfile -from ._models_py3 import SecurityProfile -from ._models_py3 import Sku -from ._models_py3 import SpotRestorePolicy -from ._models_py3 import SshConfiguration -from ._models_py3 import SshPublicKey -from ._models_py3 import SshPublicKeyGenerateKeyPairResult -from ._models_py3 import SshPublicKeyResource -from ._models_py3 import SshPublicKeyUpdateResource -from ._models_py3 import SshPublicKeysGroupListResult -from ._models_py3 import StorageProfile -from ._models_py3 import SubResource -from ._models_py3 import SubResourceReadOnly -from ._models_py3 import SubResourceWithColocationStatus -from ._models_py3 import TerminateNotificationProfile -from ._models_py3 import ThrottledRequestsInput -from ._models_py3 import UefiSettings -from ._models_py3 import UpdateResource -from ._models_py3 import UpgradeOperationHistoricalStatusInfo -from ._models_py3 import UpgradeOperationHistoricalStatusInfoProperties -from ._models_py3 import UpgradeOperationHistoryStatus -from ._models_py3 import UpgradePolicy -from ._models_py3 import Usage -from ._models_py3 import UsageName -from ._models_py3 import UserAssignedIdentitiesValue -from ._models_py3 import VMDiskSecurityProfile -from ._models_py3 import VMGalleryApplication -from ._models_py3 import VMScaleSetConvertToSinglePlacementGroupInput -from ._models_py3 import VMSizeProperties -from ._models_py3 import VaultCertificate -from ._models_py3 import VaultSecretGroup -from ._models_py3 import VirtualHardDisk -from ._models_py3 import VirtualMachine -from ._models_py3 import VirtualMachineAgentInstanceView -from ._models_py3 import VirtualMachineAssessPatchesResult -from ._models_py3 import VirtualMachineCaptureParameters -from ._models_py3 import VirtualMachineCaptureResult -from ._models_py3 import VirtualMachineExtension -from ._models_py3 import VirtualMachineExtensionHandlerInstanceView -from ._models_py3 import VirtualMachineExtensionImage -from ._models_py3 import VirtualMachineExtensionInstanceView -from ._models_py3 import VirtualMachineExtensionUpdate -from ._models_py3 import VirtualMachineExtensionsListResult -from ._models_py3 import VirtualMachineHealthStatus -from ._models_py3 import VirtualMachineIdentity -from ._models_py3 import VirtualMachineImage -from ._models_py3 import VirtualMachineImageFeature -from ._models_py3 import VirtualMachineImageResource -from ._models_py3 import VirtualMachineInstallPatchesParameters -from ._models_py3 import VirtualMachineInstallPatchesResult -from ._models_py3 import VirtualMachineInstanceView -from ._models_py3 import VirtualMachineIpTag -from ._models_py3 import VirtualMachineListResult -from ._models_py3 import VirtualMachineNetworkInterfaceConfiguration -from ._models_py3 import VirtualMachineNetworkInterfaceDnsSettingsConfiguration -from ._models_py3 import VirtualMachineNetworkInterfaceIPConfiguration -from ._models_py3 import VirtualMachinePatchStatus -from ._models_py3 import VirtualMachinePublicIPAddressConfiguration -from ._models_py3 import VirtualMachinePublicIPAddressDnsSettingsConfiguration -from ._models_py3 import VirtualMachineReimageParameters -from ._models_py3 import VirtualMachineRunCommand -from ._models_py3 import VirtualMachineRunCommandInstanceView -from ._models_py3 import VirtualMachineRunCommandScriptSource -from ._models_py3 import VirtualMachineRunCommandUpdate -from ._models_py3 import VirtualMachineRunCommandsListResult -from ._models_py3 import VirtualMachineScaleSet -from ._models_py3 import VirtualMachineScaleSetDataDisk -from ._models_py3 import VirtualMachineScaleSetExtension -from ._models_py3 import VirtualMachineScaleSetExtensionListResult -from ._models_py3 import VirtualMachineScaleSetExtensionProfile -from ._models_py3 import VirtualMachineScaleSetExtensionUpdate -from ._models_py3 import VirtualMachineScaleSetHardwareProfile -from ._models_py3 import VirtualMachineScaleSetIPConfiguration -from ._models_py3 import VirtualMachineScaleSetIdentity -from ._models_py3 import VirtualMachineScaleSetInstanceView -from ._models_py3 import VirtualMachineScaleSetInstanceViewStatusesSummary -from ._models_py3 import VirtualMachineScaleSetIpTag -from ._models_py3 import VirtualMachineScaleSetListOSUpgradeHistory -from ._models_py3 import VirtualMachineScaleSetListResult -from ._models_py3 import VirtualMachineScaleSetListSkusResult -from ._models_py3 import VirtualMachineScaleSetListWithLinkResult -from ._models_py3 import VirtualMachineScaleSetManagedDiskParameters -from ._models_py3 import VirtualMachineScaleSetNetworkConfiguration -from ._models_py3 import VirtualMachineScaleSetNetworkConfigurationDnsSettings -from ._models_py3 import VirtualMachineScaleSetNetworkProfile -from ._models_py3 import VirtualMachineScaleSetOSDisk -from ._models_py3 import VirtualMachineScaleSetOSProfile -from ._models_py3 import VirtualMachineScaleSetPublicIPAddressConfiguration -from ._models_py3 import VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings -from ._models_py3 import VirtualMachineScaleSetReimageParameters -from ._models_py3 import VirtualMachineScaleSetSku -from ._models_py3 import VirtualMachineScaleSetSkuCapacity -from ._models_py3 import VirtualMachineScaleSetStorageProfile -from ._models_py3 import VirtualMachineScaleSetUpdate -from ._models_py3 import VirtualMachineScaleSetUpdateIPConfiguration -from ._models_py3 import VirtualMachineScaleSetUpdateNetworkConfiguration -from ._models_py3 import VirtualMachineScaleSetUpdateNetworkProfile -from ._models_py3 import VirtualMachineScaleSetUpdateOSDisk -from ._models_py3 import VirtualMachineScaleSetUpdateOSProfile -from ._models_py3 import VirtualMachineScaleSetUpdatePublicIPAddressConfiguration -from ._models_py3 import VirtualMachineScaleSetUpdateStorageProfile -from ._models_py3 import VirtualMachineScaleSetUpdateVMProfile -from ._models_py3 import VirtualMachineScaleSetVM -from ._models_py3 import VirtualMachineScaleSetVMExtension -from ._models_py3 import VirtualMachineScaleSetVMExtensionUpdate -from ._models_py3 import VirtualMachineScaleSetVMExtensionsListResult -from ._models_py3 import VirtualMachineScaleSetVMExtensionsSummary -from ._models_py3 import VirtualMachineScaleSetVMInstanceIDs -from ._models_py3 import VirtualMachineScaleSetVMInstanceRequiredIDs -from ._models_py3 import VirtualMachineScaleSetVMInstanceView -from ._models_py3 import VirtualMachineScaleSetVMListResult -from ._models_py3 import VirtualMachineScaleSetVMNetworkProfileConfiguration -from ._models_py3 import VirtualMachineScaleSetVMProfile -from ._models_py3 import VirtualMachineScaleSetVMProtectionPolicy -from ._models_py3 import VirtualMachineScaleSetVMReimageParameters -from ._models_py3 import VirtualMachineSize -from ._models_py3 import VirtualMachineSizeListResult -from ._models_py3 import VirtualMachineSoftwarePatchProperties -from ._models_py3 import VirtualMachineStatusCodeCount -from ._models_py3 import VirtualMachineUpdate -from ._models_py3 import VmImagesInEdgeZoneListResult -from ._models_py3 import WinRMConfiguration -from ._models_py3 import WinRMListener -from ._models_py3 import WindowsConfiguration -from ._models_py3 import WindowsParameters -from ._models_py3 import WindowsVMGuestPatchAutomaticByPlatformSettings +from typing import TYPE_CHECKING -from ._compute_management_client_enums import ArchitectureTypes -from ._compute_management_client_enums import AvailabilitySetSkuTypes -from ._compute_management_client_enums import CachingTypes -from ._compute_management_client_enums import CapacityReservationGroupInstanceViewTypes -from ._compute_management_client_enums import CapacityReservationInstanceViewTypes -from ._compute_management_client_enums import ConsistencyModeTypes -from ._compute_management_client_enums import DedicatedHostLicenseTypes -from ._compute_management_client_enums import DeleteOptions -from ._compute_management_client_enums import DiffDiskOptions -from ._compute_management_client_enums import DiffDiskPlacement -from ._compute_management_client_enums import DiskCreateOptionTypes -from ._compute_management_client_enums import DiskDeleteOptionTypes -from ._compute_management_client_enums import DiskDetachOptionTypes -from ._compute_management_client_enums import ExecutionState -from ._compute_management_client_enums import ExpandTypesForGetCapacityReservationGroups -from ._compute_management_client_enums import ExpandTypesForGetVMScaleSets -from ._compute_management_client_enums import ExtendedLocationTypes -from ._compute_management_client_enums import HyperVGenerationType -from ._compute_management_client_enums import HyperVGenerationTypes -from ._compute_management_client_enums import IPVersion -from ._compute_management_client_enums import IPVersions -from ._compute_management_client_enums import InstanceViewTypes -from ._compute_management_client_enums import IntervalInMins -from ._compute_management_client_enums import LinuxPatchAssessmentMode -from ._compute_management_client_enums import LinuxVMGuestPatchAutomaticByPlatformRebootSetting -from ._compute_management_client_enums import LinuxVMGuestPatchMode -from ._compute_management_client_enums import MaintenanceOperationResultCodeTypes -from ._compute_management_client_enums import NetworkApiVersion -from ._compute_management_client_enums import OperatingSystemStateTypes -from ._compute_management_client_enums import OperatingSystemType -from ._compute_management_client_enums import OperatingSystemTypes -from ._compute_management_client_enums import OrchestrationMode -from ._compute_management_client_enums import OrchestrationServiceNames -from ._compute_management_client_enums import OrchestrationServiceState -from ._compute_management_client_enums import OrchestrationServiceStateAction -from ._compute_management_client_enums import PatchAssessmentState -from ._compute_management_client_enums import PatchInstallationState -from ._compute_management_client_enums import PatchOperationStatus -from ._compute_management_client_enums import ProtocolTypes -from ._compute_management_client_enums import ProximityPlacementGroupType -from ._compute_management_client_enums import PublicIPAddressSkuName -from ._compute_management_client_enums import PublicIPAddressSkuTier -from ._compute_management_client_enums import PublicIPAllocationMethod -from ._compute_management_client_enums import RepairAction -from ._compute_management_client_enums import ResourceIdentityType -from ._compute_management_client_enums import RestorePointCollectionExpandOptions -from ._compute_management_client_enums import RestorePointExpandOptions -from ._compute_management_client_enums import RollingUpgradeActionType -from ._compute_management_client_enums import RollingUpgradeStatusCode -from ._compute_management_client_enums import SecurityEncryptionTypes -from ._compute_management_client_enums import SecurityTypes -from ._compute_management_client_enums import SettingNames -from ._compute_management_client_enums import StatusLevelTypes -from ._compute_management_client_enums import StorageAccountTypes -from ._compute_management_client_enums import UpgradeMode -from ._compute_management_client_enums import UpgradeOperationInvoker -from ._compute_management_client_enums import UpgradeState -from ._compute_management_client_enums import VMGuestPatchClassificationLinux -from ._compute_management_client_enums import VMGuestPatchClassificationWindows -from ._compute_management_client_enums import VMGuestPatchRebootBehavior -from ._compute_management_client_enums import VMGuestPatchRebootSetting -from ._compute_management_client_enums import VMGuestPatchRebootStatus -from ._compute_management_client_enums import VirtualMachineEvictionPolicyTypes -from ._compute_management_client_enums import VirtualMachinePriorityTypes -from ._compute_management_client_enums import VirtualMachineScaleSetScaleInRules -from ._compute_management_client_enums import VirtualMachineScaleSetSkuScaleType -from ._compute_management_client_enums import VirtualMachineSizeTypes -from ._compute_management_client_enums import VmDiskTypes -from ._compute_management_client_enums import WindowsPatchAssessmentMode -from ._compute_management_client_enums import WindowsVMGuestPatchAutomaticByPlatformRebootSetting -from ._compute_management_client_enums import WindowsVMGuestPatchMode +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + + +from ._models_py3 import ( # type: ignore + AdditionalCapabilities, + AdditionalUnattendContent, + ApiEntityReference, + ApiError, + ApiErrorBase, + ApplicationProfile, + AutomaticOSUpgradePolicy, + AutomaticOSUpgradeProperties, + AutomaticRepairsPolicy, + AvailabilitySet, + AvailabilitySetListResult, + AvailabilitySetUpdate, + AvailablePatchSummary, + BillingProfile, + BootDiagnostics, + BootDiagnosticsInstanceView, + CapacityReservation, + CapacityReservationGroup, + CapacityReservationGroupInstanceView, + CapacityReservationGroupListResult, + CapacityReservationGroupUpdate, + CapacityReservationInstanceView, + CapacityReservationInstanceViewWithName, + CapacityReservationListResult, + CapacityReservationProfile, + CapacityReservationUpdate, + CapacityReservationUtilization, + ComputeOperationListResult, + ComputeOperationValue, + DataDisk, + DataDiskImage, + DedicatedHost, + DedicatedHostAllocatableVM, + DedicatedHostAvailableCapacity, + DedicatedHostGroup, + DedicatedHostGroupInstanceView, + DedicatedHostGroupListResult, + DedicatedHostGroupPropertiesAdditionalCapabilities, + DedicatedHostGroupUpdate, + DedicatedHostInstanceView, + DedicatedHostInstanceViewWithName, + DedicatedHostListResult, + DedicatedHostUpdate, + DiagnosticsProfile, + DiffDiskSettings, + DisallowedConfiguration, + DiskEncryptionSetParameters, + DiskEncryptionSettings, + DiskInstanceView, + DiskRestorePointInstanceView, + DiskRestorePointReplicationStatus, + ExtendedLocation, + HardwareProfile, + Image, + ImageDataDisk, + ImageDisk, + ImageListResult, + ImageOSDisk, + ImageReference, + ImageStorageProfile, + ImageUpdate, + InnerError, + InstanceViewStatus, + KeyVaultKeyReference, + KeyVaultSecretReference, + LastPatchInstallationSummary, + LinuxConfiguration, + LinuxParameters, + LinuxPatchSettings, + LinuxVMGuestPatchAutomaticByPlatformSettings, + ListUsagesResult, + LogAnalyticsInputBase, + LogAnalyticsOperationResult, + LogAnalyticsOutput, + MaintenanceRedeployStatus, + ManagedDiskParameters, + NetworkInterfaceReference, + NetworkProfile, + OSDisk, + OSDiskImage, + OSProfile, + OrchestrationServiceStateInput, + OrchestrationServiceSummary, + PatchInstallationDetail, + PatchSettings, + Plan, + ProximityPlacementGroup, + ProximityPlacementGroupListResult, + ProximityPlacementGroupPropertiesIntent, + ProximityPlacementGroupUpdate, + ProxyResource, + PublicIPAddressSku, + PurchasePlan, + RecoveryWalkResponse, + RequestRateByIntervalInput, + Resource, + ResourceWithOptionalLocation, + RestorePoint, + RestorePointCollection, + RestorePointCollectionListResult, + RestorePointCollectionSourceProperties, + RestorePointCollectionUpdate, + RestorePointInstanceView, + RestorePointSourceMetadata, + RestorePointSourceVMDataDisk, + RestorePointSourceVMOSDisk, + RestorePointSourceVMStorageProfile, + RetrieveBootDiagnosticsDataResult, + RollbackStatusInfo, + RollingUpgradePolicy, + RollingUpgradeProgressInfo, + RollingUpgradeRunningStatus, + RollingUpgradeStatusInfo, + RunCommandDocument, + RunCommandDocumentBase, + RunCommandInput, + RunCommandInputParameter, + RunCommandListResult, + RunCommandParameterDefinition, + RunCommandResult, + ScaleInPolicy, + ScheduledEventsProfile, + SecurityProfile, + Sku, + SpotRestorePolicy, + SshConfiguration, + SshPublicKey, + SshPublicKeyGenerateKeyPairResult, + SshPublicKeyResource, + SshPublicKeyUpdateResource, + SshPublicKeysGroupListResult, + StorageProfile, + SubResource, + SubResourceReadOnly, + SubResourceWithColocationStatus, + TerminateNotificationProfile, + ThrottledRequestsInput, + UefiSettings, + UpdateResource, + UpgradeOperationHistoricalStatusInfo, + UpgradeOperationHistoricalStatusInfoProperties, + UpgradeOperationHistoryStatus, + UpgradePolicy, + Usage, + UsageName, + UserAssignedIdentitiesValue, + VMDiskSecurityProfile, + VMGalleryApplication, + VMScaleSetConvertToSinglePlacementGroupInput, + VMSizeProperties, + VaultCertificate, + VaultSecretGroup, + VirtualHardDisk, + VirtualMachine, + VirtualMachineAgentInstanceView, + VirtualMachineAssessPatchesResult, + VirtualMachineCaptureParameters, + VirtualMachineCaptureResult, + VirtualMachineExtension, + VirtualMachineExtensionHandlerInstanceView, + VirtualMachineExtensionImage, + VirtualMachineExtensionInstanceView, + VirtualMachineExtensionUpdate, + VirtualMachineExtensionsListResult, + VirtualMachineHealthStatus, + VirtualMachineIdentity, + VirtualMachineImage, + VirtualMachineImageFeature, + VirtualMachineImageResource, + VirtualMachineInstallPatchesParameters, + VirtualMachineInstallPatchesResult, + VirtualMachineInstanceView, + VirtualMachineIpTag, + VirtualMachineListResult, + VirtualMachineNetworkInterfaceConfiguration, + VirtualMachineNetworkInterfaceDnsSettingsConfiguration, + VirtualMachineNetworkInterfaceIPConfiguration, + VirtualMachinePatchStatus, + VirtualMachinePublicIPAddressConfiguration, + VirtualMachinePublicIPAddressDnsSettingsConfiguration, + VirtualMachineReimageParameters, + VirtualMachineRunCommand, + VirtualMachineRunCommandInstanceView, + VirtualMachineRunCommandScriptSource, + VirtualMachineRunCommandUpdate, + VirtualMachineRunCommandsListResult, + VirtualMachineScaleSet, + VirtualMachineScaleSetDataDisk, + VirtualMachineScaleSetExtension, + VirtualMachineScaleSetExtensionListResult, + VirtualMachineScaleSetExtensionProfile, + VirtualMachineScaleSetExtensionUpdate, + VirtualMachineScaleSetHardwareProfile, + VirtualMachineScaleSetIPConfiguration, + VirtualMachineScaleSetIdentity, + VirtualMachineScaleSetInstanceView, + VirtualMachineScaleSetInstanceViewStatusesSummary, + VirtualMachineScaleSetIpTag, + VirtualMachineScaleSetListOSUpgradeHistory, + VirtualMachineScaleSetListResult, + VirtualMachineScaleSetListSkusResult, + VirtualMachineScaleSetListWithLinkResult, + VirtualMachineScaleSetManagedDiskParameters, + VirtualMachineScaleSetNetworkConfiguration, + VirtualMachineScaleSetNetworkConfigurationDnsSettings, + VirtualMachineScaleSetNetworkProfile, + VirtualMachineScaleSetOSDisk, + VirtualMachineScaleSetOSProfile, + VirtualMachineScaleSetPublicIPAddressConfiguration, + VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings, + VirtualMachineScaleSetReimageParameters, + VirtualMachineScaleSetSku, + VirtualMachineScaleSetSkuCapacity, + VirtualMachineScaleSetStorageProfile, + VirtualMachineScaleSetUpdate, + VirtualMachineScaleSetUpdateIPConfiguration, + VirtualMachineScaleSetUpdateNetworkConfiguration, + VirtualMachineScaleSetUpdateNetworkProfile, + VirtualMachineScaleSetUpdateOSDisk, + VirtualMachineScaleSetUpdateOSProfile, + VirtualMachineScaleSetUpdatePublicIPAddressConfiguration, + VirtualMachineScaleSetUpdateStorageProfile, + VirtualMachineScaleSetUpdateVMProfile, + VirtualMachineScaleSetVM, + VirtualMachineScaleSetVMExtension, + VirtualMachineScaleSetVMExtensionUpdate, + VirtualMachineScaleSetVMExtensionsListResult, + VirtualMachineScaleSetVMExtensionsSummary, + VirtualMachineScaleSetVMInstanceIDs, + VirtualMachineScaleSetVMInstanceRequiredIDs, + VirtualMachineScaleSetVMInstanceView, + VirtualMachineScaleSetVMListResult, + VirtualMachineScaleSetVMNetworkProfileConfiguration, + VirtualMachineScaleSetVMProfile, + VirtualMachineScaleSetVMProtectionPolicy, + VirtualMachineScaleSetVMReimageParameters, + VirtualMachineSize, + VirtualMachineSizeListResult, + VirtualMachineSoftwarePatchProperties, + VirtualMachineStatusCodeCount, + VirtualMachineUpdate, + VmImagesInEdgeZoneListResult, + WinRMConfiguration, + WinRMListener, + WindowsConfiguration, + WindowsParameters, + WindowsVMGuestPatchAutomaticByPlatformSettings, +) + +from ._compute_management_client_enums import ( # type: ignore + ArchitectureTypes, + AvailabilitySetSkuTypes, + CachingTypes, + CapacityReservationGroupInstanceViewTypes, + CapacityReservationInstanceViewTypes, + ConsistencyModeTypes, + DedicatedHostLicenseTypes, + DeleteOptions, + DiffDiskOptions, + DiffDiskPlacement, + DiskCreateOptionTypes, + DiskDeleteOptionTypes, + DiskDetachOptionTypes, + ExecutionState, + ExpandTypesForGetCapacityReservationGroups, + ExpandTypesForGetVMScaleSets, + ExtendedLocationTypes, + HyperVGenerationType, + HyperVGenerationTypes, + IPVersion, + IPVersions, + InstanceViewTypes, + IntervalInMins, + LinuxPatchAssessmentMode, + LinuxVMGuestPatchAutomaticByPlatformRebootSetting, + LinuxVMGuestPatchMode, + MaintenanceOperationResultCodeTypes, + NetworkApiVersion, + OperatingSystemStateTypes, + OperatingSystemType, + OperatingSystemTypes, + OrchestrationMode, + OrchestrationServiceNames, + OrchestrationServiceState, + OrchestrationServiceStateAction, + PatchAssessmentState, + PatchInstallationState, + PatchOperationStatus, + ProtocolTypes, + ProximityPlacementGroupType, + PublicIPAddressSkuName, + PublicIPAddressSkuTier, + PublicIPAllocationMethod, + RepairAction, + ResourceIdentityType, + RestorePointCollectionExpandOptions, + RestorePointExpandOptions, + RollingUpgradeActionType, + RollingUpgradeStatusCode, + SecurityEncryptionTypes, + SecurityTypes, + SettingNames, + StatusLevelTypes, + StorageAccountTypes, + UpgradeMode, + UpgradeOperationInvoker, + UpgradeState, + VMGuestPatchClassificationLinux, + VMGuestPatchClassificationWindows, + VMGuestPatchRebootBehavior, + VMGuestPatchRebootSetting, + VMGuestPatchRebootStatus, + VirtualMachineEvictionPolicyTypes, + VirtualMachinePriorityTypes, + VirtualMachineScaleSetScaleInRules, + VirtualMachineScaleSetSkuScaleType, + VirtualMachineSizeTypes, + VmDiskTypes, + WindowsPatchAssessmentMode, + WindowsVMGuestPatchAutomaticByPlatformRebootSetting, + WindowsVMGuestPatchMode, +) 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__ = [ @@ -649,5 +660,5 @@ "WindowsVMGuestPatchAutomaticByPlatformRebootSetting", "WindowsVMGuestPatchMode", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_01/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_01/models/_models_py3.py index 3b10872576d15..c18f7a895635c 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_01/models/_models_py3.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_01/models/_models_py3.py @@ -1,5 +1,5 @@ -# 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. @@ -16,10 +16,9 @@ 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 if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object @@ -439,7 +438,7 @@ def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kw self.tags = tags -class AvailabilitySet(Resource): # pylint: disable=too-many-instance-attributes +class AvailabilitySet(Resource): """Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see `Availability sets @@ -859,7 +858,7 @@ def __init__(self, **kwargs: Any) -> None: self.status = None -class CapacityReservation(Resource): # pylint: disable=too-many-instance-attributes +class CapacityReservation(Resource): """Specifies information about the capacity reservation. Variables are only populated by the server, and will be ignored when sending a request. @@ -1474,7 +1473,7 @@ def __init__(self, **kwargs: Any) -> None: self.provider = None -class DataDisk(_serialization.Model): # pylint: disable=too-many-instance-attributes +class DataDisk(_serialization.Model): """Describes a data disk. Variables are only populated by the server, and will be ignored when sending a request. @@ -1685,7 +1684,7 @@ def __init__(self, **kwargs: Any) -> None: self.lun = None -class DedicatedHost(Resource): # pylint: disable=too-many-instance-attributes +class DedicatedHost(Resource): """Specifies information about the Dedicated host. Variables are only populated by the server, and will be ignored when sending a request. @@ -1865,7 +1864,7 @@ def __init__( self.allocatable_v_ms = allocatable_v_ms -class DedicatedHostGroup(Resource): # pylint: disable=too-many-instance-attributes +class DedicatedHostGroup(Resource): """Specifies information about the dedicated host group that the dedicated hosts should be assigned to. :code:`
`:code:`
` Currently, a dedicated host can only be added to a dedicated host group at creation time. An existing dedicated host cannot be added to another @@ -3642,7 +3641,7 @@ def __init__(self, *, secret_url: str, source_vault: "_models.SubResource", **kw self.source_vault = source_vault -class LastPatchInstallationSummary(_serialization.Model): # pylint: disable=too-many-instance-attributes +class LastPatchInstallationSummary(_serialization.Model): """Describes the properties of the last installed patch summary. Variables are only populated by the server, and will be ignored when sending a request. @@ -4401,7 +4400,7 @@ def __init__(self, **kwargs: Any) -> None: self.service_state = None -class OSDisk(_serialization.Model): # pylint: disable=too-many-instance-attributes +class OSDisk(_serialization.Model): """Specifies information about the operating system disk used by the virtual machine. :code:`
`:code:`
` For more information about disks, see `About disks and VHDs for Azure virtual machines `_. @@ -4962,7 +4961,7 @@ def __init__( self.promotion_code = promotion_code -class ProximityPlacementGroup(Resource): # pylint: disable=too-many-instance-attributes +class ProximityPlacementGroup(Resource): """Specifies information about the proximity placement group. Variables are only populated by the server, and will be ignored when sending a request. @@ -7654,7 +7653,7 @@ def __init__(self, *, uri: Optional[str] = None, **kwargs: Any) -> None: self.uri = uri -class VirtualMachine(Resource): # pylint: disable=too-many-instance-attributes +class VirtualMachine(Resource): """Describes a Virtual Machine. Variables are only populated by the server, and will be ignored when sending a request. @@ -8236,7 +8235,7 @@ def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylin self.resources = None -class VirtualMachineExtension(ResourceWithOptionalLocation): # pylint: disable=too-many-instance-attributes +class VirtualMachineExtension(ResourceWithOptionalLocation): """Describes a Virtual Machine Extension. Variables are only populated by the server, and will be ignored when sending a request. @@ -8593,7 +8592,7 @@ def __init__(self, *, value: Optional[List["_models.VirtualMachineExtension"]] = self.value = value -class VirtualMachineExtensionUpdate(UpdateResource): # pylint: disable=too-many-instance-attributes +class VirtualMachineExtensionUpdate(UpdateResource): """Describes a Virtual Machine Extension. :ivar tags: Resource tags. @@ -8855,7 +8854,7 @@ def __init__( self.extended_location = extended_location -class VirtualMachineImage(VirtualMachineImageResource): # pylint: disable=too-many-instance-attributes +class VirtualMachineImage(VirtualMachineImageResource): """Describes a Virtual Machine Image. All required parameters must be populated in order to send to server. @@ -9071,7 +9070,7 @@ def __init__( self.linux_parameters = linux_parameters -class VirtualMachineInstallPatchesResult(_serialization.Model): # pylint: disable=too-many-instance-attributes +class VirtualMachineInstallPatchesResult(_serialization.Model): """The result summary of an installation operation. Variables are only populated by the server, and will be ignored when sending a request. @@ -9161,7 +9160,7 @@ def __init__(self, **kwargs: Any) -> None: self.error = None -class VirtualMachineInstanceView(_serialization.Model): # pylint: disable=too-many-instance-attributes +class VirtualMachineInstanceView(_serialization.Model): """The instance view of a virtual machine. Variables are only populated by the server, and will be ignored when sending a request. @@ -9825,7 +9824,7 @@ def __init__(self, *, temp_disk: Optional[bool] = None, **kwargs: Any) -> None: self.temp_disk = temp_disk -class VirtualMachineRunCommand(Resource): # pylint: disable=too-many-instance-attributes +class VirtualMachineRunCommand(Resource): """Describes a Virtual Machine run command. Variables are only populated by the server, and will be ignored when sending a request. @@ -10108,7 +10107,7 @@ def __init__( self.next_link = next_link -class VirtualMachineRunCommandUpdate(UpdateResource): # pylint: disable=too-many-instance-attributes +class VirtualMachineRunCommandUpdate(UpdateResource): """Describes a Virtual Machine run command. Variables are only populated by the server, and will be ignored when sending a request. @@ -10221,7 +10220,7 @@ def __init__( self.instance_view = None -class VirtualMachineScaleSet(Resource): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSet(Resource): """Describes a Virtual Machine Scale Set. Variables are only populated by the server, and will be ignored when sending a request. @@ -10609,7 +10608,7 @@ def __init__( self.delete_option = delete_option -class VirtualMachineScaleSetExtension(SubResourceReadOnly): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetExtension(SubResourceReadOnly): """Describes a Virtual Machine Scale Set Extension. Variables are only populated by the server, and will be ignored when sending a request. @@ -10831,7 +10830,7 @@ def __init__( self.extensions_time_budget = extensions_time_budget -class VirtualMachineScaleSetExtensionUpdate(SubResourceReadOnly): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetExtensionUpdate(SubResourceReadOnly): """Describes a Virtual Machine Scale Set Extension. Variables are only populated by the server, and will be ignored when sending a request. @@ -11667,7 +11666,7 @@ def __init__( self.network_api_version = network_api_version -class VirtualMachineScaleSetOSDisk(_serialization.Model): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetOSDisk(_serialization.Model): """Describes a virtual machine scale set operating system disk. All required parameters must be populated in order to send to server. @@ -12261,7 +12260,7 @@ def __init__( self.data_disks = data_disks -class VirtualMachineScaleSetUpdate(UpdateResource): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetUpdate(UpdateResource): """Describes a Virtual Machine Scale Set. :ivar tags: Resource tags. @@ -13019,7 +13018,7 @@ def __init__( self.user_data = user_data -class VirtualMachineScaleSetVM(Resource): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetVM(Resource): """Describes a virtual machine scale set virtual machine. Variables are only populated by the server, and will be ignored when sending a request. @@ -13279,7 +13278,7 @@ def __init__( # pylint: disable=too-many-locals self.user_data = user_data -class VirtualMachineScaleSetVMExtension(SubResourceReadOnly): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetVMExtension(SubResourceReadOnly): """Describes a VMSS VM Extension. Variables are only populated by the server, and will be ignored when sending a request. @@ -13475,7 +13474,7 @@ def __init__(self, **kwargs: Any) -> None: self.statuses_summary = None -class VirtualMachineScaleSetVMExtensionUpdate(SubResourceReadOnly): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetVMExtensionUpdate(SubResourceReadOnly): """Describes a VMSS VM Extension. Variables are only populated by the server, and will be ignored when sending a request. @@ -13655,7 +13654,7 @@ def __init__(self, *, instance_ids: List[str], **kwargs: Any) -> None: self.instance_ids = instance_ids -class VirtualMachineScaleSetVMInstanceView(_serialization.Model): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetVMInstanceView(_serialization.Model): """The instance view of a virtual machine scale set VM. Variables are only populated by the server, and will be ignored when sending a request. @@ -13839,7 +13838,7 @@ def __init__( self.network_interface_configurations = network_interface_configurations -class VirtualMachineScaleSetVMProfile(_serialization.Model): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetVMProfile(_serialization.Model): """Describes a virtual machine scale set virtual machine profile. :ivar os_profile: Specifies the operating system settings for the virtual machines in the scale @@ -14258,7 +14257,7 @@ def __init__(self, **kwargs: Any) -> None: self.count = None -class VirtualMachineUpdate(UpdateResource): # pylint: disable=too-many-instance-attributes +class VirtualMachineUpdate(UpdateResource): """Describes a Virtual Machine Update. Variables are only populated by the server, and will be ignored when sending a request. diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_01/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_01/operations/__init__.py index 3cc8e8e7a73a8..5cc9a11e23416 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_01/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_01/operations/__init__.py @@ -5,36 +5,42 @@ # Code generated by Microsoft (R) AutoRest 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 UsageOperations -from ._operations import VirtualMachineSizesOperations -from ._operations import VirtualMachineScaleSetsOperations -from ._operations import VirtualMachineScaleSetExtensionsOperations -from ._operations import VirtualMachineScaleSetRollingUpgradesOperations -from ._operations import VirtualMachineScaleSetVMExtensionsOperations -from ._operations import VirtualMachineScaleSetVMsOperations -from ._operations import VirtualMachineExtensionsOperations -from ._operations import VirtualMachinesOperations -from ._operations import VirtualMachineImagesOperations -from ._operations import VirtualMachineImagesEdgeZoneOperations -from ._operations import VirtualMachineExtensionImagesOperations -from ._operations import AvailabilitySetsOperations -from ._operations import ProximityPlacementGroupsOperations -from ._operations import DedicatedHostGroupsOperations -from ._operations import DedicatedHostsOperations -from ._operations import SshPublicKeysOperations -from ._operations import ImagesOperations -from ._operations import RestorePointCollectionsOperations -from ._operations import RestorePointsOperations -from ._operations import CapacityReservationGroupsOperations -from ._operations import CapacityReservationsOperations -from ._operations import LogAnalyticsOperations -from ._operations import VirtualMachineRunCommandsOperations -from ._operations import VirtualMachineScaleSetVMRunCommandsOperations +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 UsageOperations # type: ignore +from ._operations import VirtualMachineSizesOperations # type: ignore +from ._operations import VirtualMachineScaleSetsOperations # type: ignore +from ._operations import VirtualMachineScaleSetExtensionsOperations # type: ignore +from ._operations import VirtualMachineScaleSetRollingUpgradesOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMExtensionsOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMsOperations # type: ignore +from ._operations import VirtualMachineExtensionsOperations # type: ignore +from ._operations import VirtualMachinesOperations # type: ignore +from ._operations import VirtualMachineImagesOperations # type: ignore +from ._operations import VirtualMachineImagesEdgeZoneOperations # type: ignore +from ._operations import VirtualMachineExtensionImagesOperations # type: ignore +from ._operations import AvailabilitySetsOperations # type: ignore +from ._operations import ProximityPlacementGroupsOperations # type: ignore +from ._operations import DedicatedHostGroupsOperations # type: ignore +from ._operations import DedicatedHostsOperations # type: ignore +from ._operations import SshPublicKeysOperations # type: ignore +from ._operations import ImagesOperations # type: ignore +from ._operations import RestorePointCollectionsOperations # type: ignore +from ._operations import RestorePointsOperations # type: ignore +from ._operations import CapacityReservationGroupsOperations # type: ignore +from ._operations import CapacityReservationsOperations # type: ignore +from ._operations import LogAnalyticsOperations # type: ignore +from ._operations import VirtualMachineRunCommandsOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMRunCommandsOperations # 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__ = [ @@ -65,5 +71,5 @@ "VirtualMachineRunCommandsOperations", "VirtualMachineScaleSetVMRunCommandsOperations", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_01/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_01/operations/_operations.py index d85a850bd6727..e187c569a3041 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_01/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_01/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. @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Iterable, Iterator, List, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Iterable, Iterator, List, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -36,7 +36,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, HttpResponse], T, Dict[str, Any]], Any]] @@ -5967,7 +5967,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.ComputeOperationValue"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.ComputeOperationListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6064,7 +6064,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.Usage"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.ListUsagesResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6163,7 +6163,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.VirtualMachine api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6264,7 +6264,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> Iterable["_models.Vi api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6332,7 +6332,7 @@ def _create_or_update_initial( parameters: Union[_models.VirtualMachineScaleSet, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6524,7 +6524,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineScaleSetUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6713,7 +6713,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, *, force_deletion: Optional[bool] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6842,7 +6842,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_03_01.models.VirtualMachineScaleSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6892,7 +6892,7 @@ def _deallocate_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7089,7 +7089,7 @@ def _delete_instances_initial( force_deletion: Optional[bool] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7297,7 +7297,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2022_03_01.models.VirtualMachineScaleSetInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7357,7 +7357,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Vir api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7436,7 +7436,7 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.VirtualMachineScaleSet"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.VirtualMachineScaleSetListWithLinkResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7519,7 +7519,7 @@ def list_skus( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.VirtualMachineScaleSetListSkusResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7603,7 +7603,7 @@ def get_os_upgrade_history( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.VirtualMachineScaleSetListOSUpgradeHistory] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7674,7 +7674,7 @@ def _power_off_initial( skip_shutdown: bool = False, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7887,7 +7887,7 @@ def _restart_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8076,7 +8076,7 @@ def _start_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8265,7 +8265,7 @@ def _redeploy_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8457,7 +8457,7 @@ def _perform_maintenance_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8655,7 +8655,7 @@ def _update_instances_initial( vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8841,7 +8841,7 @@ def _reimage_initial( vm_scale_set_reimage_input: Optional[Union[_models.VirtualMachineScaleSetReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9034,7 +9034,7 @@ def _reimage_all_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9250,7 +9250,7 @@ def force_recovery_service_fabric_platform_update_domain_walk( # pylint: disabl :rtype: ~azure.mgmt.compute.v2022_03_01.models.RecoveryWalkResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9296,7 +9296,7 @@ def force_recovery_service_fabric_platform_update_domain_walk( # pylint: disabl return deserialized # type: ignore @overload - def convert_to_single_placement_group( # pylint: disable=inconsistent-return-statements + def convert_to_single_placement_group( self, resource_group_name: str, vm_scale_set_name: str, @@ -9324,7 +9324,7 @@ def convert_to_single_placement_group( # pylint: disable=inconsistent-return-st """ @overload - def convert_to_single_placement_group( # pylint: disable=inconsistent-return-statements + def convert_to_single_placement_group( self, resource_group_name: str, vm_scale_set_name: str, @@ -9374,7 +9374,7 @@ def convert_to_single_placement_group( # pylint: disable=inconsistent-return-st :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9431,7 +9431,7 @@ def _set_orchestration_service_state_initial( parameters: Union[_models.OrchestrationServiceStateInput, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9639,7 +9639,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtension, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9850,7 +9850,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtensionUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10057,7 +10057,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, vmss_extension_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10187,7 +10187,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_03_01.models.VirtualMachineScaleSetExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10253,7 +10253,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.VirtualMachineScaleSetExtensionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10337,7 +10337,7 @@ def __init__(self, *args, **kwargs): self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") def _cancel_initial(self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10439,7 +10439,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_os_upgrade_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10545,7 +10545,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_extension_upgrade_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10662,7 +10662,7 @@ def get_latest( :rtype: ~azure.mgmt.compute.v2022_03_01.models.RollingUpgradeStatusInfo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10734,7 +10734,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetVMExtension, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10954,7 +10954,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetVMExtensionUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11169,7 +11169,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, vm_extension_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11305,7 +11305,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_03_01.models.VirtualMachineScaleSetVMExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11374,7 +11374,7 @@ def list( :rtype: ~azure.mgmt.compute.v2022_03_01.models.VirtualMachineScaleSetVMExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11451,7 +11451,7 @@ def _reimage_initial( ] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11650,7 +11650,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _reimage_all_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11759,7 +11759,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _deallocate_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11874,7 +11874,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineScaleSetVM, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12084,7 +12084,7 @@ def _delete_initial( force_deletion: Optional[bool] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12226,7 +12226,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_03_01.models.VirtualMachineScaleSetVM :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12286,7 +12286,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2022_03_01.models.VirtualMachineScaleSetVMInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12368,7 +12368,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.VirtualMachineScaleSetVMListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12442,7 +12442,7 @@ def _power_off_initial( skip_shutdown: bool = False, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12564,7 +12564,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _restart_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12672,7 +12672,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12780,7 +12780,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _redeploy_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12914,7 +12914,7 @@ def retrieve_boot_diagnostics_data( :rtype: ~azure.mgmt.compute.v2022_03_01.models.RetrieveBootDiagnosticsDataResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12961,7 +12961,7 @@ def retrieve_boot_diagnostics_data( def _perform_maintenance_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13082,7 +13082,7 @@ def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13129,7 +13129,7 @@ def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13353,7 +13353,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineExtension, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13563,7 +13563,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineExtensionUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13769,7 +13769,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_name: str, vm_extension_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13899,7 +13899,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_03_01.models.VirtualMachineExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13959,7 +13959,7 @@ def list( :rtype: ~azure.mgmt.compute.v2022_03_01.models.VirtualMachineExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14040,7 +14040,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> Iterable["_models.Vi api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14108,7 +14108,7 @@ def _capture_initial( parameters: Union[_models.VirtualMachineCaptureParameters, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14306,7 +14306,7 @@ def _create_or_update_initial( parameters: Union[_models.VirtualMachine, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14498,7 +14498,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14683,7 +14683,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_name: str, *, force_deletion: Optional[bool] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14814,7 +14814,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_03_01.models.VirtualMachine :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14871,7 +14871,7 @@ def instance_view( :rtype: ~azure.mgmt.compute.v2022_03_01.models.VirtualMachineInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14916,7 +14916,7 @@ def instance_view( def _convert_to_managed_disks_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15019,7 +15019,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _deallocate_initial( self, resource_group_name: str, vm_name: str, *, hibernate: Optional[bool] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15145,7 +15145,7 @@ def generalize( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15187,6 +15187,7 @@ def generalize( # pylint: disable=inconsistent-return-statements def list( self, resource_group_name: str, *, filter: Optional[str] = None, **kwargs: Any ) -> Iterable["_models.VirtualMachine"]: + # pylint: disable=line-too-long """Lists all of the virtual machines in the specified resource group. Use the nextLink property in the response to get the next page of virtual machines. @@ -15207,7 +15208,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15273,6 +15274,7 @@ def get_next(next_link=None): def list_all( self, *, status_only: Optional[str] = None, filter: Optional[str] = None, **kwargs: Any ) -> Iterable["_models.VirtualMachine"]: + # pylint: disable=line-too-long """Lists all of the virtual machines in the specified subscription. Use the nextLink property in the response to get the next page of virtual machines. @@ -15294,7 +15296,7 @@ def list_all( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15377,7 +15379,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15442,7 +15444,7 @@ def get_next(next_link=None): def _power_off_initial( self, resource_group_name: str, vm_name: str, *, skip_shutdown: bool = False, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15551,7 +15553,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _reapply_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15651,7 +15653,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _restart_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15751,7 +15753,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _start_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15851,7 +15853,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _redeploy_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15957,7 +15959,7 @@ def _reimage_initial( parameters: Optional[Union[_models.VirtualMachineReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16162,7 +16164,7 @@ def retrieve_boot_diagnostics_data( :rtype: ~azure.mgmt.compute.v2022_03_01.models.RetrieveBootDiagnosticsDataResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16206,7 +16208,7 @@ def retrieve_boot_diagnostics_data( return deserialized # type: ignore def _perform_maintenance_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16319,7 +16321,7 @@ def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16358,7 +16360,7 @@ def simulate_eviction( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore def _assess_patches_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16474,7 +16476,7 @@ def _install_patches_initial( install_patches_input: Union[_models.VirtualMachineInstallPatchesParameters, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16672,7 +16674,7 @@ def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16897,7 +16899,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_03_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16976,7 +16978,7 @@ def list( :rtype: list[~azure.mgmt.compute.v2022_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17037,7 +17039,7 @@ def list_offers( :rtype: list[~azure.mgmt.compute.v2022_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17089,7 +17091,7 @@ def list_publishers(self, location: str, **kwargs: Any) -> List[_models.VirtualM :rtype: list[~azure.mgmt.compute.v2022_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17146,7 +17148,7 @@ def list_skus( :rtype: list[~azure.mgmt.compute.v2022_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17201,7 +17203,7 @@ def list_by_edge_zone(self, location: str, edge_zone: str, **kwargs: Any) -> _mo :rtype: ~azure.mgmt.compute.v2022_03_01.models.VmImagesInEdgeZoneListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17286,7 +17288,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_03_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17371,7 +17373,7 @@ def list( :rtype: list[~azure.mgmt.compute.v2022_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17436,7 +17438,7 @@ def list_offers( :rtype: list[~azure.mgmt.compute.v2022_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17493,7 +17495,7 @@ def list_publishers( :rtype: list[~azure.mgmt.compute.v2022_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17554,7 +17556,7 @@ def list_skus( :rtype: list[~azure.mgmt.compute.v2022_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17637,7 +17639,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_03_01.models.VirtualMachineExtensionImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17695,7 +17697,7 @@ def list_types( :rtype: list[~azure.mgmt.compute.v2022_03_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17767,7 +17769,7 @@ def list_versions( :rtype: list[~azure.mgmt.compute.v2022_03_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17907,7 +17909,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2022_03_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18034,7 +18036,7 @@ def update( :rtype: ~azure.mgmt.compute.v2022_03_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18102,7 +18104,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18152,7 +18154,7 @@ def get(self, resource_group_name: str, availability_set_name: str, **kwargs: An :rtype: ~azure.mgmt.compute.v2022_03_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18213,7 +18215,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18290,7 +18292,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Ava api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18372,7 +18374,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18530,7 +18532,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2022_03_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18660,7 +18662,7 @@ def update( :rtype: ~azure.mgmt.compute.v2022_03_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18728,7 +18730,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18788,7 +18790,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_03_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18847,7 +18849,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.ProximityPlac api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18927,7 +18929,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19088,7 +19090,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2022_03_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19215,7 +19217,7 @@ def update( :rtype: ~azure.mgmt.compute.v2022_03_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19283,7 +19285,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19345,7 +19347,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_03_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19405,7 +19407,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19481,7 +19483,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.DedicatedHost api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19570,7 +19572,7 @@ def _create_or_update_initial( parameters: Union[_models.DedicatedHost, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19771,7 +19773,7 @@ def _update_initial( parameters: Union[_models.DedicatedHostUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19967,7 +19969,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20098,7 +20100,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_03_01.models.DedicatedHost :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20163,7 +20165,7 @@ def list_by_host_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.DedicatedHostListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20228,7 +20230,7 @@ def get_next(next_link=None): def _restart_initial( self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20374,7 +20376,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.SshPublicKeyR api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20455,7 +20457,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20589,7 +20591,7 @@ def create( :rtype: ~azure.mgmt.compute.v2022_03_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20717,7 +20719,7 @@ def update( :rtype: ~azure.mgmt.compute.v2022_03_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20785,7 +20787,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20835,7 +20837,7 @@ def get(self, resource_group_name: str, ssh_public_key_name: str, **kwargs: Any) :rtype: ~azure.mgmt.compute.v2022_03_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20893,7 +20895,7 @@ def generate_key_pair( :rtype: ~azure.mgmt.compute.v2022_03_01.models.SshPublicKeyGenerateKeyPairResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20959,7 +20961,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, image_name: str, parameters: Union[_models.Image, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21141,7 +21143,7 @@ def _update_initial( parameters: Union[_models.ImageUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21321,7 +21323,7 @@ def get_long_running_output(pipeline_response): ) def _delete_initial(self, resource_group_name: str, image_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21436,7 +21438,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_03_01.models.Image :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21495,7 +21497,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21571,7 +21573,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Image"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21733,7 +21735,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2022_03_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21863,7 +21865,7 @@ def update( :rtype: ~azure.mgmt.compute.v2022_03_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21920,7 +21922,7 @@ def update( def _delete_initial( self, resource_group_name: str, restore_point_collection_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22046,7 +22048,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_03_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22107,7 +22109,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Res api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.RestorePointCollectionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22186,7 +22188,7 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.RestorePointCollection"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.RestorePointCollectionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22275,7 +22277,7 @@ def _create_initial( parameters: Union[_models.RestorePoint, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22474,7 +22476,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, restore_point_collection_name: str, restore_point_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22604,7 +22606,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_03_01.models.RestorePoint :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22748,7 +22750,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2022_03_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22881,7 +22883,7 @@ def update( :rtype: ~azure.mgmt.compute.v2022_03_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22952,7 +22954,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23016,7 +23018,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_03_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23090,7 +23092,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.CapacityReservationGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23177,7 +23179,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.CapacityReservationGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23267,7 +23269,7 @@ def _create_or_update_initial( parameters: Union[_models.CapacityReservation, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23477,7 +23479,7 @@ def _update_initial( parameters: Union[_models.CapacityReservationUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23680,7 +23682,7 @@ def _delete_initial( capacity_reservation_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23818,7 +23820,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_03_01.models.CapacityReservation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23884,7 +23886,7 @@ def list_by_capacity_reservation_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.CapacityReservationListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23970,7 +23972,7 @@ def __init__(self, *args, **kwargs): def _export_request_rate_by_interval_initial( self, location: str, parameters: Union[_models.RequestRateByIntervalInput, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24147,7 +24149,7 @@ def get_long_running_output(pipeline_response): def _export_throttled_requests_initial( self, location: str, parameters: Union[_models.ThrottledRequestsInput, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24357,7 +24359,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.RunCommandDocu api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.RunCommandListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24430,7 +24432,7 @@ def get(self, location: str, command_id: str, **kwargs: Any) -> _models.RunComma :rtype: ~azure.mgmt.compute.v2022_03_01.models.RunCommandDocument :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24480,7 +24482,7 @@ def _create_or_update_initial( run_command: Union[_models.VirtualMachineRunCommand, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24689,7 +24691,7 @@ def _update_initial( run_command: Union[_models.VirtualMachineRunCommandUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24894,7 +24896,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_name: str, run_command_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25024,7 +25026,7 @@ def get_by_virtual_machine( :rtype: ~azure.mgmt.compute.v2022_03_01.models.VirtualMachineRunCommand :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25092,7 +25094,7 @@ def list_by_virtual_machine( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.VirtualMachineRunCommandsListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25185,7 +25187,7 @@ def _create_or_update_initial( run_command: Union[_models.VirtualMachineRunCommand, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25403,7 +25405,7 @@ def _update_initial( run_command: Union[_models.VirtualMachineRunCommandUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25616,7 +25618,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, run_command_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25752,7 +25754,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_03_01.models.VirtualMachineRunCommand :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25829,7 +25831,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-01")) cls: ClsType[_models.VirtualMachineRunCommandsListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_02/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_02/__init__.py index 3b1b6244b2375..ab7c46e8991db 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_02/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_02/__init__.py @@ -5,15 +5,21 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._compute_management_client import ComputeManagementClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._compute_management_client import ComputeManagementClient # 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__ = [ "ComputeManagementClient", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_02/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_02/_compute_management_client.py index e412141fe894b..d54fccd8a8fbc 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_02/_compute_management_client.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_02/_compute_management_client.py @@ -27,11 +27,10 @@ ) if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class ComputeManagementClient: # pylint: disable=client-accepts-api-version-keyword +class ComputeManagementClient: """Compute Client. :ivar disks: DisksOperations operations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_02/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_02/_configuration.py index 650b33b7b01d3..bfdba946c32ff 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_02/_configuration.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_02/_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 ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ComputeManagementClient. Note that all parameters used to create this instance are saved as instance diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_02/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_02/_version.py index d79b2760319c5..e5754a47ce68f 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_02/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_02/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "33.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_02/aio/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_02/aio/__init__.py index 0715f50185586..d3fd1ba93379a 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_02/aio/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_02/aio/__init__.py @@ -5,12 +5,18 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._compute_management_client import ComputeManagementClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._compute_management_client import ComputeManagementClient # 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__ = [ "ComputeManagementClient", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_02/aio/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_02/aio/_compute_management_client.py index 6a50a74f8dddf..e8a9a9110f79c 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_02/aio/_compute_management_client.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_02/aio/_compute_management_client.py @@ -27,11 +27,10 @@ ) if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class ComputeManagementClient: # pylint: disable=client-accepts-api-version-keyword +class ComputeManagementClient: """Compute Client. :ivar disks: DisksOperations operations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_02/aio/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_02/aio/_configuration.py index ee21bd5b5f7a7..d732e673ea428 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_02/aio/_configuration.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_02/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 ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ComputeManagementClient. Note that all parameters used to create this instance are saved as instance diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_02/aio/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_02/aio/operations/__init__.py index 8ca1cc2598c3b..0e0c2d8aaf8d4 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_02/aio/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_02/aio/operations/__init__.py @@ -5,15 +5,21 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._operations import DisksOperations -from ._operations import DiskAccessesOperations -from ._operations import DiskEncryptionSetsOperations -from ._operations import DiskRestorePointOperations -from ._operations import SnapshotsOperations +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._operations import DisksOperations # type: ignore +from ._operations import DiskAccessesOperations # type: ignore +from ._operations import DiskEncryptionSetsOperations # type: ignore +from ._operations import DiskRestorePointOperations # type: ignore +from ._operations import SnapshotsOperations # 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__ = [ @@ -23,5 +29,5 @@ "DiskRestorePointOperations", "SnapshotsOperations", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_02/aio/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_02/aio/operations/_operations.py index 6889642838944..6300a0a711a9a 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_02/aio/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_02/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. @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -76,7 +76,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]] @@ -104,7 +104,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.Disk, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -288,7 +288,7 @@ def get_long_running_output(pipeline_response): async def _update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.DiskUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -483,7 +483,7 @@ async def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.compute.v2022_03_02.models.Disk :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -526,7 +526,7 @@ async def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> return deserialized # type: ignore async def _delete_initial(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -643,7 +643,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-02")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -718,7 +718,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Disk"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-02")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -785,7 +785,7 @@ async def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -980,7 +980,7 @@ def get_long_running_output(pipeline_response): async def _revoke_access_initial( self, resource_group_name: str, disk_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1113,7 +1113,7 @@ async def _create_or_update_initial( disk_access: Union[_models.DiskAccess, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1310,7 +1310,7 @@ async def _update_initial( disk_access: Union[_models.DiskAccessUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1514,7 +1514,7 @@ async def get(self, resource_group_name: str, disk_access_name: str, **kwargs: A :rtype: ~azure.mgmt.compute.v2022_03_02.models.DiskAccess :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1559,7 +1559,7 @@ async def get(self, resource_group_name: str, disk_access_name: str, **kwargs: A async def _delete_initial( self, resource_group_name: str, disk_access_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1679,7 +1679,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-02")) cls: ClsType[_models.DiskAccessList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1755,7 +1755,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.DiskAccess"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-02")) cls: ClsType[_models.DiskAccessList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1831,7 +1831,7 @@ async def get_private_link_resources( :rtype: ~azure.mgmt.compute.v2022_03_02.models.PrivateLinkResourceListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1881,7 +1881,7 @@ async def _update_a_private_endpoint_connection_initial( # pylint: disable=name private_endpoint_connection: Union[_models.PrivateEndpointConnection, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2109,7 +2109,7 @@ async def get_a_private_endpoint_connection( :rtype: ~azure.mgmt.compute.v2022_03_02.models.PrivateEndpointConnection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2155,7 +2155,7 @@ async def get_a_private_endpoint_connection( async def _delete_a_private_endpoint_connection_initial( # pylint: disable=name-too-long self, resource_group_name: str, disk_access_name: str, private_endpoint_connection_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2286,7 +2286,7 @@ def list_private_endpoint_connections( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-02")) cls: ClsType[_models.PrivateEndpointConnectionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2376,7 +2376,7 @@ async def _create_or_update_initial( disk_encryption_set: Union[_models.DiskEncryptionSet, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2577,7 +2577,7 @@ async def _update_initial( disk_encryption_set: Union[_models.DiskEncryptionSetUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2788,7 +2788,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_03_02.models.DiskEncryptionSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2833,7 +2833,7 @@ async def get( async def _delete_initial( self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2955,7 +2955,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-02")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3031,7 +3031,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.DiskEncryptionSet"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-02")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3113,7 +3113,7 @@ def list_associated_resources( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-02")) cls: ClsType[_models.ResourceUriList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3221,7 +3221,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_03_02.models.DiskRestorePoint :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3290,7 +3290,7 @@ def list_by_restore_point( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-02")) cls: ClsType[_models.DiskRestorePointList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3362,7 +3362,7 @@ async def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3584,7 +3584,7 @@ async def _revoke_access_initial( disk_restore_point_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3726,7 +3726,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, snapshot_name: str, snapshot: Union[_models.Snapshot, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3917,7 +3917,7 @@ async def _update_initial( snapshot: Union[_models.SnapshotUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4121,7 +4121,7 @@ async def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) :rtype: ~azure.mgmt.compute.v2022_03_02.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4166,7 +4166,7 @@ async def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) async def _delete_initial( self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4284,7 +4284,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-02")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4360,7 +4360,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Snapshot"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-02")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4427,7 +4427,7 @@ async def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4622,7 +4622,7 @@ def get_long_running_output(pipeline_response): async def _revoke_access_initial( self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_02/models/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_02/models/__init__.py index dfe66b7206c67..3797ff8db3829 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_02/models/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_02/models/__init__.py @@ -5,80 +5,91 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._models_py3 import AccessUri -from ._models_py3 import ApiError -from ._models_py3 import ApiErrorBase -from ._models_py3 import CopyCompletionError -from ._models_py3 import CreationData -from ._models_py3 import Disk -from ._models_py3 import DiskAccess -from ._models_py3 import DiskAccessList -from ._models_py3 import DiskAccessUpdate -from ._models_py3 import DiskEncryptionSet -from ._models_py3 import DiskEncryptionSetList -from ._models_py3 import DiskEncryptionSetUpdate -from ._models_py3 import DiskList -from ._models_py3 import DiskRestorePoint -from ._models_py3 import DiskRestorePointList -from ._models_py3 import DiskSecurityProfile -from ._models_py3 import DiskSku -from ._models_py3 import DiskUpdate -from ._models_py3 import Encryption -from ._models_py3 import EncryptionSetIdentity -from ._models_py3 import EncryptionSettingsCollection -from ._models_py3 import EncryptionSettingsElement -from ._models_py3 import ExtendedLocation -from ._models_py3 import GrantAccessData -from ._models_py3 import ImageDiskReference -from ._models_py3 import InnerError -from ._models_py3 import KeyForDiskEncryptionSet -from ._models_py3 import KeyVaultAndKeyReference -from ._models_py3 import KeyVaultAndSecretReference -from ._models_py3 import PrivateEndpoint -from ._models_py3 import PrivateEndpointConnection -from ._models_py3 import PrivateEndpointConnectionListResult -from ._models_py3 import PrivateLinkResource -from ._models_py3 import PrivateLinkResourceListResult -from ._models_py3 import PrivateLinkServiceConnectionState -from ._models_py3 import PropertyUpdatesInProgress -from ._models_py3 import ProxyOnlyResource -from ._models_py3 import PurchasePlan -from ._models_py3 import Resource -from ._models_py3 import ResourceUriList -from ._models_py3 import ResourceWithOptionalLocation -from ._models_py3 import ShareInfoElement -from ._models_py3 import Snapshot -from ._models_py3 import SnapshotList -from ._models_py3 import SnapshotSku -from ._models_py3 import SnapshotUpdate -from ._models_py3 import SourceVault -from ._models_py3 import SubResource -from ._models_py3 import SubResourceReadOnly -from ._models_py3 import SupportedCapabilities -from ._models_py3 import UserAssignedIdentitiesValue +from typing import TYPE_CHECKING -from ._compute_management_client_enums import AccessLevel -from ._compute_management_client_enums import Architecture -from ._compute_management_client_enums import CopyCompletionErrorReason -from ._compute_management_client_enums import DataAccessAuthMode -from ._compute_management_client_enums import DiskCreateOption -from ._compute_management_client_enums import DiskEncryptionSetIdentityType -from ._compute_management_client_enums import DiskEncryptionSetType -from ._compute_management_client_enums import DiskSecurityTypes -from ._compute_management_client_enums import DiskState -from ._compute_management_client_enums import DiskStorageAccountTypes -from ._compute_management_client_enums import EncryptionType -from ._compute_management_client_enums import ExtendedLocationTypes -from ._compute_management_client_enums import HyperVGeneration -from ._compute_management_client_enums import NetworkAccessPolicy -from ._compute_management_client_enums import OperatingSystemTypes -from ._compute_management_client_enums import PrivateEndpointConnectionProvisioningState -from ._compute_management_client_enums import PrivateEndpointServiceConnectionStatus -from ._compute_management_client_enums import PublicNetworkAccess -from ._compute_management_client_enums import SnapshotStorageAccountTypes +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + + +from ._models_py3 import ( # type: ignore + AccessUri, + ApiError, + ApiErrorBase, + CopyCompletionError, + CreationData, + Disk, + DiskAccess, + DiskAccessList, + DiskAccessUpdate, + DiskEncryptionSet, + DiskEncryptionSetList, + DiskEncryptionSetUpdate, + DiskList, + DiskRestorePoint, + DiskRestorePointList, + DiskSecurityProfile, + DiskSku, + DiskUpdate, + Encryption, + EncryptionSetIdentity, + EncryptionSettingsCollection, + EncryptionSettingsElement, + ExtendedLocation, + GrantAccessData, + ImageDiskReference, + InnerError, + KeyForDiskEncryptionSet, + KeyVaultAndKeyReference, + KeyVaultAndSecretReference, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateEndpointConnectionListResult, + PrivateLinkResource, + PrivateLinkResourceListResult, + PrivateLinkServiceConnectionState, + PropertyUpdatesInProgress, + ProxyOnlyResource, + PurchasePlan, + Resource, + ResourceUriList, + ResourceWithOptionalLocation, + ShareInfoElement, + Snapshot, + SnapshotList, + SnapshotSku, + SnapshotUpdate, + SourceVault, + SubResource, + SubResourceReadOnly, + SupportedCapabilities, + UserAssignedIdentitiesValue, +) + +from ._compute_management_client_enums import ( # type: ignore + AccessLevel, + Architecture, + CopyCompletionErrorReason, + DataAccessAuthMode, + DiskCreateOption, + DiskEncryptionSetIdentityType, + DiskEncryptionSetType, + DiskSecurityTypes, + DiskState, + DiskStorageAccountTypes, + EncryptionType, + ExtendedLocationTypes, + HyperVGeneration, + NetworkAccessPolicy, + OperatingSystemTypes, + PrivateEndpointConnectionProvisioningState, + PrivateEndpointServiceConnectionStatus, + PublicNetworkAccess, + SnapshotStorageAccountTypes, +) 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__ = [ @@ -153,5 +164,5 @@ "PublicNetworkAccess", "SnapshotStorageAccountTypes", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_02/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_02/models/_models_py3.py index f9a72e66cdc8b..4fa2d9bfa49c1 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_02/models/_models_py3.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_02/models/_models_py3.py @@ -1,5 +1,5 @@ -# 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. @@ -12,7 +12,6 @@ from ... import _serialization if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models @@ -337,7 +336,7 @@ def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kw self.tags = tags -class Disk(Resource): # pylint: disable=too-many-instance-attributes +class Disk(Resource): """Disk resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -812,7 +811,7 @@ def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> N self.tags = tags -class DiskEncryptionSet(Resource): # pylint: disable=too-many-instance-attributes +class DiskEncryptionSet(Resource): """disk encryption set resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -1113,7 +1112,7 @@ def __init__(self, **kwargs: Any) -> None: self.type = None -class DiskRestorePoint(ProxyOnlyResource): # pylint: disable=too-many-instance-attributes +class DiskRestorePoint(ProxyOnlyResource): """Properties of disk restore point. Variables are only populated by the server, and will be ignored when sending a request. @@ -1380,7 +1379,7 @@ def __init__(self, *, name: Optional[Union[str, "_models.DiskStorageAccountTypes self.tier = None -class DiskUpdate(_serialization.Model): # pylint: disable=too-many-instance-attributes +class DiskUpdate(_serialization.Model): """Disk update resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -2480,7 +2479,7 @@ def __init__(self, **kwargs: Any) -> None: self.vm_uri = None -class Snapshot(Resource): # pylint: disable=too-many-instance-attributes +class Snapshot(Resource): """Snapshot resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -2811,7 +2810,7 @@ def __init__( self.tier = None -class SnapshotUpdate(_serialization.Model): # pylint: disable=too-many-instance-attributes +class SnapshotUpdate(_serialization.Model): """Snapshot update resource. :ivar tags: Resource tags. diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_02/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_02/operations/__init__.py index 8ca1cc2598c3b..0e0c2d8aaf8d4 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_02/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_02/operations/__init__.py @@ -5,15 +5,21 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._operations import DisksOperations -from ._operations import DiskAccessesOperations -from ._operations import DiskEncryptionSetsOperations -from ._operations import DiskRestorePointOperations -from ._operations import SnapshotsOperations +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._operations import DisksOperations # type: ignore +from ._operations import DiskAccessesOperations # type: ignore +from ._operations import DiskEncryptionSetsOperations # type: ignore +from ._operations import DiskRestorePointOperations # type: ignore +from ._operations import SnapshotsOperations # 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__ = [ @@ -23,5 +29,5 @@ "DiskRestorePointOperations", "SnapshotsOperations", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_02/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_02/operations/_operations.py index aae6115878289..232570f84572a 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_02/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_02/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. @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -36,7 +36,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, HttpResponse], T, Dict[str, Any]], Any]] @@ -1280,7 +1280,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.Disk, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1464,7 +1464,7 @@ def get_long_running_output(pipeline_response): def _update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.DiskUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1659,7 +1659,7 @@ def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> _model :rtype: ~azure.mgmt.compute.v2022_03_02.models.Disk :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1702,7 +1702,7 @@ def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> _model return deserialized # type: ignore def _delete_initial(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1819,7 +1819,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-02")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1894,7 +1894,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Disk"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-02")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1961,7 +1961,7 @@ def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2151,7 +2151,7 @@ def get_long_running_output(pipeline_response): ) def _revoke_access_initial(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2282,7 +2282,7 @@ def _create_or_update_initial( disk_access: Union[_models.DiskAccess, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2476,7 +2476,7 @@ def _update_initial( disk_access: Union[_models.DiskAccessUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2677,7 +2677,7 @@ def get(self, resource_group_name: str, disk_access_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.compute.v2022_03_02.models.DiskAccess :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2720,7 +2720,7 @@ def get(self, resource_group_name: str, disk_access_name: str, **kwargs: Any) -> return deserialized # type: ignore def _delete_initial(self, resource_group_name: str, disk_access_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2837,7 +2837,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-02")) cls: ClsType[_models.DiskAccessList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2912,7 +2912,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.DiskAccess"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-02")) cls: ClsType[_models.DiskAccessList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2988,7 +2988,7 @@ def get_private_link_resources( :rtype: ~azure.mgmt.compute.v2022_03_02.models.PrivateLinkResourceListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3038,7 +3038,7 @@ def _update_a_private_endpoint_connection_initial( # pylint: disable=name-too-l private_endpoint_connection: Union[_models.PrivateEndpointConnection, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3266,7 +3266,7 @@ def get_a_private_endpoint_connection( :rtype: ~azure.mgmt.compute.v2022_03_02.models.PrivateEndpointConnection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3312,7 +3312,7 @@ def get_a_private_endpoint_connection( def _delete_a_private_endpoint_connection_initial( # pylint: disable=name-too-long self, resource_group_name: str, disk_access_name: str, private_endpoint_connection_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3443,7 +3443,7 @@ def list_private_endpoint_connections( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-02")) cls: ClsType[_models.PrivateEndpointConnectionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3533,7 +3533,7 @@ def _create_or_update_initial( disk_encryption_set: Union[_models.DiskEncryptionSet, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3731,7 +3731,7 @@ def _update_initial( disk_encryption_set: Union[_models.DiskEncryptionSetUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3937,7 +3937,7 @@ def get(self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: :rtype: ~azure.mgmt.compute.v2022_03_02.models.DiskEncryptionSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3982,7 +3982,7 @@ def get(self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: def _delete_initial( self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4099,7 +4099,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-02")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4174,7 +4174,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.DiskEncryptionSet"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-02")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4256,7 +4256,7 @@ def list_associated_resources( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-02")) cls: ClsType[_models.ResourceUriList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4364,7 +4364,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_03_02.models.DiskRestorePoint :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4432,7 +4432,7 @@ def list_by_restore_point( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-02")) cls: ClsType[_models.DiskRestorePointList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4504,7 +4504,7 @@ def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4723,7 +4723,7 @@ def _revoke_access_initial( disk_restore_point_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4865,7 +4865,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, snapshot_name: str, snapshot: Union[_models.Snapshot, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5053,7 +5053,7 @@ def _update_initial( snapshot: Union[_models.SnapshotUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5254,7 +5254,7 @@ def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> _m :rtype: ~azure.mgmt.compute.v2022_03_02.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5297,7 +5297,7 @@ def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> _m return deserialized # type: ignore def _delete_initial(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5414,7 +5414,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-02")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5489,7 +5489,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Snapshot"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-02")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5556,7 +5556,7 @@ def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5746,7 +5746,7 @@ def get_long_running_output(pipeline_response): ) def _revoke_access_initial(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_03/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_03/__init__.py index 3b1b6244b2375..ab7c46e8991db 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_03/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_03/__init__.py @@ -5,15 +5,21 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._compute_management_client import ComputeManagementClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._compute_management_client import ComputeManagementClient # 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__ = [ "ComputeManagementClient", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_03/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_03/_compute_management_client.py index 396d57ca5832f..80999ec21763e 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_03/_compute_management_client.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_03/_compute_management_client.py @@ -34,11 +34,10 @@ ) if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class ComputeManagementClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes +class ComputeManagementClient: # pylint: disable=too-many-instance-attributes """Compute Client. :ivar galleries: GalleriesOperations operations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_03/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_03/_configuration.py index 331be04928352..7de57a1d32bb7 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_03/_configuration.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_03/_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 ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ComputeManagementClient. Note that all parameters used to create this instance are saved as instance diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_03/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_03/_version.py index d79b2760319c5..e5754a47ce68f 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_03/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_03/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "33.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_03/aio/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_03/aio/__init__.py index 0715f50185586..d3fd1ba93379a 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_03/aio/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_03/aio/__init__.py @@ -5,12 +5,18 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._compute_management_client import ComputeManagementClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._compute_management_client import ComputeManagementClient # 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__ = [ "ComputeManagementClient", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_03/aio/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_03/aio/_compute_management_client.py index 7b934dbccf53b..1b9faa3e6f8de 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_03/aio/_compute_management_client.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_03/aio/_compute_management_client.py @@ -34,11 +34,10 @@ ) if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class ComputeManagementClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes +class ComputeManagementClient: # pylint: disable=too-many-instance-attributes """Compute Client. :ivar galleries: GalleriesOperations operations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_03/aio/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_03/aio/_configuration.py index 6d87c2d282ec8..e5e3cddfb9018 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_03/aio/_configuration.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_03/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 ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ComputeManagementClient. Note that all parameters used to create this instance are saved as instance diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_03/aio/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_03/aio/operations/__init__.py index 322500f753256..139d983a58402 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_03/aio/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_03/aio/operations/__init__.py @@ -5,22 +5,28 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._operations import GalleriesOperations -from ._operations import GalleryImagesOperations -from ._operations import GalleryImageVersionsOperations -from ._operations import GalleryApplicationsOperations -from ._operations import GalleryApplicationVersionsOperations -from ._operations import GallerySharingProfileOperations -from ._operations import SharedGalleriesOperations -from ._operations import SharedGalleryImagesOperations -from ._operations import SharedGalleryImageVersionsOperations -from ._operations import CommunityGalleriesOperations -from ._operations import CommunityGalleryImagesOperations -from ._operations import CommunityGalleryImageVersionsOperations +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._operations import GalleriesOperations # type: ignore +from ._operations import GalleryImagesOperations # type: ignore +from ._operations import GalleryImageVersionsOperations # type: ignore +from ._operations import GalleryApplicationsOperations # type: ignore +from ._operations import GalleryApplicationVersionsOperations # type: ignore +from ._operations import GallerySharingProfileOperations # type: ignore +from ._operations import SharedGalleriesOperations # type: ignore +from ._operations import SharedGalleryImagesOperations # type: ignore +from ._operations import SharedGalleryImageVersionsOperations # type: ignore +from ._operations import CommunityGalleriesOperations # type: ignore +from ._operations import CommunityGalleryImagesOperations # type: ignore +from ._operations import CommunityGalleryImageVersionsOperations # 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__ = [ @@ -37,5 +43,5 @@ "CommunityGalleryImagesOperations", "CommunityGalleryImageVersionsOperations", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_03/aio/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_03/aio/operations/_operations.py index 82c5a28b0c963..6d1c34e725894 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_03/aio/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_03/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. @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -76,7 +76,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]] @@ -104,7 +104,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, gallery_name: str, gallery: Union[_models.Gallery, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -297,7 +297,7 @@ async def _update_initial( gallery: Union[_models.GalleryUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -511,7 +511,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_03_03.models.Gallery :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -556,7 +556,7 @@ async def get( return deserialized # type: ignore async def _delete_initial(self, resource_group_name: str, gallery_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -671,7 +671,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-03")) cls: ClsType[_models.GalleryList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -746,7 +746,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Gallery"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-03")) cls: ClsType[_models.GalleryList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -835,7 +835,7 @@ async def _create_or_update_initial( gallery_image: Union[_models.GalleryImage, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1047,7 +1047,7 @@ async def _update_initial( gallery_image: Union[_models.GalleryImageUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1266,7 +1266,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_03_03.models.GalleryImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1312,7 +1312,7 @@ async def get( async def _delete_initial( self, resource_group_name: str, gallery_name: str, gallery_image_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1440,7 +1440,7 @@ def list_by_gallery( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-03")) cls: ClsType[_models.GalleryImageList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1532,7 +1532,7 @@ async def _create_or_update_initial( gallery_image_version: Union[_models.GalleryImageVersion, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1766,7 +1766,7 @@ async def _update_initial( gallery_image_version: Union[_models.GalleryImageVersionUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2022,7 +2022,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_03_03.models.GalleryImageVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2075,7 +2075,7 @@ async def _delete_initial( gallery_image_version_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2217,7 +2217,7 @@ def list_by_gallery_image( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-03")) cls: ClsType[_models.GalleryImageVersionList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2309,7 +2309,7 @@ async def _create_or_update_initial( gallery_application: Union[_models.GalleryApplication, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2525,7 +2525,7 @@ async def _update_initial( gallery_application: Union[_models.GalleryApplicationUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2751,7 +2751,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_03_03.models.GalleryApplication :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2797,7 +2797,7 @@ async def get( async def _delete_initial( self, resource_group_name: str, gallery_name: str, gallery_application_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2926,7 +2926,7 @@ def list_by_gallery( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-03")) cls: ClsType[_models.GalleryApplicationList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3018,7 +3018,7 @@ async def _create_or_update_initial( gallery_application_version: Union[_models.GalleryApplicationVersion, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3254,7 +3254,7 @@ async def _update_initial( gallery_application_version: Union[_models.GalleryApplicationVersionUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3512,7 +3512,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_03_03.models.GalleryApplicationVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3565,7 +3565,7 @@ async def _delete_initial( gallery_application_version_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3708,7 +3708,7 @@ def list_by_gallery_application( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-03")) cls: ClsType[_models.GalleryApplicationVersionList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3799,7 +3799,7 @@ async def _update_initial( sharing_update: Union[_models.SharingUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4027,7 +4027,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-03")) cls: ClsType[_models.SharedGalleryList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4101,7 +4101,7 @@ async def get(self, location: str, gallery_unique_name: str, **kwargs: Any) -> _ :rtype: ~azure.mgmt.compute.v2022_03_03.models.SharedGallery :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4193,7 +4193,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-03")) cls: ClsType[_models.SharedGalleryImageList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4273,7 +4273,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_03_03.models.SharedGalleryImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4371,7 +4371,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-03")) cls: ClsType[_models.SharedGalleryImageVersionList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4462,7 +4462,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_03_03.models.SharedGalleryImageVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4539,7 +4539,7 @@ async def get(self, location: str, public_gallery_name: str, **kwargs: Any) -> _ :rtype: ~azure.mgmt.compute.v2022_03_03.models.CommunityGallery :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4618,7 +4618,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_03_03.models.CommunityGalleryImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4683,7 +4683,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-03")) cls: ClsType[_models.CommunityGalleryImageList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4792,7 +4792,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_03_03.models.CommunityGalleryImageVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4860,7 +4860,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-03")) cls: ClsType[_models.CommunityGalleryImageVersionList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_03/models/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_03/models/__init__.py index fb33bf5a123cb..3fff3ff4bd1d7 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_03/models/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_03/models/__init__.py @@ -5,126 +5,137 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._models_py3 import ApiError -from ._models_py3 import ApiErrorBase -from ._models_py3 import CommunityGallery -from ._models_py3 import CommunityGalleryImage -from ._models_py3 import CommunityGalleryImageIdentifier -from ._models_py3 import CommunityGalleryImageList -from ._models_py3 import CommunityGalleryImageVersion -from ._models_py3 import CommunityGalleryImageVersionList -from ._models_py3 import CommunityGalleryInfo -from ._models_py3 import DataDiskImageEncryption -from ._models_py3 import Disallowed -from ._models_py3 import DiskImageEncryption -from ._models_py3 import EncryptionImages -from ._models_py3 import ExtendedLocation -from ._models_py3 import Gallery -from ._models_py3 import GalleryApplication -from ._models_py3 import GalleryApplicationCustomAction -from ._models_py3 import GalleryApplicationCustomActionParameter -from ._models_py3 import GalleryApplicationList -from ._models_py3 import GalleryApplicationUpdate -from ._models_py3 import GalleryApplicationVersion -from ._models_py3 import GalleryApplicationVersionList -from ._models_py3 import GalleryApplicationVersionPublishingProfile -from ._models_py3 import GalleryApplicationVersionSafetyProfile -from ._models_py3 import GalleryApplicationVersionUpdate -from ._models_py3 import GalleryArtifactPublishingProfileBase -from ._models_py3 import GalleryArtifactSafetyProfileBase -from ._models_py3 import GalleryArtifactSource -from ._models_py3 import GalleryArtifactVersionFullSource -from ._models_py3 import GalleryArtifactVersionSource -from ._models_py3 import GalleryDataDiskImage -from ._models_py3 import GalleryDiskImage -from ._models_py3 import GalleryDiskImageSource -from ._models_py3 import GalleryExtendedLocation -from ._models_py3 import GalleryIdentifier -from ._models_py3 import GalleryImage -from ._models_py3 import GalleryImageFeature -from ._models_py3 import GalleryImageIdentifier -from ._models_py3 import GalleryImageList -from ._models_py3 import GalleryImageUpdate -from ._models_py3 import GalleryImageVersion -from ._models_py3 import GalleryImageVersionList -from ._models_py3 import GalleryImageVersionPublishingProfile -from ._models_py3 import GalleryImageVersionSafetyProfile -from ._models_py3 import GalleryImageVersionStorageProfile -from ._models_py3 import GalleryImageVersionUpdate -from ._models_py3 import GalleryList -from ._models_py3 import GalleryOSDiskImage -from ._models_py3 import GalleryTargetExtendedLocation -from ._models_py3 import GalleryUpdate -from ._models_py3 import ImagePurchasePlan -from ._models_py3 import InnerError -from ._models_py3 import LatestGalleryImageVersion -from ._models_py3 import ManagedArtifact -from ._models_py3 import OSDiskImageEncryption -from ._models_py3 import OSDiskImageSecurityProfile -from ._models_py3 import PirCommunityGalleryResource -from ._models_py3 import PirResource -from ._models_py3 import PirSharedGalleryResource -from ._models_py3 import PolicyViolation -from ._models_py3 import RecommendedMachineConfiguration -from ._models_py3 import RegionalReplicationStatus -from ._models_py3 import RegionalSharingStatus -from ._models_py3 import ReplicationStatus -from ._models_py3 import Resource -from ._models_py3 import ResourceRange -from ._models_py3 import ResourceWithOptionalLocation -from ._models_py3 import SharedGallery -from ._models_py3 import SharedGalleryDataDiskImage -from ._models_py3 import SharedGalleryDiskImage -from ._models_py3 import SharedGalleryImage -from ._models_py3 import SharedGalleryImageList -from ._models_py3 import SharedGalleryImageVersion -from ._models_py3 import SharedGalleryImageVersionList -from ._models_py3 import SharedGalleryImageVersionStorageProfile -from ._models_py3 import SharedGalleryList -from ._models_py3 import SharedGalleryOSDiskImage -from ._models_py3 import SharingProfile -from ._models_py3 import SharingProfileGroup -from ._models_py3 import SharingStatus -from ._models_py3 import SharingUpdate -from ._models_py3 import SoftDeletePolicy -from ._models_py3 import SubResource -from ._models_py3 import SubResourceReadOnly -from ._models_py3 import SystemData -from ._models_py3 import TargetRegion -from ._models_py3 import UpdateResourceDefinition -from ._models_py3 import UserArtifactManage -from ._models_py3 import UserArtifactSettings -from ._models_py3 import UserArtifactSource -from ._models_py3 import UserAssignedIdentitiesValue +from typing import TYPE_CHECKING -from ._compute_management_client_enums import AggregatedReplicationState -from ._compute_management_client_enums import Architecture -from ._compute_management_client_enums import ConfidentialVMEncryptionType -from ._compute_management_client_enums import EdgeZoneStorageAccountType -from ._compute_management_client_enums import ExtendedLocationTypes -from ._compute_management_client_enums import GalleryApplicationCustomActionParameterType -from ._compute_management_client_enums import GalleryExpandParams -from ._compute_management_client_enums import GalleryExtendedLocationType -from ._compute_management_client_enums import GalleryProvisioningState -from ._compute_management_client_enums import GallerySharingPermissionTypes -from ._compute_management_client_enums import HostCaching -from ._compute_management_client_enums import HyperVGeneration -from ._compute_management_client_enums import OperatingSystemStateTypes -from ._compute_management_client_enums import OperatingSystemTypes -from ._compute_management_client_enums import PolicyViolationCategory -from ._compute_management_client_enums import ReplicationMode -from ._compute_management_client_enums import ReplicationState -from ._compute_management_client_enums import ReplicationStatusTypes -from ._compute_management_client_enums import SelectPermissions -from ._compute_management_client_enums import SharedGalleryHostCaching -from ._compute_management_client_enums import SharedToValues -from ._compute_management_client_enums import SharingProfileGroupTypes -from ._compute_management_client_enums import SharingState -from ._compute_management_client_enums import SharingUpdateOperationTypes -from ._compute_management_client_enums import StorageAccountType +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + + +from ._models_py3 import ( # type: ignore + ApiError, + ApiErrorBase, + CommunityGallery, + CommunityGalleryImage, + CommunityGalleryImageIdentifier, + CommunityGalleryImageList, + CommunityGalleryImageVersion, + CommunityGalleryImageVersionList, + CommunityGalleryInfo, + DataDiskImageEncryption, + Disallowed, + DiskImageEncryption, + EncryptionImages, + ExtendedLocation, + Gallery, + GalleryApplication, + GalleryApplicationCustomAction, + GalleryApplicationCustomActionParameter, + GalleryApplicationList, + GalleryApplicationUpdate, + GalleryApplicationVersion, + GalleryApplicationVersionList, + GalleryApplicationVersionPublishingProfile, + GalleryApplicationVersionSafetyProfile, + GalleryApplicationVersionUpdate, + GalleryArtifactPublishingProfileBase, + GalleryArtifactSafetyProfileBase, + GalleryArtifactSource, + GalleryArtifactVersionFullSource, + GalleryArtifactVersionSource, + GalleryDataDiskImage, + GalleryDiskImage, + GalleryDiskImageSource, + GalleryExtendedLocation, + GalleryIdentifier, + GalleryImage, + GalleryImageFeature, + GalleryImageIdentifier, + GalleryImageList, + GalleryImageUpdate, + GalleryImageVersion, + GalleryImageVersionList, + GalleryImageVersionPublishingProfile, + GalleryImageVersionSafetyProfile, + GalleryImageVersionStorageProfile, + GalleryImageVersionUpdate, + GalleryList, + GalleryOSDiskImage, + GalleryTargetExtendedLocation, + GalleryUpdate, + ImagePurchasePlan, + InnerError, + LatestGalleryImageVersion, + ManagedArtifact, + OSDiskImageEncryption, + OSDiskImageSecurityProfile, + PirCommunityGalleryResource, + PirResource, + PirSharedGalleryResource, + PolicyViolation, + RecommendedMachineConfiguration, + RegionalReplicationStatus, + RegionalSharingStatus, + ReplicationStatus, + Resource, + ResourceRange, + ResourceWithOptionalLocation, + SharedGallery, + SharedGalleryDataDiskImage, + SharedGalleryDiskImage, + SharedGalleryImage, + SharedGalleryImageList, + SharedGalleryImageVersion, + SharedGalleryImageVersionList, + SharedGalleryImageVersionStorageProfile, + SharedGalleryList, + SharedGalleryOSDiskImage, + SharingProfile, + SharingProfileGroup, + SharingStatus, + SharingUpdate, + SoftDeletePolicy, + SubResource, + SubResourceReadOnly, + SystemData, + TargetRegion, + UpdateResourceDefinition, + UserArtifactManage, + UserArtifactSettings, + UserArtifactSource, + UserAssignedIdentitiesValue, +) + +from ._compute_management_client_enums import ( # type: ignore + AggregatedReplicationState, + Architecture, + ConfidentialVMEncryptionType, + EdgeZoneStorageAccountType, + ExtendedLocationTypes, + GalleryApplicationCustomActionParameterType, + GalleryExpandParams, + GalleryExtendedLocationType, + GalleryProvisioningState, + GallerySharingPermissionTypes, + HostCaching, + HyperVGeneration, + OperatingSystemStateTypes, + OperatingSystemTypes, + PolicyViolationCategory, + ReplicationMode, + ReplicationState, + ReplicationStatusTypes, + SelectPermissions, + SharedGalleryHostCaching, + SharedToValues, + SharingProfileGroupTypes, + SharingState, + SharingUpdateOperationTypes, + StorageAccountType, +) 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__ = [ @@ -245,5 +256,5 @@ "SharingUpdateOperationTypes", "StorageAccountType", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_03/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_03/models/_models_py3.py index 6b4f6c2d6ebbb..b638707d3a253 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_03/models/_models_py3.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_03/models/_models_py3.py @@ -1,5 +1,5 @@ -# 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. @@ -13,7 +13,6 @@ from ... import _serialization if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models @@ -160,7 +159,7 @@ class CommunityGallery(PirCommunityGalleryResource): """ -class CommunityGalleryImage(PirCommunityGalleryResource): # pylint: disable=too-many-instance-attributes +class CommunityGalleryImage(PirCommunityGalleryResource): """Specifies information about the gallery image definition that you want to create or update. Variables are only populated by the server, and will be ignored when sending a request. @@ -748,7 +747,7 @@ def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kw self.tags = tags -class Gallery(Resource): # pylint: disable=too-many-instance-attributes +class Gallery(Resource): """Specifies information about the Shared Image Gallery that you want to create or update. Variables are only populated by the server, and will be ignored when sending a request. @@ -841,7 +840,7 @@ def __init__( self.sharing_status = None -class GalleryApplication(Resource): # pylint: disable=too-many-instance-attributes +class GalleryApplication(Resource): """Specifies information about the gallery Application Definition that you want to create or update. @@ -1159,7 +1158,7 @@ def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> N self.tags = tags -class GalleryApplicationUpdate(UpdateResourceDefinition): # pylint: disable=too-many-instance-attributes +class GalleryApplicationUpdate(UpdateResourceDefinition): """Specifies information about the gallery Application Definition that you want to update. Variables are only populated by the server, and will be ignored when sending a request. @@ -1481,9 +1480,7 @@ def __init__( self.target_extended_locations = target_extended_locations -class GalleryApplicationVersionPublishingProfile( - GalleryArtifactPublishingProfileBase -): # pylint: disable=too-many-instance-attributes,name-too-long +class GalleryApplicationVersionPublishingProfile(GalleryArtifactPublishingProfileBase): # pylint: disable=name-too-long """The publishing profile of a gallery image version. Variables are only populated by the server, and will be ignored when sending a request. @@ -2023,7 +2020,7 @@ def __init__(self, **kwargs: Any) -> None: self.unique_name = None -class GalleryImage(Resource): # pylint: disable=too-many-instance-attributes +class GalleryImage(Resource): """Specifies information about the gallery image definition that you want to create or update. Variables are only populated by the server, and will be ignored when sending a request. @@ -2300,7 +2297,7 @@ def __init__(self, *, value: List["_models.GalleryImage"], next_link: Optional[s self.next_link = next_link -class GalleryImageUpdate(UpdateResourceDefinition): # pylint: disable=too-many-instance-attributes +class GalleryImageUpdate(UpdateResourceDefinition): """Specifies information about the gallery image definition that you want to update. Variables are only populated by the server, and will be ignored when sending a request. @@ -3575,7 +3572,7 @@ def __init__( self.lun = lun -class SharedGalleryImage(PirSharedGalleryResource): # pylint: disable=too-many-instance-attributes +class SharedGalleryImage(PirSharedGalleryResource): """Specifies information about the gallery image definition that you want to create or update. Variables are only populated by the server, and will be ignored when sending a request. diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_03/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_03/operations/__init__.py index 322500f753256..139d983a58402 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_03/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_03/operations/__init__.py @@ -5,22 +5,28 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._operations import GalleriesOperations -from ._operations import GalleryImagesOperations -from ._operations import GalleryImageVersionsOperations -from ._operations import GalleryApplicationsOperations -from ._operations import GalleryApplicationVersionsOperations -from ._operations import GallerySharingProfileOperations -from ._operations import SharedGalleriesOperations -from ._operations import SharedGalleryImagesOperations -from ._operations import SharedGalleryImageVersionsOperations -from ._operations import CommunityGalleriesOperations -from ._operations import CommunityGalleryImagesOperations -from ._operations import CommunityGalleryImageVersionsOperations +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._operations import GalleriesOperations # type: ignore +from ._operations import GalleryImagesOperations # type: ignore +from ._operations import GalleryImageVersionsOperations # type: ignore +from ._operations import GalleryApplicationsOperations # type: ignore +from ._operations import GalleryApplicationVersionsOperations # type: ignore +from ._operations import GallerySharingProfileOperations # type: ignore +from ._operations import SharedGalleriesOperations # type: ignore +from ._operations import SharedGalleryImagesOperations # type: ignore +from ._operations import SharedGalleryImageVersionsOperations # type: ignore +from ._operations import CommunityGalleriesOperations # type: ignore +from ._operations import CommunityGalleryImagesOperations # type: ignore +from ._operations import CommunityGalleryImageVersionsOperations # 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__ = [ @@ -37,5 +43,5 @@ "CommunityGalleryImagesOperations", "CommunityGalleryImageVersionsOperations", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_03/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_03/operations/_operations.py index 00c13130dec8f..dbf8d47951fcd 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_03/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_03/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. @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -36,7 +36,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, HttpResponse], T, Dict[str, Any]], Any]] @@ -1400,7 +1400,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, gallery_name: str, gallery: Union[_models.Gallery, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1590,7 +1590,7 @@ def _update_initial( gallery: Union[_models.GalleryUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1801,7 +1801,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_03_03.models.Gallery :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1846,7 +1846,7 @@ def get( return deserialized # type: ignore def _delete_initial(self, resource_group_name: str, gallery_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1961,7 +1961,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-03")) cls: ClsType[_models.GalleryList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2036,7 +2036,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Gallery"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-03")) cls: ClsType[_models.GalleryList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2125,7 +2125,7 @@ def _create_or_update_initial( gallery_image: Union[_models.GalleryImage, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2337,7 +2337,7 @@ def _update_initial( gallery_image: Union[_models.GalleryImageUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2556,7 +2556,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_03_03.models.GalleryImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2602,7 +2602,7 @@ def get( def _delete_initial( self, resource_group_name: str, gallery_name: str, gallery_image_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2729,7 +2729,7 @@ def list_by_gallery( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-03")) cls: ClsType[_models.GalleryImageList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2821,7 +2821,7 @@ def _create_or_update_initial( gallery_image_version: Union[_models.GalleryImageVersion, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3055,7 +3055,7 @@ def _update_initial( gallery_image_version: Union[_models.GalleryImageVersionUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3311,7 +3311,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_03_03.models.GalleryImageVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3364,7 +3364,7 @@ def _delete_initial( gallery_image_version_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3506,7 +3506,7 @@ def list_by_gallery_image( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-03")) cls: ClsType[_models.GalleryImageVersionList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3598,7 +3598,7 @@ def _create_or_update_initial( gallery_application: Union[_models.GalleryApplication, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3814,7 +3814,7 @@ def _update_initial( gallery_application: Union[_models.GalleryApplicationUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4040,7 +4040,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_03_03.models.GalleryApplication :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4086,7 +4086,7 @@ def get( def _delete_initial( self, resource_group_name: str, gallery_name: str, gallery_application_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4214,7 +4214,7 @@ def list_by_gallery( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-03")) cls: ClsType[_models.GalleryApplicationList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4306,7 +4306,7 @@ def _create_or_update_initial( gallery_application_version: Union[_models.GalleryApplicationVersion, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4542,7 +4542,7 @@ def _update_initial( gallery_application_version: Union[_models.GalleryApplicationVersionUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4800,7 +4800,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_03_03.models.GalleryApplicationVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4853,7 +4853,7 @@ def _delete_initial( gallery_application_version_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4996,7 +4996,7 @@ def list_by_gallery_application( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-03")) cls: ClsType[_models.GalleryApplicationVersionList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5087,7 +5087,7 @@ def _update_initial( sharing_update: Union[_models.SharingUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5311,7 +5311,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-03")) cls: ClsType[_models.SharedGalleryList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5385,7 +5385,7 @@ def get(self, location: str, gallery_unique_name: str, **kwargs: Any) -> _models :rtype: ~azure.mgmt.compute.v2022_03_03.models.SharedGallery :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5476,7 +5476,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-03")) cls: ClsType[_models.SharedGalleryImageList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5556,7 +5556,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_03_03.models.SharedGalleryImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5654,7 +5654,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-03")) cls: ClsType[_models.SharedGalleryImageVersionList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5745,7 +5745,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_03_03.models.SharedGalleryImageVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5822,7 +5822,7 @@ def get(self, location: str, public_gallery_name: str, **kwargs: Any) -> _models :rtype: ~azure.mgmt.compute.v2022_03_03.models.CommunityGallery :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5901,7 +5901,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_03_03.models.CommunityGalleryImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5964,7 +5964,7 @@ def list(self, location: str, public_gallery_name: str, **kwargs: Any) -> Iterab api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-03")) cls: ClsType[_models.CommunityGalleryImageList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6073,7 +6073,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_03_03.models.CommunityGalleryImageVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6141,7 +6141,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-03-03")) cls: ClsType[_models.CommunityGalleryImageVersionList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_04_04/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_04_04/__init__.py index 3b1b6244b2375..ab7c46e8991db 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_04_04/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_04_04/__init__.py @@ -5,15 +5,21 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._compute_management_client import ComputeManagementClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._compute_management_client import ComputeManagementClient # 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__ = [ "ComputeManagementClient", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_04_04/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_04_04/_compute_management_client.py index 88511328fb25c..8d4ad00edf2c7 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_04_04/_compute_management_client.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_04_04/_compute_management_client.py @@ -27,11 +27,10 @@ ) if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class ComputeManagementClient: # pylint: disable=client-accepts-api-version-keyword +class ComputeManagementClient: """Compute Client. :ivar cloud_service_role_instances: CloudServiceRoleInstancesOperations operations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_04_04/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_04_04/_configuration.py index afe4385d5b76a..ea2424cfc3e05 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_04_04/_configuration.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_04_04/_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 ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ComputeManagementClient. Note that all parameters used to create this instance are saved as instance diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_04_04/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_04_04/_version.py index d79b2760319c5..e5754a47ce68f 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_04_04/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_04_04/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "33.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_04_04/aio/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_04_04/aio/__init__.py index 0715f50185586..d3fd1ba93379a 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_04_04/aio/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_04_04/aio/__init__.py @@ -5,12 +5,18 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._compute_management_client import ComputeManagementClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._compute_management_client import ComputeManagementClient # 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__ = [ "ComputeManagementClient", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_04_04/aio/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_04_04/aio/_compute_management_client.py index 2ad125fb012b1..e35a339588f6e 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_04_04/aio/_compute_management_client.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_04_04/aio/_compute_management_client.py @@ -27,11 +27,10 @@ ) if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class ComputeManagementClient: # pylint: disable=client-accepts-api-version-keyword +class ComputeManagementClient: """Compute Client. :ivar cloud_service_role_instances: CloudServiceRoleInstancesOperations operations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_04_04/aio/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_04_04/aio/_configuration.py index 3681e45b4acf8..9ecf02022276b 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_04_04/aio/_configuration.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_04_04/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 ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ComputeManagementClient. Note that all parameters used to create this instance are saved as instance diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_04_04/aio/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_04_04/aio/operations/__init__.py index b21df5e1d1dda..6422d5c48bb10 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_04_04/aio/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_04_04/aio/operations/__init__.py @@ -5,15 +5,21 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._operations import CloudServiceRoleInstancesOperations -from ._operations import CloudServiceRolesOperations -from ._operations import CloudServicesOperations -from ._operations import CloudServicesUpdateDomainOperations -from ._operations import CloudServiceOperatingSystemsOperations +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._operations import CloudServiceRoleInstancesOperations # type: ignore +from ._operations import CloudServiceRolesOperations # type: ignore +from ._operations import CloudServicesOperations # type: ignore +from ._operations import CloudServicesUpdateDomainOperations # type: ignore +from ._operations import CloudServiceOperatingSystemsOperations # 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__ = [ @@ -23,5 +29,5 @@ "CloudServicesUpdateDomainOperations", "CloudServiceOperatingSystemsOperations", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_04_04/aio/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_04_04/aio/operations/_operations.py index ff8c7052328c5..1044af8d841e5 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_04_04/aio/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_04_04/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. @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -68,7 +68,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]] @@ -96,7 +96,7 @@ def __init__(self, *args, **kwargs) -> None: async def _delete_initial( self, role_instance_name: str, resource_group_name: str, cloud_service_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -226,7 +226,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_04_04.models.RoleInstance :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -286,7 +286,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2022_04_04.models.RoleInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -360,7 +360,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-04-04")) cls: ClsType[_models.RoleInstanceListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -426,7 +426,7 @@ async def get_next(next_link=None): async def _restart_initial( self, role_instance_name: str, resource_group_name: str, cloud_service_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -535,7 +535,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _reimage_initial( self, role_instance_name: str, resource_group_name: str, cloud_service_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -644,7 +644,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _rebuild_initial( self, role_instance_name: str, resource_group_name: str, cloud_service_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -767,7 +767,7 @@ async def get_remote_desktop_file( :rtype: AsyncIterator[bytes] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -852,7 +852,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_04_04.models.CloudServiceRole :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -917,7 +917,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-04-04")) cls: ClsType[_models.CloudServiceRoleListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1007,7 +1007,7 @@ async def _create_or_update_initial( parameters: Optional[Union[_models.CloudService, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1202,7 +1202,7 @@ async def _update_initial( parameters: Optional[Union[_models.CloudServiceUpdate, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1390,7 +1390,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, cloud_service_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1503,7 +1503,7 @@ async def get(self, resource_group_name: str, cloud_service_name: str, **kwargs: :rtype: ~azure.mgmt.compute.v2022_04_04.models.CloudService :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1559,7 +1559,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2022_04_04.models.CloudServiceInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1618,7 +1618,7 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.CloudService"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-04-04")) cls: ClsType[_models.CloudServiceListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1697,7 +1697,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-04-04")) cls: ClsType[_models.CloudServiceListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1761,7 +1761,7 @@ async def get_next(next_link=None): async def _start_initial( self, resource_group_name: str, cloud_service_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1865,7 +1865,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _power_off_initial( self, resource_group_name: str, cloud_service_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1974,7 +1974,7 @@ async def _restart_initial( parameters: Optional[Union[_models.RoleInstances, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2159,7 +2159,7 @@ async def _reimage_initial( parameters: Optional[Union[_models.RoleInstances, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2347,7 +2347,7 @@ async def _rebuild_initial( parameters: Optional[Union[_models.RoleInstances, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2538,7 +2538,7 @@ async def _delete_instances_initial( parameters: Optional[Union[_models.RoleInstances, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2745,7 +2745,7 @@ async def _walk_update_domain_initial( parameters: Optional[Union[_models.UpdateDomain, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2960,7 +2960,7 @@ async def get_update_domain( :rtype: ~azure.mgmt.compute.v2022_04_04.models.UpdateDomain :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3024,7 +3024,7 @@ def list_update_domains( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-04-04")) cls: ClsType[_models.UpdateDomainListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3120,7 +3120,7 @@ async def get_os_version(self, location: str, os_version_name: str, **kwargs: An :rtype: ~azure.mgmt.compute.v2022_04_04.models.OSVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3181,7 +3181,7 @@ def list_os_versions(self, location: str, **kwargs: Any) -> AsyncIterable["_mode api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-04-04")) cls: ClsType[_models.OSVersionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3255,7 +3255,7 @@ async def get_os_family(self, location: str, os_family_name: str, **kwargs: Any) :rtype: ~azure.mgmt.compute.v2022_04_04.models.OSFamily :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3316,7 +3316,7 @@ def list_os_families(self, location: str, **kwargs: Any) -> AsyncIterable["_mode api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-04-04")) cls: ClsType[_models.OSFamilyListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_04_04/models/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_04_04/models/__init__.py index 3832e59bab914..f33b18e40e2e6 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_04_04/models/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_04_04/models/__init__.py @@ -5,67 +5,78 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._models_py3 import ApiError -from ._models_py3 import ApiErrorBase -from ._models_py3 import CloudService -from ._models_py3 import CloudServiceExtensionProfile -from ._models_py3 import CloudServiceExtensionProperties -from ._models_py3 import CloudServiceInstanceView -from ._models_py3 import CloudServiceListResult -from ._models_py3 import CloudServiceNetworkProfile -from ._models_py3 import CloudServiceOsProfile -from ._models_py3 import CloudServiceProperties -from ._models_py3 import CloudServiceRole -from ._models_py3 import CloudServiceRoleListResult -from ._models_py3 import CloudServiceRoleProfile -from ._models_py3 import CloudServiceRoleProfileProperties -from ._models_py3 import CloudServiceRoleProperties -from ._models_py3 import CloudServiceRoleSku -from ._models_py3 import CloudServiceUpdate -from ._models_py3 import CloudServiceVaultAndSecretReference -from ._models_py3 import CloudServiceVaultCertificate -from ._models_py3 import CloudServiceVaultSecretGroup -from ._models_py3 import ExtendedLocation -from ._models_py3 import Extension -from ._models_py3 import InnerError -from ._models_py3 import InstanceSku -from ._models_py3 import InstanceViewStatusesSummary -from ._models_py3 import LoadBalancerConfiguration -from ._models_py3 import LoadBalancerConfigurationProperties -from ._models_py3 import LoadBalancerFrontendIPConfiguration -from ._models_py3 import LoadBalancerFrontendIPConfigurationProperties -from ._models_py3 import OSFamily -from ._models_py3 import OSFamilyListResult -from ._models_py3 import OSFamilyProperties -from ._models_py3 import OSVersion -from ._models_py3 import OSVersionListResult -from ._models_py3 import OSVersionProperties -from ._models_py3 import OSVersionPropertiesBase -from ._models_py3 import Resource -from ._models_py3 import ResourceInstanceViewStatus -from ._models_py3 import ResourceWithOptionalLocation -from ._models_py3 import RoleInstance -from ._models_py3 import RoleInstanceListResult -from ._models_py3 import RoleInstanceNetworkProfile -from ._models_py3 import RoleInstanceProperties -from ._models_py3 import RoleInstanceView -from ._models_py3 import RoleInstances -from ._models_py3 import StatusCodeCount -from ._models_py3 import SubResource -from ._models_py3 import SubResourceReadOnly -from ._models_py3 import SystemData -from ._models_py3 import UpdateDomain -from ._models_py3 import UpdateDomainListResult -from ._models_py3 import UserAssignedIdentitiesValue +from typing import TYPE_CHECKING -from ._compute_management_client_enums import CloudServiceSlotType -from ._compute_management_client_enums import CloudServiceUpgradeMode -from ._compute_management_client_enums import ExtendedLocationTypes -from ._compute_management_client_enums import InstanceViewTypes -from ._compute_management_client_enums import StatusLevelTypes +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + + +from ._models_py3 import ( # type: ignore + ApiError, + ApiErrorBase, + CloudService, + CloudServiceExtensionProfile, + CloudServiceExtensionProperties, + CloudServiceInstanceView, + CloudServiceListResult, + CloudServiceNetworkProfile, + CloudServiceOsProfile, + CloudServiceProperties, + CloudServiceRole, + CloudServiceRoleListResult, + CloudServiceRoleProfile, + CloudServiceRoleProfileProperties, + CloudServiceRoleProperties, + CloudServiceRoleSku, + CloudServiceUpdate, + CloudServiceVaultAndSecretReference, + CloudServiceVaultCertificate, + CloudServiceVaultSecretGroup, + ExtendedLocation, + Extension, + InnerError, + InstanceSku, + InstanceViewStatusesSummary, + LoadBalancerConfiguration, + LoadBalancerConfigurationProperties, + LoadBalancerFrontendIPConfiguration, + LoadBalancerFrontendIPConfigurationProperties, + OSFamily, + OSFamilyListResult, + OSFamilyProperties, + OSVersion, + OSVersionListResult, + OSVersionProperties, + OSVersionPropertiesBase, + Resource, + ResourceInstanceViewStatus, + ResourceWithOptionalLocation, + RoleInstance, + RoleInstanceListResult, + RoleInstanceNetworkProfile, + RoleInstanceProperties, + RoleInstanceView, + RoleInstances, + StatusCodeCount, + SubResource, + SubResourceReadOnly, + SystemData, + UpdateDomain, + UpdateDomainListResult, + UserAssignedIdentitiesValue, +) + +from ._compute_management_client_enums import ( # type: ignore + CloudServiceSlotType, + CloudServiceUpgradeMode, + ExtendedLocationTypes, + InstanceViewTypes, + StatusLevelTypes, +) 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__ = [ @@ -127,5 +138,5 @@ "InstanceViewTypes", "StatusLevelTypes", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_04_04/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_04_04/models/_models_py3.py index 0f95ecdd6c869..d510d21e70dd0 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_04_04/models/_models_py3.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_04_04/models/_models_py3.py @@ -1,5 +1,5 @@ -# 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. @@ -15,10 +15,9 @@ 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 if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object @@ -492,7 +491,7 @@ def __init__( self.secrets = secrets -class CloudServiceProperties(_serialization.Model): # pylint: disable=too-many-instance-attributes +class CloudServiceProperties(_serialization.Model): """Cloud service properties. Variables are only populated by the server, and will be ignored when sending a request. diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_04_04/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_04_04/operations/__init__.py index b21df5e1d1dda..6422d5c48bb10 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_04_04/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_04_04/operations/__init__.py @@ -5,15 +5,21 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._operations import CloudServiceRoleInstancesOperations -from ._operations import CloudServiceRolesOperations -from ._operations import CloudServicesOperations -from ._operations import CloudServicesUpdateDomainOperations -from ._operations import CloudServiceOperatingSystemsOperations +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._operations import CloudServiceRoleInstancesOperations # type: ignore +from ._operations import CloudServiceRolesOperations # type: ignore +from ._operations import CloudServicesOperations # type: ignore +from ._operations import CloudServicesUpdateDomainOperations # type: ignore +from ._operations import CloudServiceOperatingSystemsOperations # 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__ = [ @@ -23,5 +29,5 @@ "CloudServicesUpdateDomainOperations", "CloudServiceOperatingSystemsOperations", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_04_04/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_04_04/operations/_operations.py index 5224398f794e7..54022459b4ea8 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_04_04/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_04_04/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. @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -36,7 +36,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, HttpResponse], T, Dict[str, Any]], Any]] @@ -1031,7 +1031,7 @@ def __init__(self, *args, **kwargs): def _delete_initial( self, role_instance_name: str, resource_group_name: str, cloud_service_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1161,7 +1161,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_04_04.models.RoleInstance :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1221,7 +1221,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2022_04_04.models.RoleInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1294,7 +1294,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-04-04")) cls: ClsType[_models.RoleInstanceListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1360,7 +1360,7 @@ def get_next(next_link=None): def _restart_initial( self, role_instance_name: str, resource_group_name: str, cloud_service_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1469,7 +1469,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _reimage_initial( self, role_instance_name: str, resource_group_name: str, cloud_service_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1578,7 +1578,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _rebuild_initial( self, role_instance_name: str, resource_group_name: str, cloud_service_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1701,7 +1701,7 @@ def get_remote_desktop_file( :rtype: Iterator[bytes] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1786,7 +1786,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_04_04.models.CloudServiceRole :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1850,7 +1850,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-04-04")) cls: ClsType[_models.CloudServiceRoleListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1940,7 +1940,7 @@ def _create_or_update_initial( parameters: Optional[Union[_models.CloudService, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2135,7 +2135,7 @@ def _update_initial( parameters: Optional[Union[_models.CloudServiceUpdate, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2321,7 +2321,7 @@ def get_long_running_output(pipeline_response): ) def _delete_initial(self, resource_group_name: str, cloud_service_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2432,7 +2432,7 @@ def get(self, resource_group_name: str, cloud_service_name: str, **kwargs: Any) :rtype: ~azure.mgmt.compute.v2022_04_04.models.CloudService :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2488,7 +2488,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2022_04_04.models.CloudServiceInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2546,7 +2546,7 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.CloudService"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-04-04")) cls: ClsType[_models.CloudServiceListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2624,7 +2624,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Clo api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-04-04")) cls: ClsType[_models.CloudServiceListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2686,7 +2686,7 @@ def get_next(next_link=None): return ItemPaged(get_next, extract_data) def _start_initial(self, resource_group_name: str, cloud_service_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2786,7 +2786,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _power_off_initial(self, resource_group_name: str, cloud_service_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2893,7 +2893,7 @@ def _restart_initial( parameters: Optional[Union[_models.RoleInstances, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3078,7 +3078,7 @@ def _reimage_initial( parameters: Optional[Union[_models.RoleInstances, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3266,7 +3266,7 @@ def _rebuild_initial( parameters: Optional[Union[_models.RoleInstances, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3457,7 +3457,7 @@ def _delete_instances_initial( parameters: Optional[Union[_models.RoleInstances, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3664,7 +3664,7 @@ def _walk_update_domain_initial( parameters: Optional[Union[_models.UpdateDomain, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3879,7 +3879,7 @@ def get_update_domain( :rtype: ~azure.mgmt.compute.v2022_04_04.models.UpdateDomain :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3942,7 +3942,7 @@ def list_update_domains( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-04-04")) cls: ClsType[_models.UpdateDomainListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4038,7 +4038,7 @@ def get_os_version(self, location: str, os_version_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.compute.v2022_04_04.models.OSVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4098,7 +4098,7 @@ def list_os_versions(self, location: str, **kwargs: Any) -> Iterable["_models.OS api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-04-04")) cls: ClsType[_models.OSVersionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4172,7 +4172,7 @@ def get_os_family(self, location: str, os_family_name: str, **kwargs: Any) -> _m :rtype: ~azure.mgmt.compute.v2022_04_04.models.OSFamily :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4232,7 +4232,7 @@ def list_os_families(self, location: str, **kwargs: Any) -> Iterable["_models.OS api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-04-04")) cls: ClsType[_models.OSFamilyListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_07_02/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_07_02/__init__.py index 3b1b6244b2375..ab7c46e8991db 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_07_02/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_07_02/__init__.py @@ -5,15 +5,21 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._compute_management_client import ComputeManagementClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._compute_management_client import ComputeManagementClient # 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__ = [ "ComputeManagementClient", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_07_02/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_07_02/_compute_management_client.py index ae4c46c3580f8..474df3851dcdf 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_07_02/_compute_management_client.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_07_02/_compute_management_client.py @@ -27,11 +27,10 @@ ) if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class ComputeManagementClient: # pylint: disable=client-accepts-api-version-keyword +class ComputeManagementClient: """Compute Client. :ivar disks: DisksOperations operations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_07_02/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_07_02/_configuration.py index 584750853fcd6..df3a9a211dc7d 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_07_02/_configuration.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_07_02/_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 ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ComputeManagementClient. Note that all parameters used to create this instance are saved as instance diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_07_02/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_07_02/_version.py index d79b2760319c5..e5754a47ce68f 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_07_02/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_07_02/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "33.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_07_02/aio/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_07_02/aio/__init__.py index 0715f50185586..d3fd1ba93379a 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_07_02/aio/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_07_02/aio/__init__.py @@ -5,12 +5,18 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._compute_management_client import ComputeManagementClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._compute_management_client import ComputeManagementClient # 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__ = [ "ComputeManagementClient", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_07_02/aio/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_07_02/aio/_compute_management_client.py index 880d974e1b0c8..4857d2f663b2d 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_07_02/aio/_compute_management_client.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_07_02/aio/_compute_management_client.py @@ -27,11 +27,10 @@ ) if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class ComputeManagementClient: # pylint: disable=client-accepts-api-version-keyword +class ComputeManagementClient: """Compute Client. :ivar disks: DisksOperations operations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_07_02/aio/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_07_02/aio/_configuration.py index b9f22c81bdbfc..e6448d35344a1 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_07_02/aio/_configuration.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_07_02/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 ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ComputeManagementClient. Note that all parameters used to create this instance are saved as instance diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_07_02/aio/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_07_02/aio/operations/__init__.py index 8ca1cc2598c3b..0e0c2d8aaf8d4 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_07_02/aio/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_07_02/aio/operations/__init__.py @@ -5,15 +5,21 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._operations import DisksOperations -from ._operations import DiskAccessesOperations -from ._operations import DiskEncryptionSetsOperations -from ._operations import DiskRestorePointOperations -from ._operations import SnapshotsOperations +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._operations import DisksOperations # type: ignore +from ._operations import DiskAccessesOperations # type: ignore +from ._operations import DiskEncryptionSetsOperations # type: ignore +from ._operations import DiskRestorePointOperations # type: ignore +from ._operations import SnapshotsOperations # 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__ = [ @@ -23,5 +29,5 @@ "DiskRestorePointOperations", "SnapshotsOperations", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_07_02/aio/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_07_02/aio/operations/_operations.py index f4b876117feca..7a07f3a824695 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_07_02/aio/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_07_02/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. @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -76,7 +76,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]] @@ -104,7 +104,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.Disk, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -288,7 +288,7 @@ def get_long_running_output(pipeline_response): async def _update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.DiskUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -483,7 +483,7 @@ async def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.compute.v2022_07_02.models.Disk :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -526,7 +526,7 @@ async def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> return deserialized # type: ignore async def _delete_initial(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -643,7 +643,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-07-02")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -718,7 +718,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Disk"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-07-02")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -785,7 +785,7 @@ async def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -980,7 +980,7 @@ def get_long_running_output(pipeline_response): async def _revoke_access_initial( self, resource_group_name: str, disk_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1113,7 +1113,7 @@ async def _create_or_update_initial( disk_access: Union[_models.DiskAccess, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1310,7 +1310,7 @@ async def _update_initial( disk_access: Union[_models.DiskAccessUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1514,7 +1514,7 @@ async def get(self, resource_group_name: str, disk_access_name: str, **kwargs: A :rtype: ~azure.mgmt.compute.v2022_07_02.models.DiskAccess :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1559,7 +1559,7 @@ async def get(self, resource_group_name: str, disk_access_name: str, **kwargs: A async def _delete_initial( self, resource_group_name: str, disk_access_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1679,7 +1679,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-07-02")) cls: ClsType[_models.DiskAccessList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1755,7 +1755,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.DiskAccess"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-07-02")) cls: ClsType[_models.DiskAccessList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1831,7 +1831,7 @@ async def get_private_link_resources( :rtype: ~azure.mgmt.compute.v2022_07_02.models.PrivateLinkResourceListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1881,7 +1881,7 @@ async def _update_a_private_endpoint_connection_initial( # pylint: disable=name private_endpoint_connection: Union[_models.PrivateEndpointConnection, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2109,7 +2109,7 @@ async def get_a_private_endpoint_connection( :rtype: ~azure.mgmt.compute.v2022_07_02.models.PrivateEndpointConnection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2155,7 +2155,7 @@ async def get_a_private_endpoint_connection( async def _delete_a_private_endpoint_connection_initial( # pylint: disable=name-too-long self, resource_group_name: str, disk_access_name: str, private_endpoint_connection_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2286,7 +2286,7 @@ def list_private_endpoint_connections( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-07-02")) cls: ClsType[_models.PrivateEndpointConnectionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2376,7 +2376,7 @@ async def _create_or_update_initial( disk_encryption_set: Union[_models.DiskEncryptionSet, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2577,7 +2577,7 @@ async def _update_initial( disk_encryption_set: Union[_models.DiskEncryptionSetUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2788,7 +2788,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_07_02.models.DiskEncryptionSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2833,7 +2833,7 @@ async def get( async def _delete_initial( self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2955,7 +2955,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-07-02")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3031,7 +3031,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.DiskEncryptionSet"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-07-02")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3113,7 +3113,7 @@ def list_associated_resources( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-07-02")) cls: ClsType[_models.ResourceUriList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3221,7 +3221,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_07_02.models.DiskRestorePoint :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3290,7 +3290,7 @@ def list_by_restore_point( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-07-02")) cls: ClsType[_models.DiskRestorePointList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3362,7 +3362,7 @@ async def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3584,7 +3584,7 @@ async def _revoke_access_initial( disk_restore_point_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3726,7 +3726,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, snapshot_name: str, snapshot: Union[_models.Snapshot, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3917,7 +3917,7 @@ async def _update_initial( snapshot: Union[_models.SnapshotUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4121,7 +4121,7 @@ async def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) :rtype: ~azure.mgmt.compute.v2022_07_02.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4166,7 +4166,7 @@ async def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) async def _delete_initial( self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4284,7 +4284,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-07-02")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4360,7 +4360,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Snapshot"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-07-02")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4427,7 +4427,7 @@ async def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4622,7 +4622,7 @@ def get_long_running_output(pipeline_response): async def _revoke_access_initial( self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_07_02/models/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_07_02/models/__init__.py index cca1e792c8cad..04ab06b97c663 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_07_02/models/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_07_02/models/__init__.py @@ -5,81 +5,92 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._models_py3 import AccessUri -from ._models_py3 import ApiError -from ._models_py3 import ApiErrorBase -from ._models_py3 import CopyCompletionError -from ._models_py3 import CreationData -from ._models_py3 import Disk -from ._models_py3 import DiskAccess -from ._models_py3 import DiskAccessList -from ._models_py3 import DiskAccessUpdate -from ._models_py3 import DiskEncryptionSet -from ._models_py3 import DiskEncryptionSetList -from ._models_py3 import DiskEncryptionSetUpdate -from ._models_py3 import DiskList -from ._models_py3 import DiskRestorePoint -from ._models_py3 import DiskRestorePointList -from ._models_py3 import DiskSecurityProfile -from ._models_py3 import DiskSku -from ._models_py3 import DiskUpdate -from ._models_py3 import Encryption -from ._models_py3 import EncryptionSetIdentity -from ._models_py3 import EncryptionSettingsCollection -from ._models_py3 import EncryptionSettingsElement -from ._models_py3 import ExtendedLocation -from ._models_py3 import GrantAccessData -from ._models_py3 import ImageDiskReference -from ._models_py3 import InnerError -from ._models_py3 import KeyForDiskEncryptionSet -from ._models_py3 import KeyVaultAndKeyReference -from ._models_py3 import KeyVaultAndSecretReference -from ._models_py3 import PrivateEndpoint -from ._models_py3 import PrivateEndpointConnection -from ._models_py3 import PrivateEndpointConnectionListResult -from ._models_py3 import PrivateLinkResource -from ._models_py3 import PrivateLinkResourceListResult -from ._models_py3 import PrivateLinkServiceConnectionState -from ._models_py3 import PropertyUpdatesInProgress -from ._models_py3 import ProxyOnlyResource -from ._models_py3 import PurchasePlan -from ._models_py3 import Resource -from ._models_py3 import ResourceUriList -from ._models_py3 import ResourceWithOptionalLocation -from ._models_py3 import ShareInfoElement -from ._models_py3 import Snapshot -from ._models_py3 import SnapshotList -from ._models_py3 import SnapshotSku -from ._models_py3 import SnapshotUpdate -from ._models_py3 import SourceVault -from ._models_py3 import SubResource -from ._models_py3 import SubResourceReadOnly -from ._models_py3 import SupportedCapabilities -from ._models_py3 import SystemData -from ._models_py3 import UserAssignedIdentitiesValue +from typing import TYPE_CHECKING -from ._compute_management_client_enums import AccessLevel -from ._compute_management_client_enums import Architecture -from ._compute_management_client_enums import CopyCompletionErrorReason -from ._compute_management_client_enums import DataAccessAuthMode -from ._compute_management_client_enums import DiskCreateOption -from ._compute_management_client_enums import DiskEncryptionSetIdentityType -from ._compute_management_client_enums import DiskEncryptionSetType -from ._compute_management_client_enums import DiskSecurityTypes -from ._compute_management_client_enums import DiskState -from ._compute_management_client_enums import DiskStorageAccountTypes -from ._compute_management_client_enums import EncryptionType -from ._compute_management_client_enums import ExtendedLocationTypes -from ._compute_management_client_enums import HyperVGeneration -from ._compute_management_client_enums import NetworkAccessPolicy -from ._compute_management_client_enums import OperatingSystemTypes -from ._compute_management_client_enums import PrivateEndpointConnectionProvisioningState -from ._compute_management_client_enums import PrivateEndpointServiceConnectionStatus -from ._compute_management_client_enums import PublicNetworkAccess -from ._compute_management_client_enums import SnapshotStorageAccountTypes +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + + +from ._models_py3 import ( # type: ignore + AccessUri, + ApiError, + ApiErrorBase, + CopyCompletionError, + CreationData, + Disk, + DiskAccess, + DiskAccessList, + DiskAccessUpdate, + DiskEncryptionSet, + DiskEncryptionSetList, + DiskEncryptionSetUpdate, + DiskList, + DiskRestorePoint, + DiskRestorePointList, + DiskSecurityProfile, + DiskSku, + DiskUpdate, + Encryption, + EncryptionSetIdentity, + EncryptionSettingsCollection, + EncryptionSettingsElement, + ExtendedLocation, + GrantAccessData, + ImageDiskReference, + InnerError, + KeyForDiskEncryptionSet, + KeyVaultAndKeyReference, + KeyVaultAndSecretReference, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateEndpointConnectionListResult, + PrivateLinkResource, + PrivateLinkResourceListResult, + PrivateLinkServiceConnectionState, + PropertyUpdatesInProgress, + ProxyOnlyResource, + PurchasePlan, + Resource, + ResourceUriList, + ResourceWithOptionalLocation, + ShareInfoElement, + Snapshot, + SnapshotList, + SnapshotSku, + SnapshotUpdate, + SourceVault, + SubResource, + SubResourceReadOnly, + SupportedCapabilities, + SystemData, + UserAssignedIdentitiesValue, +) + +from ._compute_management_client_enums import ( # type: ignore + AccessLevel, + Architecture, + CopyCompletionErrorReason, + DataAccessAuthMode, + DiskCreateOption, + DiskEncryptionSetIdentityType, + DiskEncryptionSetType, + DiskSecurityTypes, + DiskState, + DiskStorageAccountTypes, + EncryptionType, + ExtendedLocationTypes, + HyperVGeneration, + NetworkAccessPolicy, + OperatingSystemTypes, + PrivateEndpointConnectionProvisioningState, + PrivateEndpointServiceConnectionStatus, + PublicNetworkAccess, + SnapshotStorageAccountTypes, +) 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__ = [ @@ -155,5 +166,5 @@ "PublicNetworkAccess", "SnapshotStorageAccountTypes", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_07_02/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_07_02/models/_models_py3.py index d2604e9e0cafe..edd13cd7d320b 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_07_02/models/_models_py3.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_07_02/models/_models_py3.py @@ -1,5 +1,5 @@ -# 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. @@ -12,7 +12,6 @@ from ... import _serialization if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models @@ -171,7 +170,7 @@ def __init__( self.error_message = error_message -class CreationData(_serialization.Model): # pylint: disable=too-many-instance-attributes +class CreationData(_serialization.Model): """Data used when creating a disk. Variables are only populated by the server, and will be ignored when sending a request. @@ -348,7 +347,7 @@ def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kw self.tags = tags -class Disk(Resource): # pylint: disable=too-many-instance-attributes +class Disk(Resource): """Disk resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -843,7 +842,7 @@ def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> N self.tags = tags -class DiskEncryptionSet(Resource): # pylint: disable=too-many-instance-attributes +class DiskEncryptionSet(Resource): """disk encryption set resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -1144,7 +1143,7 @@ def __init__(self, **kwargs: Any) -> None: self.type = None -class DiskRestorePoint(ProxyOnlyResource): # pylint: disable=too-many-instance-attributes +class DiskRestorePoint(ProxyOnlyResource): """Properties of disk restore point. Variables are only populated by the server, and will be ignored when sending a request. @@ -1411,7 +1410,7 @@ def __init__(self, *, name: Optional[Union[str, "_models.DiskStorageAccountTypes self.tier = None -class DiskUpdate(_serialization.Model): # pylint: disable=too-many-instance-attributes +class DiskUpdate(_serialization.Model): """Disk update resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -2526,7 +2525,7 @@ def __init__(self, **kwargs: Any) -> None: self.vm_uri = None -class Snapshot(Resource): # pylint: disable=too-many-instance-attributes +class Snapshot(Resource): """Snapshot resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -2864,7 +2863,7 @@ def __init__( self.tier = None -class SnapshotUpdate(_serialization.Model): # pylint: disable=too-many-instance-attributes +class SnapshotUpdate(_serialization.Model): """Snapshot update resource. :ivar tags: Resource tags. diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_07_02/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_07_02/operations/__init__.py index 8ca1cc2598c3b..0e0c2d8aaf8d4 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_07_02/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_07_02/operations/__init__.py @@ -5,15 +5,21 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._operations import DisksOperations -from ._operations import DiskAccessesOperations -from ._operations import DiskEncryptionSetsOperations -from ._operations import DiskRestorePointOperations -from ._operations import SnapshotsOperations +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._operations import DisksOperations # type: ignore +from ._operations import DiskAccessesOperations # type: ignore +from ._operations import DiskEncryptionSetsOperations # type: ignore +from ._operations import DiskRestorePointOperations # type: ignore +from ._operations import SnapshotsOperations # 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__ = [ @@ -23,5 +29,5 @@ "DiskRestorePointOperations", "SnapshotsOperations", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_07_02/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_07_02/operations/_operations.py index f178377cb6fa7..467a450dd7bce 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_07_02/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_07_02/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. @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -36,7 +36,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, HttpResponse], T, Dict[str, Any]], Any]] @@ -1280,7 +1280,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.Disk, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1464,7 +1464,7 @@ def get_long_running_output(pipeline_response): def _update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.DiskUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1659,7 +1659,7 @@ def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> _model :rtype: ~azure.mgmt.compute.v2022_07_02.models.Disk :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1702,7 +1702,7 @@ def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> _model return deserialized # type: ignore def _delete_initial(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1819,7 +1819,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-07-02")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1894,7 +1894,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Disk"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-07-02")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1961,7 +1961,7 @@ def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2151,7 +2151,7 @@ def get_long_running_output(pipeline_response): ) def _revoke_access_initial(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2282,7 +2282,7 @@ def _create_or_update_initial( disk_access: Union[_models.DiskAccess, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2476,7 +2476,7 @@ def _update_initial( disk_access: Union[_models.DiskAccessUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2677,7 +2677,7 @@ def get(self, resource_group_name: str, disk_access_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.compute.v2022_07_02.models.DiskAccess :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2720,7 +2720,7 @@ def get(self, resource_group_name: str, disk_access_name: str, **kwargs: Any) -> return deserialized # type: ignore def _delete_initial(self, resource_group_name: str, disk_access_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2837,7 +2837,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-07-02")) cls: ClsType[_models.DiskAccessList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2912,7 +2912,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.DiskAccess"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-07-02")) cls: ClsType[_models.DiskAccessList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2988,7 +2988,7 @@ def get_private_link_resources( :rtype: ~azure.mgmt.compute.v2022_07_02.models.PrivateLinkResourceListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3038,7 +3038,7 @@ def _update_a_private_endpoint_connection_initial( # pylint: disable=name-too-l private_endpoint_connection: Union[_models.PrivateEndpointConnection, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3266,7 +3266,7 @@ def get_a_private_endpoint_connection( :rtype: ~azure.mgmt.compute.v2022_07_02.models.PrivateEndpointConnection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3312,7 +3312,7 @@ def get_a_private_endpoint_connection( def _delete_a_private_endpoint_connection_initial( # pylint: disable=name-too-long self, resource_group_name: str, disk_access_name: str, private_endpoint_connection_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3443,7 +3443,7 @@ def list_private_endpoint_connections( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-07-02")) cls: ClsType[_models.PrivateEndpointConnectionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3533,7 +3533,7 @@ def _create_or_update_initial( disk_encryption_set: Union[_models.DiskEncryptionSet, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3731,7 +3731,7 @@ def _update_initial( disk_encryption_set: Union[_models.DiskEncryptionSetUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3937,7 +3937,7 @@ def get(self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: :rtype: ~azure.mgmt.compute.v2022_07_02.models.DiskEncryptionSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3982,7 +3982,7 @@ def get(self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: def _delete_initial( self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4099,7 +4099,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-07-02")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4174,7 +4174,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.DiskEncryptionSet"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-07-02")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4256,7 +4256,7 @@ def list_associated_resources( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-07-02")) cls: ClsType[_models.ResourceUriList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4364,7 +4364,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_07_02.models.DiskRestorePoint :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4432,7 +4432,7 @@ def list_by_restore_point( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-07-02")) cls: ClsType[_models.DiskRestorePointList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4504,7 +4504,7 @@ def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4723,7 +4723,7 @@ def _revoke_access_initial( disk_restore_point_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4865,7 +4865,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, snapshot_name: str, snapshot: Union[_models.Snapshot, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5053,7 +5053,7 @@ def _update_initial( snapshot: Union[_models.SnapshotUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5254,7 +5254,7 @@ def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> _m :rtype: ~azure.mgmt.compute.v2022_07_02.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5297,7 +5297,7 @@ def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> _m return deserialized # type: ignore def _delete_initial(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5414,7 +5414,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-07-02")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5489,7 +5489,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Snapshot"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-07-02")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5556,7 +5556,7 @@ def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5746,7 +5746,7 @@ def get_long_running_output(pipeline_response): ) def _revoke_access_initial(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_01/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_01/__init__.py index 3b1b6244b2375..ab7c46e8991db 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_01/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_01/__init__.py @@ -5,15 +5,21 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._compute_management_client import ComputeManagementClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._compute_management_client import ComputeManagementClient # 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__ = [ "ComputeManagementClient", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_01/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_01/_compute_management_client.py index e9f8439410a2a..233d77a1782c6 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_01/_compute_management_client.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_01/_compute_management_client.py @@ -48,11 +48,10 @@ ) if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class ComputeManagementClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes +class ComputeManagementClient: # pylint: disable=too-many-instance-attributes """Compute Client. :ivar operations: Operations operations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_01/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_01/_configuration.py index 93a3a28bb4291..f1a526dcf7315 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_01/_configuration.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_01/_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 ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ComputeManagementClient. Note that all parameters used to create this instance are saved as instance diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_01/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_01/_version.py index d79b2760319c5..e5754a47ce68f 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_01/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "33.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_01/aio/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_01/aio/__init__.py index 0715f50185586..d3fd1ba93379a 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_01/aio/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_01/aio/__init__.py @@ -5,12 +5,18 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._compute_management_client import ComputeManagementClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._compute_management_client import ComputeManagementClient # 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__ = [ "ComputeManagementClient", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_01/aio/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_01/aio/_compute_management_client.py index 7f196a52c8647..b78b7633cd3a0 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_01/aio/_compute_management_client.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_01/aio/_compute_management_client.py @@ -48,11 +48,10 @@ ) if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class ComputeManagementClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes +class ComputeManagementClient: # pylint: disable=too-many-instance-attributes """Compute Client. :ivar operations: Operations operations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_01/aio/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_01/aio/_configuration.py index 8c69c5e846101..9fd5c8d796d81 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_01/aio/_configuration.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_01/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 ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ComputeManagementClient. Note that all parameters used to create this instance are saved as instance diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_01/aio/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_01/aio/operations/__init__.py index 3cc8e8e7a73a8..5cc9a11e23416 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_01/aio/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_01/aio/operations/__init__.py @@ -5,36 +5,42 @@ # Code generated by Microsoft (R) AutoRest 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 UsageOperations -from ._operations import VirtualMachineSizesOperations -from ._operations import VirtualMachineScaleSetsOperations -from ._operations import VirtualMachineScaleSetExtensionsOperations -from ._operations import VirtualMachineScaleSetRollingUpgradesOperations -from ._operations import VirtualMachineScaleSetVMExtensionsOperations -from ._operations import VirtualMachineScaleSetVMsOperations -from ._operations import VirtualMachineExtensionsOperations -from ._operations import VirtualMachinesOperations -from ._operations import VirtualMachineImagesOperations -from ._operations import VirtualMachineImagesEdgeZoneOperations -from ._operations import VirtualMachineExtensionImagesOperations -from ._operations import AvailabilitySetsOperations -from ._operations import ProximityPlacementGroupsOperations -from ._operations import DedicatedHostGroupsOperations -from ._operations import DedicatedHostsOperations -from ._operations import SshPublicKeysOperations -from ._operations import ImagesOperations -from ._operations import RestorePointCollectionsOperations -from ._operations import RestorePointsOperations -from ._operations import CapacityReservationGroupsOperations -from ._operations import CapacityReservationsOperations -from ._operations import LogAnalyticsOperations -from ._operations import VirtualMachineRunCommandsOperations -from ._operations import VirtualMachineScaleSetVMRunCommandsOperations +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 UsageOperations # type: ignore +from ._operations import VirtualMachineSizesOperations # type: ignore +from ._operations import VirtualMachineScaleSetsOperations # type: ignore +from ._operations import VirtualMachineScaleSetExtensionsOperations # type: ignore +from ._operations import VirtualMachineScaleSetRollingUpgradesOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMExtensionsOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMsOperations # type: ignore +from ._operations import VirtualMachineExtensionsOperations # type: ignore +from ._operations import VirtualMachinesOperations # type: ignore +from ._operations import VirtualMachineImagesOperations # type: ignore +from ._operations import VirtualMachineImagesEdgeZoneOperations # type: ignore +from ._operations import VirtualMachineExtensionImagesOperations # type: ignore +from ._operations import AvailabilitySetsOperations # type: ignore +from ._operations import ProximityPlacementGroupsOperations # type: ignore +from ._operations import DedicatedHostGroupsOperations # type: ignore +from ._operations import DedicatedHostsOperations # type: ignore +from ._operations import SshPublicKeysOperations # type: ignore +from ._operations import ImagesOperations # type: ignore +from ._operations import RestorePointCollectionsOperations # type: ignore +from ._operations import RestorePointsOperations # type: ignore +from ._operations import CapacityReservationGroupsOperations # type: ignore +from ._operations import CapacityReservationsOperations # type: ignore +from ._operations import LogAnalyticsOperations # type: ignore +from ._operations import VirtualMachineRunCommandsOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMRunCommandsOperations # 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__ = [ @@ -65,5 +71,5 @@ "VirtualMachineRunCommandsOperations", "VirtualMachineScaleSetVMRunCommandsOperations", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_01/aio/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_01/aio/operations/_operations.py index 9ae527031415d..7a1eca4f0463d 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_01/aio/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_01/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. @@ -8,21 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import ( - Any, - AsyncIterable, - AsyncIterator, - Callable, - Dict, - IO, - List, - Optional, - Type, - TypeVar, - Union, - cast, - overload, -) +from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, List, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -224,7 +210,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]] @@ -265,7 +251,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.ComputeOperationValue"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.ComputeOperationListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -362,7 +348,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.Usage"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.ListUsagesResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -462,7 +448,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.VirtualMa api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -563,7 +549,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> AsyncIterable["_mode api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -631,7 +617,7 @@ async def _create_or_update_initial( parameters: Union[_models.VirtualMachineScaleSet, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -823,7 +809,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineScaleSetUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1012,7 +998,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, *, force_deletion: Optional[bool] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1141,7 +1127,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_08_01.models.VirtualMachineScaleSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1191,7 +1177,7 @@ async def _deallocate_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1388,7 +1374,7 @@ async def _delete_instances_initial( force_deletion: Optional[bool] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1596,7 +1582,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2022_08_01.models.VirtualMachineScaleSetInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1656,7 +1642,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1735,7 +1721,7 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.VirtualMachineScaleS api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.VirtualMachineScaleSetListWithLinkResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1818,7 +1804,7 @@ def list_skus( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.VirtualMachineScaleSetListSkusResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1884,6 +1870,7 @@ async def get_next(next_link=None): def get_os_upgrade_history( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> AsyncIterable["_models.UpgradeOperationHistoricalStatusInfo"]: + # pylint: disable=line-too-long """Gets list of OS upgrades on a VM scale set instance. :param resource_group_name: The name of the resource group. Required. @@ -1902,7 +1889,7 @@ def get_os_upgrade_history( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.VirtualMachineScaleSetListOSUpgradeHistory] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1973,7 +1960,7 @@ async def _power_off_initial( skip_shutdown: bool = False, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2186,7 +2173,7 @@ async def _restart_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2375,7 +2362,7 @@ async def _start_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2564,7 +2551,7 @@ async def _redeploy_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2756,7 +2743,7 @@ async def _perform_maintenance_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2954,7 +2941,7 @@ async def _update_instances_initial( vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3140,7 +3127,7 @@ async def _reimage_initial( vm_scale_set_reimage_input: Optional[Union[_models.VirtualMachineScaleSetReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3333,7 +3320,7 @@ async def _reimage_all_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3549,7 +3536,7 @@ async def force_recovery_service_fabric_platform_update_domain_walk( # pylint: :rtype: ~azure.mgmt.compute.v2022_08_01.models.RecoveryWalkResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3595,7 +3582,7 @@ async def force_recovery_service_fabric_platform_update_domain_walk( # pylint: return deserialized # type: ignore @overload - async def convert_to_single_placement_group( # pylint: disable=inconsistent-return-statements + async def convert_to_single_placement_group( self, resource_group_name: str, vm_scale_set_name: str, @@ -3623,7 +3610,7 @@ async def convert_to_single_placement_group( # pylint: disable=inconsistent-ret """ @overload - async def convert_to_single_placement_group( # pylint: disable=inconsistent-return-statements + async def convert_to_single_placement_group( self, resource_group_name: str, vm_scale_set_name: str, @@ -3650,7 +3637,7 @@ async def convert_to_single_placement_group( # pylint: disable=inconsistent-ret """ @distributed_trace_async - async def convert_to_single_placement_group( # pylint: disable=inconsistent-return-statements + async def convert_to_single_placement_group( self, resource_group_name: str, vm_scale_set_name: str, @@ -3673,7 +3660,7 @@ async def convert_to_single_placement_group( # pylint: disable=inconsistent-ret :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3730,7 +3717,7 @@ async def _set_orchestration_service_state_initial( parameters: Union[_models.OrchestrationServiceStateInput, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3938,7 +3925,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtension, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4149,7 +4136,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtensionUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4356,7 +4343,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, vmss_extension_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4486,7 +4473,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_08_01.models.VirtualMachineScaleSetExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4552,7 +4539,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.VirtualMachineScaleSetExtensionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4638,7 +4625,7 @@ def __init__(self, *args, **kwargs) -> None: async def _cancel_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4742,7 +4729,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_os_upgrade_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4848,7 +4835,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_extension_upgrade_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4965,7 +4952,7 @@ async def get_latest( :rtype: ~azure.mgmt.compute.v2022_08_01.models.RollingUpgradeStatusInfo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5037,7 +5024,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetVMExtension, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5257,7 +5244,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetVMExtensionUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5472,7 +5459,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, vm_extension_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5608,7 +5595,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_08_01.models.VirtualMachineScaleSetVMExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5677,7 +5664,7 @@ async def list( :rtype: ~azure.mgmt.compute.v2022_08_01.models.VirtualMachineScaleSetVMExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5754,7 +5741,7 @@ async def _reimage_initial( ] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5953,7 +5940,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _reimage_all_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6062,7 +6049,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _deallocate_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6177,7 +6164,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineScaleSetVM, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6387,7 +6374,7 @@ async def _delete_initial( force_deletion: Optional[bool] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6529,7 +6516,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_08_01.models.VirtualMachineScaleSetVM :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6589,7 +6576,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2022_08_01.models.VirtualMachineScaleSetVMInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6671,7 +6658,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.VirtualMachineScaleSetVMListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6745,7 +6732,7 @@ async def _power_off_initial( skip_shutdown: bool = False, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6867,7 +6854,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _restart_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6975,7 +6962,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7083,7 +7070,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _redeploy_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7217,7 +7204,7 @@ async def retrieve_boot_diagnostics_data( :rtype: ~azure.mgmt.compute.v2022_08_01.models.RetrieveBootDiagnosticsDataResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7264,7 +7251,7 @@ async def retrieve_boot_diagnostics_data( async def _perform_maintenance_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7370,7 +7357,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace_async - async def simulate_eviction( # pylint: disable=inconsistent-return-statements + async def simulate_eviction( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: """The operation to simulate the eviction of spot virtual machine in a VM scale set. @@ -7385,7 +7372,7 @@ async def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7432,7 +7419,7 @@ async def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7659,7 +7646,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineExtension, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7869,7 +7856,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineExtensionUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8075,7 +8062,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_name: str, vm_extension_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8205,7 +8192,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_08_01.models.VirtualMachineExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8265,7 +8252,7 @@ async def list( :rtype: ~azure.mgmt.compute.v2022_08_01.models.VirtualMachineExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8347,7 +8334,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> AsyncIterable["_mode api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8415,7 +8402,7 @@ async def _capture_initial( parameters: Union[_models.VirtualMachineCaptureParameters, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8613,7 +8600,7 @@ async def _create_or_update_initial( parameters: Union[_models.VirtualMachine, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8808,7 +8795,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8996,7 +8983,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_name: str, *, force_deletion: Optional[bool] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9127,7 +9114,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_08_01.models.VirtualMachine :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9184,7 +9171,7 @@ async def instance_view( :rtype: ~azure.mgmt.compute.v2022_08_01.models.VirtualMachineInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9229,7 +9216,7 @@ async def instance_view( async def _convert_to_managed_disks_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9334,7 +9321,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _deallocate_initial( self, resource_group_name: str, vm_name: str, *, hibernate: Optional[bool] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9442,9 +9429,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace_async - async def generalize( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, vm_name: str, **kwargs: Any - ) -> None: + async def generalize(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> None: """Sets the OS state of the virtual machine to generalized. It is recommended to sysprep the virtual machine before performing this operation. :code:`
`For Windows, please refer to `Create a managed image of a generalized VM in Azure @@ -9460,7 +9445,7 @@ async def generalize( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9502,6 +9487,7 @@ async def generalize( # pylint: disable=inconsistent-return-statements def list( self, resource_group_name: str, *, filter: Optional[str] = None, **kwargs: Any ) -> AsyncIterable["_models.VirtualMachine"]: + # pylint: disable=line-too-long """Lists all of the virtual machines in the specified resource group. Use the nextLink property in the response to get the next page of virtual machines. @@ -9523,7 +9509,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9589,6 +9575,7 @@ async def get_next(next_link=None): def list_all( self, *, status_only: Optional[str] = None, filter: Optional[str] = None, **kwargs: Any ) -> AsyncIterable["_models.VirtualMachine"]: + # pylint: disable=line-too-long """Lists all of the virtual machines in the specified subscription. Use the nextLink property in the response to get the next page of virtual machines. @@ -9611,7 +9598,7 @@ def list_all( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9695,7 +9682,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9760,7 +9747,7 @@ async def get_next(next_link=None): async def _power_off_initial( self, resource_group_name: str, vm_name: str, *, skip_shutdown: bool = False, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9869,7 +9856,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _reapply_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9969,7 +9956,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _restart_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10069,7 +10056,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _start_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10169,7 +10156,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _redeploy_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10275,7 +10262,7 @@ async def _reimage_initial( parameters: Optional[Union[_models.VirtualMachineReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10480,7 +10467,7 @@ async def retrieve_boot_diagnostics_data( :rtype: ~azure.mgmt.compute.v2022_08_01.models.RetrieveBootDiagnosticsDataResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10526,7 +10513,7 @@ async def retrieve_boot_diagnostics_data( async def _perform_maintenance_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10628,9 +10615,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace_async - async def simulate_eviction( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, vm_name: str, **kwargs: Any - ) -> None: + async def simulate_eviction(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> None: """The operation to simulate the eviction of spot virtual machine. :param resource_group_name: The name of the resource group. Required. @@ -10641,7 +10626,7 @@ async def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10682,7 +10667,7 @@ async def simulate_eviction( # pylint: disable=inconsistent-return-statements async def _assess_patches_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10798,7 +10783,7 @@ async def _install_patches_initial( install_patches_input: Union[_models.VirtualMachineInstallPatchesParameters, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10996,7 +10981,7 @@ async def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11224,7 +11209,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_08_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11303,7 +11288,7 @@ async def list( :rtype: list[~azure.mgmt.compute.v2022_08_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11364,7 +11349,7 @@ async def list_offers( :rtype: list[~azure.mgmt.compute.v2022_08_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11416,7 +11401,7 @@ async def list_publishers(self, location: str, **kwargs: Any) -> List[_models.Vi :rtype: list[~azure.mgmt.compute.v2022_08_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11473,7 +11458,7 @@ async def list_skus( :rtype: list[~azure.mgmt.compute.v2022_08_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11530,7 +11515,7 @@ async def list_by_edge_zone( :rtype: ~azure.mgmt.compute.v2022_08_01.models.VmImagesInEdgeZoneListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11615,7 +11600,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_08_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11700,7 +11685,7 @@ async def list( :rtype: list[~azure.mgmt.compute.v2022_08_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11765,7 +11750,7 @@ async def list_offers( :rtype: list[~azure.mgmt.compute.v2022_08_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11822,7 +11807,7 @@ async def list_publishers( :rtype: list[~azure.mgmt.compute.v2022_08_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11883,7 +11868,7 @@ async def list_skus( :rtype: list[~azure.mgmt.compute.v2022_08_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11966,7 +11951,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_08_01.models.VirtualMachineExtensionImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12024,7 +12009,7 @@ async def list_types( :rtype: list[~azure.mgmt.compute.v2022_08_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12096,7 +12081,7 @@ async def list_versions( :rtype: list[~azure.mgmt.compute.v2022_08_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12236,7 +12221,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2022_08_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12363,7 +12348,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2022_08_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12418,9 +12403,7 @@ async def update( return deserialized # type: ignore @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, availability_set_name: str, **kwargs: Any - ) -> None: + async def delete(self, resource_group_name: str, availability_set_name: str, **kwargs: Any) -> None: """Delete an availability set. :param resource_group_name: The name of the resource group. Required. @@ -12431,7 +12414,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12481,7 +12464,7 @@ async def get(self, resource_group_name: str, availability_set_name: str, **kwar :rtype: ~azure.mgmt.compute.v2022_08_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12543,7 +12526,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12621,7 +12604,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12704,7 +12687,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12862,7 +12845,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2022_08_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12992,7 +12975,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2022_08_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13047,9 +13030,7 @@ async def update( return deserialized # type: ignore @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, proximity_placement_group_name: str, **kwargs: Any - ) -> None: + async def delete(self, resource_group_name: str, proximity_placement_group_name: str, **kwargs: Any) -> None: """Delete a proximity placement group. :param resource_group_name: The name of the resource group. Required. @@ -13060,7 +13041,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13120,7 +13101,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_08_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13179,7 +13160,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Proximit api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13259,7 +13240,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13420,7 +13401,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2022_08_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13547,7 +13528,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2022_08_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13602,9 +13583,7 @@ async def update( return deserialized # type: ignore @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, host_group_name: str, **kwargs: Any - ) -> None: + async def delete(self, resource_group_name: str, host_group_name: str, **kwargs: Any) -> None: """Delete a dedicated host group. :param resource_group_name: The name of the resource group. Required. @@ -13615,7 +13594,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13677,7 +13656,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_08_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13740,7 +13719,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13817,7 +13796,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Dedicate api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13906,7 +13885,7 @@ async def _create_or_update_initial( parameters: Union[_models.DedicatedHost, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14110,7 +14089,7 @@ async def _update_initial( parameters: Union[_models.DedicatedHostUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14309,7 +14288,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14440,7 +14419,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_08_01.models.DedicatedHost :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14506,7 +14485,7 @@ def list_by_host_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.DedicatedHostListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14571,7 +14550,7 @@ async def get_next(next_link=None): async def _restart_initial( self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14717,7 +14696,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.SshPubli api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14798,7 +14777,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14932,7 +14911,7 @@ async def create( :rtype: ~azure.mgmt.compute.v2022_08_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15060,7 +15039,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2022_08_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15115,9 +15094,7 @@ async def update( return deserialized # type: ignore @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, ssh_public_key_name: str, **kwargs: Any - ) -> None: + async def delete(self, resource_group_name: str, ssh_public_key_name: str, **kwargs: Any) -> None: """Delete an SSH public key. :param resource_group_name: The name of the resource group. Required. @@ -15128,7 +15105,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15180,7 +15157,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_08_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15238,7 +15215,7 @@ async def generate_key_pair( :rtype: ~azure.mgmt.compute.v2022_08_01.models.SshPublicKeyGenerateKeyPairResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15304,7 +15281,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, image_name: str, parameters: Union[_models.Image, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15486,7 +15463,7 @@ async def _update_initial( parameters: Union[_models.ImageUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15666,7 +15643,7 @@ def get_long_running_output(pipeline_response): ) async def _delete_initial(self, resource_group_name: str, image_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15781,7 +15758,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_08_01.models.Image :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15840,7 +15817,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15916,7 +15893,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Image"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16078,7 +16055,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2022_08_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16208,7 +16185,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2022_08_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16265,7 +16242,7 @@ async def update( async def _delete_initial( self, resource_group_name: str, restore_point_collection_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16391,7 +16368,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_08_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16452,7 +16429,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.RestorePointCollectionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16531,7 +16508,7 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.RestorePointCollecti api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.RestorePointCollectionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16620,7 +16597,7 @@ async def _create_initial( parameters: Union[_models.RestorePoint, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16819,7 +16796,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, restore_point_collection_name: str, restore_point_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16949,7 +16926,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_08_01.models.RestorePoint :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17093,7 +17070,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2022_08_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17226,7 +17203,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2022_08_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17281,9 +17258,7 @@ async def update( return deserialized # type: ignore @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, capacity_reservation_group_name: str, **kwargs: Any - ) -> None: + async def delete(self, resource_group_name: str, capacity_reservation_group_name: str, **kwargs: Any) -> None: """The operation to delete a capacity reservation group. This operation is allowed only if all the associated resources are disassociated from the reservation group and all capacity reservations under the reservation group have also been deleted. Please refer to @@ -17297,7 +17272,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17361,7 +17336,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_08_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17435,7 +17410,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.CapacityReservationGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17522,7 +17497,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.CapacityReservationGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17612,7 +17587,7 @@ async def _create_or_update_initial( parameters: Union[_models.CapacityReservation, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17822,7 +17797,7 @@ async def _update_initial( parameters: Union[_models.CapacityReservationUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18025,7 +18000,7 @@ async def _delete_initial( capacity_reservation_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18163,7 +18138,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_08_01.models.CapacityReservation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18229,7 +18204,7 @@ def list_by_capacity_reservation_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.CapacityReservationListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18315,7 +18290,7 @@ def __init__(self, *args, **kwargs) -> None: async def _export_request_rate_by_interval_initial( self, location: str, parameters: Union[_models.RequestRateByIntervalInput, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18493,7 +18468,7 @@ def get_long_running_output(pipeline_response): async def _export_throttled_requests_initial( self, location: str, parameters: Union[_models.ThrottledRequestsInput, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18704,7 +18679,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.RunComman api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.RunCommandListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18777,7 +18752,7 @@ async def get(self, location: str, command_id: str, **kwargs: Any) -> _models.Ru :rtype: ~azure.mgmt.compute.v2022_08_01.models.RunCommandDocument :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18827,7 +18802,7 @@ async def _create_or_update_initial( run_command: Union[_models.VirtualMachineRunCommand, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19036,7 +19011,7 @@ async def _update_initial( run_command: Union[_models.VirtualMachineRunCommandUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19241,7 +19216,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_name: str, run_command_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19371,7 +19346,7 @@ async def get_by_virtual_machine( :rtype: ~azure.mgmt.compute.v2022_08_01.models.VirtualMachineRunCommand :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19439,7 +19414,7 @@ def list_by_virtual_machine( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.VirtualMachineRunCommandsListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19532,7 +19507,7 @@ async def _create_or_update_initial( run_command: Union[_models.VirtualMachineRunCommand, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19750,7 +19725,7 @@ async def _update_initial( run_command: Union[_models.VirtualMachineRunCommandUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19963,7 +19938,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, run_command_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20099,7 +20074,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_08_01.models.VirtualMachineRunCommand :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20176,7 +20151,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.VirtualMachineRunCommandsListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_01/models/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_01/models/__init__.py index 69da69e1d9347..dcb4de7b00a9f 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_01/models/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_01/models/__init__.py @@ -5,331 +5,342 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._models_py3 import AdditionalCapabilities -from ._models_py3 import AdditionalUnattendContent -from ._models_py3 import ApiEntityReference -from ._models_py3 import ApiError -from ._models_py3 import ApiErrorBase -from ._models_py3 import ApplicationProfile -from ._models_py3 import AutomaticOSUpgradePolicy -from ._models_py3 import AutomaticOSUpgradeProperties -from ._models_py3 import AutomaticRepairsPolicy -from ._models_py3 import AvailabilitySet -from ._models_py3 import AvailabilitySetListResult -from ._models_py3 import AvailabilitySetUpdate -from ._models_py3 import AvailablePatchSummary -from ._models_py3 import BillingProfile -from ._models_py3 import BootDiagnostics -from ._models_py3 import BootDiagnosticsInstanceView -from ._models_py3 import CapacityReservation -from ._models_py3 import CapacityReservationGroup -from ._models_py3 import CapacityReservationGroupInstanceView -from ._models_py3 import CapacityReservationGroupListResult -from ._models_py3 import CapacityReservationGroupUpdate -from ._models_py3 import CapacityReservationInstanceView -from ._models_py3 import CapacityReservationInstanceViewWithName -from ._models_py3 import CapacityReservationListResult -from ._models_py3 import CapacityReservationProfile -from ._models_py3 import CapacityReservationUpdate -from ._models_py3 import CapacityReservationUtilization -from ._models_py3 import ComputeOperationListResult -from ._models_py3 import ComputeOperationValue -from ._models_py3 import DataDisk -from ._models_py3 import DataDiskImage -from ._models_py3 import DedicatedHost -from ._models_py3 import DedicatedHostAllocatableVM -from ._models_py3 import DedicatedHostAvailableCapacity -from ._models_py3 import DedicatedHostGroup -from ._models_py3 import DedicatedHostGroupInstanceView -from ._models_py3 import DedicatedHostGroupListResult -from ._models_py3 import DedicatedHostGroupPropertiesAdditionalCapabilities -from ._models_py3 import DedicatedHostGroupUpdate -from ._models_py3 import DedicatedHostInstanceView -from ._models_py3 import DedicatedHostInstanceViewWithName -from ._models_py3 import DedicatedHostListResult -from ._models_py3 import DedicatedHostUpdate -from ._models_py3 import DiagnosticsProfile -from ._models_py3 import DiffDiskSettings -from ._models_py3 import DisallowedConfiguration -from ._models_py3 import DiskEncryptionSetParameters -from ._models_py3 import DiskEncryptionSettings -from ._models_py3 import DiskInstanceView -from ._models_py3 import DiskRestorePointInstanceView -from ._models_py3 import DiskRestorePointReplicationStatus -from ._models_py3 import ExtendedLocation -from ._models_py3 import HardwareProfile -from ._models_py3 import Image -from ._models_py3 import ImageDataDisk -from ._models_py3 import ImageDisk -from ._models_py3 import ImageListResult -from ._models_py3 import ImageOSDisk -from ._models_py3 import ImageReference -from ._models_py3 import ImageStorageProfile -from ._models_py3 import ImageUpdate -from ._models_py3 import InnerError -from ._models_py3 import InstanceViewStatus -from ._models_py3 import KeyVaultKeyReference -from ._models_py3 import KeyVaultSecretReference -from ._models_py3 import LastPatchInstallationSummary -from ._models_py3 import LinuxConfiguration -from ._models_py3 import LinuxParameters -from ._models_py3 import LinuxPatchSettings -from ._models_py3 import LinuxVMGuestPatchAutomaticByPlatformSettings -from ._models_py3 import ListUsagesResult -from ._models_py3 import LogAnalyticsInputBase -from ._models_py3 import LogAnalyticsOperationResult -from ._models_py3 import LogAnalyticsOutput -from ._models_py3 import MaintenanceRedeployStatus -from ._models_py3 import ManagedDiskParameters -from ._models_py3 import NetworkInterfaceReference -from ._models_py3 import NetworkProfile -from ._models_py3 import OSDisk -from ._models_py3 import OSDiskImage -from ._models_py3 import OSProfile -from ._models_py3 import OrchestrationServiceStateInput -from ._models_py3 import OrchestrationServiceSummary -from ._models_py3 import PatchInstallationDetail -from ._models_py3 import PatchSettings -from ._models_py3 import Plan -from ._models_py3 import PriorityMixPolicy -from ._models_py3 import ProximityPlacementGroup -from ._models_py3 import ProximityPlacementGroupListResult -from ._models_py3 import ProximityPlacementGroupPropertiesIntent -from ._models_py3 import ProximityPlacementGroupUpdate -from ._models_py3 import ProxyResource -from ._models_py3 import PublicIPAddressSku -from ._models_py3 import PurchasePlan -from ._models_py3 import RecoveryWalkResponse -from ._models_py3 import RequestRateByIntervalInput -from ._models_py3 import Resource -from ._models_py3 import ResourceWithOptionalLocation -from ._models_py3 import RestorePoint -from ._models_py3 import RestorePointCollection -from ._models_py3 import RestorePointCollectionListResult -from ._models_py3 import RestorePointCollectionSourceProperties -from ._models_py3 import RestorePointCollectionUpdate -from ._models_py3 import RestorePointInstanceView -from ._models_py3 import RestorePointSourceMetadata -from ._models_py3 import RestorePointSourceVMDataDisk -from ._models_py3 import RestorePointSourceVMOSDisk -from ._models_py3 import RestorePointSourceVMStorageProfile -from ._models_py3 import RetrieveBootDiagnosticsDataResult -from ._models_py3 import RollbackStatusInfo -from ._models_py3 import RollingUpgradePolicy -from ._models_py3 import RollingUpgradeProgressInfo -from ._models_py3 import RollingUpgradeRunningStatus -from ._models_py3 import RollingUpgradeStatusInfo -from ._models_py3 import RunCommandDocument -from ._models_py3 import RunCommandDocumentBase -from ._models_py3 import RunCommandInput -from ._models_py3 import RunCommandInputParameter -from ._models_py3 import RunCommandListResult -from ._models_py3 import RunCommandParameterDefinition -from ._models_py3 import RunCommandResult -from ._models_py3 import ScaleInPolicy -from ._models_py3 import ScheduledEventsProfile -from ._models_py3 import SecurityProfile -from ._models_py3 import Sku -from ._models_py3 import SpotRestorePolicy -from ._models_py3 import SshConfiguration -from ._models_py3 import SshPublicKey -from ._models_py3 import SshPublicKeyGenerateKeyPairResult -from ._models_py3 import SshPublicKeyResource -from ._models_py3 import SshPublicKeyUpdateResource -from ._models_py3 import SshPublicKeysGroupListResult -from ._models_py3 import StorageProfile -from ._models_py3 import SubResource -from ._models_py3 import SubResourceReadOnly -from ._models_py3 import SubResourceWithColocationStatus -from ._models_py3 import SystemData -from ._models_py3 import TerminateNotificationProfile -from ._models_py3 import ThrottledRequestsInput -from ._models_py3 import UefiSettings -from ._models_py3 import UpdateResource -from ._models_py3 import UpgradeOperationHistoricalStatusInfo -from ._models_py3 import UpgradeOperationHistoricalStatusInfoProperties -from ._models_py3 import UpgradeOperationHistoryStatus -from ._models_py3 import UpgradePolicy -from ._models_py3 import Usage -from ._models_py3 import UsageName -from ._models_py3 import UserAssignedIdentitiesValue -from ._models_py3 import VMDiskSecurityProfile -from ._models_py3 import VMGalleryApplication -from ._models_py3 import VMScaleSetConvertToSinglePlacementGroupInput -from ._models_py3 import VMSizeProperties -from ._models_py3 import VaultCertificate -from ._models_py3 import VaultSecretGroup -from ._models_py3 import VirtualHardDisk -from ._models_py3 import VirtualMachine -from ._models_py3 import VirtualMachineAgentInstanceView -from ._models_py3 import VirtualMachineAssessPatchesResult -from ._models_py3 import VirtualMachineCaptureParameters -from ._models_py3 import VirtualMachineCaptureResult -from ._models_py3 import VirtualMachineExtension -from ._models_py3 import VirtualMachineExtensionHandlerInstanceView -from ._models_py3 import VirtualMachineExtensionImage -from ._models_py3 import VirtualMachineExtensionInstanceView -from ._models_py3 import VirtualMachineExtensionUpdate -from ._models_py3 import VirtualMachineExtensionsListResult -from ._models_py3 import VirtualMachineHealthStatus -from ._models_py3 import VirtualMachineIdentity -from ._models_py3 import VirtualMachineImage -from ._models_py3 import VirtualMachineImageFeature -from ._models_py3 import VirtualMachineImageResource -from ._models_py3 import VirtualMachineInstallPatchesParameters -from ._models_py3 import VirtualMachineInstallPatchesResult -from ._models_py3 import VirtualMachineInstanceView -from ._models_py3 import VirtualMachineIpTag -from ._models_py3 import VirtualMachineListResult -from ._models_py3 import VirtualMachineNetworkInterfaceConfiguration -from ._models_py3 import VirtualMachineNetworkInterfaceDnsSettingsConfiguration -from ._models_py3 import VirtualMachineNetworkInterfaceIPConfiguration -from ._models_py3 import VirtualMachinePatchStatus -from ._models_py3 import VirtualMachinePublicIPAddressConfiguration -from ._models_py3 import VirtualMachinePublicIPAddressDnsSettingsConfiguration -from ._models_py3 import VirtualMachineReimageParameters -from ._models_py3 import VirtualMachineRunCommand -from ._models_py3 import VirtualMachineRunCommandInstanceView -from ._models_py3 import VirtualMachineRunCommandScriptSource -from ._models_py3 import VirtualMachineRunCommandUpdate -from ._models_py3 import VirtualMachineRunCommandsListResult -from ._models_py3 import VirtualMachineScaleSet -from ._models_py3 import VirtualMachineScaleSetDataDisk -from ._models_py3 import VirtualMachineScaleSetExtension -from ._models_py3 import VirtualMachineScaleSetExtensionListResult -from ._models_py3 import VirtualMachineScaleSetExtensionProfile -from ._models_py3 import VirtualMachineScaleSetExtensionUpdate -from ._models_py3 import VirtualMachineScaleSetHardwareProfile -from ._models_py3 import VirtualMachineScaleSetIPConfiguration -from ._models_py3 import VirtualMachineScaleSetIdentity -from ._models_py3 import VirtualMachineScaleSetInstanceView -from ._models_py3 import VirtualMachineScaleSetInstanceViewStatusesSummary -from ._models_py3 import VirtualMachineScaleSetIpTag -from ._models_py3 import VirtualMachineScaleSetListOSUpgradeHistory -from ._models_py3 import VirtualMachineScaleSetListResult -from ._models_py3 import VirtualMachineScaleSetListSkusResult -from ._models_py3 import VirtualMachineScaleSetListWithLinkResult -from ._models_py3 import VirtualMachineScaleSetManagedDiskParameters -from ._models_py3 import VirtualMachineScaleSetNetworkConfiguration -from ._models_py3 import VirtualMachineScaleSetNetworkConfigurationDnsSettings -from ._models_py3 import VirtualMachineScaleSetNetworkProfile -from ._models_py3 import VirtualMachineScaleSetOSDisk -from ._models_py3 import VirtualMachineScaleSetOSProfile -from ._models_py3 import VirtualMachineScaleSetPublicIPAddressConfiguration -from ._models_py3 import VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings -from ._models_py3 import VirtualMachineScaleSetReimageParameters -from ._models_py3 import VirtualMachineScaleSetSku -from ._models_py3 import VirtualMachineScaleSetSkuCapacity -from ._models_py3 import VirtualMachineScaleSetStorageProfile -from ._models_py3 import VirtualMachineScaleSetUpdate -from ._models_py3 import VirtualMachineScaleSetUpdateIPConfiguration -from ._models_py3 import VirtualMachineScaleSetUpdateNetworkConfiguration -from ._models_py3 import VirtualMachineScaleSetUpdateNetworkProfile -from ._models_py3 import VirtualMachineScaleSetUpdateOSDisk -from ._models_py3 import VirtualMachineScaleSetUpdateOSProfile -from ._models_py3 import VirtualMachineScaleSetUpdatePublicIPAddressConfiguration -from ._models_py3 import VirtualMachineScaleSetUpdateStorageProfile -from ._models_py3 import VirtualMachineScaleSetUpdateVMProfile -from ._models_py3 import VirtualMachineScaleSetVM -from ._models_py3 import VirtualMachineScaleSetVMExtension -from ._models_py3 import VirtualMachineScaleSetVMExtensionUpdate -from ._models_py3 import VirtualMachineScaleSetVMExtensionsListResult -from ._models_py3 import VirtualMachineScaleSetVMExtensionsSummary -from ._models_py3 import VirtualMachineScaleSetVMInstanceIDs -from ._models_py3 import VirtualMachineScaleSetVMInstanceRequiredIDs -from ._models_py3 import VirtualMachineScaleSetVMInstanceView -from ._models_py3 import VirtualMachineScaleSetVMListResult -from ._models_py3 import VirtualMachineScaleSetVMNetworkProfileConfiguration -from ._models_py3 import VirtualMachineScaleSetVMProfile -from ._models_py3 import VirtualMachineScaleSetVMProtectionPolicy -from ._models_py3 import VirtualMachineScaleSetVMReimageParameters -from ._models_py3 import VirtualMachineSize -from ._models_py3 import VirtualMachineSizeListResult -from ._models_py3 import VirtualMachineSoftwarePatchProperties -from ._models_py3 import VirtualMachineStatusCodeCount -from ._models_py3 import VirtualMachineUpdate -from ._models_py3 import VmImagesInEdgeZoneListResult -from ._models_py3 import WinRMConfiguration -from ._models_py3 import WinRMListener -from ._models_py3 import WindowsConfiguration -from ._models_py3 import WindowsParameters -from ._models_py3 import WindowsVMGuestPatchAutomaticByPlatformSettings +from typing import TYPE_CHECKING -from ._compute_management_client_enums import ArchitectureTypes -from ._compute_management_client_enums import AvailabilitySetSkuTypes -from ._compute_management_client_enums import CachingTypes -from ._compute_management_client_enums import CapacityReservationGroupInstanceViewTypes -from ._compute_management_client_enums import CapacityReservationInstanceViewTypes -from ._compute_management_client_enums import ConsistencyModeTypes -from ._compute_management_client_enums import DedicatedHostLicenseTypes -from ._compute_management_client_enums import DeleteOptions -from ._compute_management_client_enums import DiffDiskOptions -from ._compute_management_client_enums import DiffDiskPlacement -from ._compute_management_client_enums import DiskControllerTypes -from ._compute_management_client_enums import DiskCreateOptionTypes -from ._compute_management_client_enums import DiskDeleteOptionTypes -from ._compute_management_client_enums import DiskDetachOptionTypes -from ._compute_management_client_enums import ExecutionState -from ._compute_management_client_enums import ExpandTypesForGetCapacityReservationGroups -from ._compute_management_client_enums import ExpandTypesForGetVMScaleSets -from ._compute_management_client_enums import ExtendedLocationTypes -from ._compute_management_client_enums import HyperVGenerationType -from ._compute_management_client_enums import HyperVGenerationTypes -from ._compute_management_client_enums import IPVersion -from ._compute_management_client_enums import IPVersions -from ._compute_management_client_enums import InstanceViewTypes -from ._compute_management_client_enums import IntervalInMins -from ._compute_management_client_enums import LinuxPatchAssessmentMode -from ._compute_management_client_enums import LinuxVMGuestPatchAutomaticByPlatformRebootSetting -from ._compute_management_client_enums import LinuxVMGuestPatchMode -from ._compute_management_client_enums import MaintenanceOperationResultCodeTypes -from ._compute_management_client_enums import NetworkApiVersion -from ._compute_management_client_enums import OperatingSystemStateTypes -from ._compute_management_client_enums import OperatingSystemType -from ._compute_management_client_enums import OperatingSystemTypes -from ._compute_management_client_enums import OrchestrationMode -from ._compute_management_client_enums import OrchestrationServiceNames -from ._compute_management_client_enums import OrchestrationServiceState -from ._compute_management_client_enums import OrchestrationServiceStateAction -from ._compute_management_client_enums import PatchAssessmentState -from ._compute_management_client_enums import PatchInstallationState -from ._compute_management_client_enums import PatchOperationStatus -from ._compute_management_client_enums import ProtocolTypes -from ._compute_management_client_enums import ProximityPlacementGroupType -from ._compute_management_client_enums import PublicIPAddressSkuName -from ._compute_management_client_enums import PublicIPAddressSkuTier -from ._compute_management_client_enums import PublicIPAllocationMethod -from ._compute_management_client_enums import RepairAction -from ._compute_management_client_enums import ResourceIdentityType -from ._compute_management_client_enums import RestorePointCollectionExpandOptions -from ._compute_management_client_enums import RestorePointExpandOptions -from ._compute_management_client_enums import RollingUpgradeActionType -from ._compute_management_client_enums import RollingUpgradeStatusCode -from ._compute_management_client_enums import SecurityEncryptionTypes -from ._compute_management_client_enums import SecurityTypes -from ._compute_management_client_enums import SettingNames -from ._compute_management_client_enums import StatusLevelTypes -from ._compute_management_client_enums import StorageAccountTypes -from ._compute_management_client_enums import UpgradeMode -from ._compute_management_client_enums import UpgradeOperationInvoker -from ._compute_management_client_enums import UpgradeState -from ._compute_management_client_enums import VMGuestPatchClassificationLinux -from ._compute_management_client_enums import VMGuestPatchClassificationWindows -from ._compute_management_client_enums import VMGuestPatchRebootBehavior -from ._compute_management_client_enums import VMGuestPatchRebootSetting -from ._compute_management_client_enums import VMGuestPatchRebootStatus -from ._compute_management_client_enums import VirtualMachineEvictionPolicyTypes -from ._compute_management_client_enums import VirtualMachinePriorityTypes -from ._compute_management_client_enums import VirtualMachineScaleSetScaleInRules -from ._compute_management_client_enums import VirtualMachineScaleSetSkuScaleType -from ._compute_management_client_enums import VirtualMachineSizeTypes -from ._compute_management_client_enums import VmDiskTypes -from ._compute_management_client_enums import WindowsPatchAssessmentMode -from ._compute_management_client_enums import WindowsVMGuestPatchAutomaticByPlatformRebootSetting -from ._compute_management_client_enums import WindowsVMGuestPatchMode +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + + +from ._models_py3 import ( # type: ignore + AdditionalCapabilities, + AdditionalUnattendContent, + ApiEntityReference, + ApiError, + ApiErrorBase, + ApplicationProfile, + AutomaticOSUpgradePolicy, + AutomaticOSUpgradeProperties, + AutomaticRepairsPolicy, + AvailabilitySet, + AvailabilitySetListResult, + AvailabilitySetUpdate, + AvailablePatchSummary, + BillingProfile, + BootDiagnostics, + BootDiagnosticsInstanceView, + CapacityReservation, + CapacityReservationGroup, + CapacityReservationGroupInstanceView, + CapacityReservationGroupListResult, + CapacityReservationGroupUpdate, + CapacityReservationInstanceView, + CapacityReservationInstanceViewWithName, + CapacityReservationListResult, + CapacityReservationProfile, + CapacityReservationUpdate, + CapacityReservationUtilization, + ComputeOperationListResult, + ComputeOperationValue, + DataDisk, + DataDiskImage, + DedicatedHost, + DedicatedHostAllocatableVM, + DedicatedHostAvailableCapacity, + DedicatedHostGroup, + DedicatedHostGroupInstanceView, + DedicatedHostGroupListResult, + DedicatedHostGroupPropertiesAdditionalCapabilities, + DedicatedHostGroupUpdate, + DedicatedHostInstanceView, + DedicatedHostInstanceViewWithName, + DedicatedHostListResult, + DedicatedHostUpdate, + DiagnosticsProfile, + DiffDiskSettings, + DisallowedConfiguration, + DiskEncryptionSetParameters, + DiskEncryptionSettings, + DiskInstanceView, + DiskRestorePointInstanceView, + DiskRestorePointReplicationStatus, + ExtendedLocation, + HardwareProfile, + Image, + ImageDataDisk, + ImageDisk, + ImageListResult, + ImageOSDisk, + ImageReference, + ImageStorageProfile, + ImageUpdate, + InnerError, + InstanceViewStatus, + KeyVaultKeyReference, + KeyVaultSecretReference, + LastPatchInstallationSummary, + LinuxConfiguration, + LinuxParameters, + LinuxPatchSettings, + LinuxVMGuestPatchAutomaticByPlatformSettings, + ListUsagesResult, + LogAnalyticsInputBase, + LogAnalyticsOperationResult, + LogAnalyticsOutput, + MaintenanceRedeployStatus, + ManagedDiskParameters, + NetworkInterfaceReference, + NetworkProfile, + OSDisk, + OSDiskImage, + OSProfile, + OrchestrationServiceStateInput, + OrchestrationServiceSummary, + PatchInstallationDetail, + PatchSettings, + Plan, + PriorityMixPolicy, + ProximityPlacementGroup, + ProximityPlacementGroupListResult, + ProximityPlacementGroupPropertiesIntent, + ProximityPlacementGroupUpdate, + ProxyResource, + PublicIPAddressSku, + PurchasePlan, + RecoveryWalkResponse, + RequestRateByIntervalInput, + Resource, + ResourceWithOptionalLocation, + RestorePoint, + RestorePointCollection, + RestorePointCollectionListResult, + RestorePointCollectionSourceProperties, + RestorePointCollectionUpdate, + RestorePointInstanceView, + RestorePointSourceMetadata, + RestorePointSourceVMDataDisk, + RestorePointSourceVMOSDisk, + RestorePointSourceVMStorageProfile, + RetrieveBootDiagnosticsDataResult, + RollbackStatusInfo, + RollingUpgradePolicy, + RollingUpgradeProgressInfo, + RollingUpgradeRunningStatus, + RollingUpgradeStatusInfo, + RunCommandDocument, + RunCommandDocumentBase, + RunCommandInput, + RunCommandInputParameter, + RunCommandListResult, + RunCommandParameterDefinition, + RunCommandResult, + ScaleInPolicy, + ScheduledEventsProfile, + SecurityProfile, + Sku, + SpotRestorePolicy, + SshConfiguration, + SshPublicKey, + SshPublicKeyGenerateKeyPairResult, + SshPublicKeyResource, + SshPublicKeyUpdateResource, + SshPublicKeysGroupListResult, + StorageProfile, + SubResource, + SubResourceReadOnly, + SubResourceWithColocationStatus, + SystemData, + TerminateNotificationProfile, + ThrottledRequestsInput, + UefiSettings, + UpdateResource, + UpgradeOperationHistoricalStatusInfo, + UpgradeOperationHistoricalStatusInfoProperties, + UpgradeOperationHistoryStatus, + UpgradePolicy, + Usage, + UsageName, + UserAssignedIdentitiesValue, + VMDiskSecurityProfile, + VMGalleryApplication, + VMScaleSetConvertToSinglePlacementGroupInput, + VMSizeProperties, + VaultCertificate, + VaultSecretGroup, + VirtualHardDisk, + VirtualMachine, + VirtualMachineAgentInstanceView, + VirtualMachineAssessPatchesResult, + VirtualMachineCaptureParameters, + VirtualMachineCaptureResult, + VirtualMachineExtension, + VirtualMachineExtensionHandlerInstanceView, + VirtualMachineExtensionImage, + VirtualMachineExtensionInstanceView, + VirtualMachineExtensionUpdate, + VirtualMachineExtensionsListResult, + VirtualMachineHealthStatus, + VirtualMachineIdentity, + VirtualMachineImage, + VirtualMachineImageFeature, + VirtualMachineImageResource, + VirtualMachineInstallPatchesParameters, + VirtualMachineInstallPatchesResult, + VirtualMachineInstanceView, + VirtualMachineIpTag, + VirtualMachineListResult, + VirtualMachineNetworkInterfaceConfiguration, + VirtualMachineNetworkInterfaceDnsSettingsConfiguration, + VirtualMachineNetworkInterfaceIPConfiguration, + VirtualMachinePatchStatus, + VirtualMachinePublicIPAddressConfiguration, + VirtualMachinePublicIPAddressDnsSettingsConfiguration, + VirtualMachineReimageParameters, + VirtualMachineRunCommand, + VirtualMachineRunCommandInstanceView, + VirtualMachineRunCommandScriptSource, + VirtualMachineRunCommandUpdate, + VirtualMachineRunCommandsListResult, + VirtualMachineScaleSet, + VirtualMachineScaleSetDataDisk, + VirtualMachineScaleSetExtension, + VirtualMachineScaleSetExtensionListResult, + VirtualMachineScaleSetExtensionProfile, + VirtualMachineScaleSetExtensionUpdate, + VirtualMachineScaleSetHardwareProfile, + VirtualMachineScaleSetIPConfiguration, + VirtualMachineScaleSetIdentity, + VirtualMachineScaleSetInstanceView, + VirtualMachineScaleSetInstanceViewStatusesSummary, + VirtualMachineScaleSetIpTag, + VirtualMachineScaleSetListOSUpgradeHistory, + VirtualMachineScaleSetListResult, + VirtualMachineScaleSetListSkusResult, + VirtualMachineScaleSetListWithLinkResult, + VirtualMachineScaleSetManagedDiskParameters, + VirtualMachineScaleSetNetworkConfiguration, + VirtualMachineScaleSetNetworkConfigurationDnsSettings, + VirtualMachineScaleSetNetworkProfile, + VirtualMachineScaleSetOSDisk, + VirtualMachineScaleSetOSProfile, + VirtualMachineScaleSetPublicIPAddressConfiguration, + VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings, + VirtualMachineScaleSetReimageParameters, + VirtualMachineScaleSetSku, + VirtualMachineScaleSetSkuCapacity, + VirtualMachineScaleSetStorageProfile, + VirtualMachineScaleSetUpdate, + VirtualMachineScaleSetUpdateIPConfiguration, + VirtualMachineScaleSetUpdateNetworkConfiguration, + VirtualMachineScaleSetUpdateNetworkProfile, + VirtualMachineScaleSetUpdateOSDisk, + VirtualMachineScaleSetUpdateOSProfile, + VirtualMachineScaleSetUpdatePublicIPAddressConfiguration, + VirtualMachineScaleSetUpdateStorageProfile, + VirtualMachineScaleSetUpdateVMProfile, + VirtualMachineScaleSetVM, + VirtualMachineScaleSetVMExtension, + VirtualMachineScaleSetVMExtensionUpdate, + VirtualMachineScaleSetVMExtensionsListResult, + VirtualMachineScaleSetVMExtensionsSummary, + VirtualMachineScaleSetVMInstanceIDs, + VirtualMachineScaleSetVMInstanceRequiredIDs, + VirtualMachineScaleSetVMInstanceView, + VirtualMachineScaleSetVMListResult, + VirtualMachineScaleSetVMNetworkProfileConfiguration, + VirtualMachineScaleSetVMProfile, + VirtualMachineScaleSetVMProtectionPolicy, + VirtualMachineScaleSetVMReimageParameters, + VirtualMachineSize, + VirtualMachineSizeListResult, + VirtualMachineSoftwarePatchProperties, + VirtualMachineStatusCodeCount, + VirtualMachineUpdate, + VmImagesInEdgeZoneListResult, + WinRMConfiguration, + WinRMListener, + WindowsConfiguration, + WindowsParameters, + WindowsVMGuestPatchAutomaticByPlatformSettings, +) + +from ._compute_management_client_enums import ( # type: ignore + ArchitectureTypes, + AvailabilitySetSkuTypes, + CachingTypes, + CapacityReservationGroupInstanceViewTypes, + CapacityReservationInstanceViewTypes, + ConsistencyModeTypes, + DedicatedHostLicenseTypes, + DeleteOptions, + DiffDiskOptions, + DiffDiskPlacement, + DiskControllerTypes, + DiskCreateOptionTypes, + DiskDeleteOptionTypes, + DiskDetachOptionTypes, + ExecutionState, + ExpandTypesForGetCapacityReservationGroups, + ExpandTypesForGetVMScaleSets, + ExtendedLocationTypes, + HyperVGenerationType, + HyperVGenerationTypes, + IPVersion, + IPVersions, + InstanceViewTypes, + IntervalInMins, + LinuxPatchAssessmentMode, + LinuxVMGuestPatchAutomaticByPlatformRebootSetting, + LinuxVMGuestPatchMode, + MaintenanceOperationResultCodeTypes, + NetworkApiVersion, + OperatingSystemStateTypes, + OperatingSystemType, + OperatingSystemTypes, + OrchestrationMode, + OrchestrationServiceNames, + OrchestrationServiceState, + OrchestrationServiceStateAction, + PatchAssessmentState, + PatchInstallationState, + PatchOperationStatus, + ProtocolTypes, + ProximityPlacementGroupType, + PublicIPAddressSkuName, + PublicIPAddressSkuTier, + PublicIPAllocationMethod, + RepairAction, + ResourceIdentityType, + RestorePointCollectionExpandOptions, + RestorePointExpandOptions, + RollingUpgradeActionType, + RollingUpgradeStatusCode, + SecurityEncryptionTypes, + SecurityTypes, + SettingNames, + StatusLevelTypes, + StorageAccountTypes, + UpgradeMode, + UpgradeOperationInvoker, + UpgradeState, + VMGuestPatchClassificationLinux, + VMGuestPatchClassificationWindows, + VMGuestPatchRebootBehavior, + VMGuestPatchRebootSetting, + VMGuestPatchRebootStatus, + VirtualMachineEvictionPolicyTypes, + VirtualMachinePriorityTypes, + VirtualMachineScaleSetScaleInRules, + VirtualMachineScaleSetSkuScaleType, + VirtualMachineSizeTypes, + VmDiskTypes, + WindowsPatchAssessmentMode, + WindowsVMGuestPatchAutomaticByPlatformRebootSetting, + WindowsVMGuestPatchMode, +) 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__ = [ @@ -655,5 +666,5 @@ "WindowsVMGuestPatchAutomaticByPlatformRebootSetting", "WindowsVMGuestPatchMode", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_01/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_01/models/_models_py3.py index 0b9e8b63aff63..8016e16bd248b 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_01/models/_models_py3.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_01/models/_models_py3.py @@ -1,5 +1,5 @@ -# 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. @@ -16,10 +16,9 @@ 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 if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object @@ -439,7 +438,7 @@ def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kw self.tags = tags -class AvailabilitySet(Resource): # pylint: disable=too-many-instance-attributes +class AvailabilitySet(Resource): """Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see `Availability sets @@ -852,7 +851,7 @@ def __init__(self, **kwargs: Any) -> None: self.status = None -class CapacityReservation(Resource): # pylint: disable=too-many-instance-attributes +class CapacityReservation(Resource): """Specifies information about the capacity reservation. Variables are only populated by the server, and will be ignored when sending a request. @@ -1490,7 +1489,7 @@ def __init__(self, **kwargs: Any) -> None: self.provider = None -class DataDisk(_serialization.Model): # pylint: disable=too-many-instance-attributes +class DataDisk(_serialization.Model): """Describes a data disk. Variables are only populated by the server, and will be ignored when sending a request. @@ -1691,7 +1690,7 @@ def __init__(self, **kwargs: Any) -> None: self.lun = None -class DedicatedHost(Resource): # pylint: disable=too-many-instance-attributes +class DedicatedHost(Resource): """Specifies information about the Dedicated host. Variables are only populated by the server, and will be ignored when sending a request. @@ -1871,7 +1870,7 @@ def __init__( self.allocatable_v_ms = allocatable_v_ms -class DedicatedHostGroup(Resource): # pylint: disable=too-many-instance-attributes +class DedicatedHostGroup(Resource): """Specifies information about the dedicated host group that the dedicated hosts should be assigned to. :code:`
`:code:`
` Currently, a dedicated host can only be added to a dedicated host group at creation time. An existing dedicated host cannot be added to another @@ -3637,7 +3636,7 @@ def __init__(self, *, secret_url: str, source_vault: "_models.SubResource", **kw self.source_vault = source_vault -class LastPatchInstallationSummary(_serialization.Model): # pylint: disable=too-many-instance-attributes +class LastPatchInstallationSummary(_serialization.Model): """Describes the properties of the last installed patch summary. Variables are only populated by the server, and will be ignored when sending a request. @@ -4404,7 +4403,7 @@ def __init__(self, **kwargs: Any) -> None: self.service_state = None -class OSDisk(_serialization.Model): # pylint: disable=too-many-instance-attributes +class OSDisk(_serialization.Model): """Specifies information about the operating system disk used by the virtual machine. For more information about disks, see `About disks and VHDs for Azure virtual machines `_. @@ -4980,7 +4979,7 @@ def __init__( self.regular_priority_percentage_above_base = regular_priority_percentage_above_base -class ProximityPlacementGroup(Resource): # pylint: disable=too-many-instance-attributes +class ProximityPlacementGroup(Resource): """Specifies information about the proximity placement group. Variables are only populated by the server, and will be ignored when sending a request. @@ -7714,7 +7713,7 @@ def __init__(self, *, uri: Optional[str] = None, **kwargs: Any) -> None: self.uri = uri -class VirtualMachine(Resource): # pylint: disable=too-many-instance-attributes +class VirtualMachine(Resource): """Describes a Virtual Machine. Variables are only populated by the server, and will be ignored when sending a request. @@ -8296,7 +8295,7 @@ def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylin self.resources = None -class VirtualMachineExtension(ResourceWithOptionalLocation): # pylint: disable=too-many-instance-attributes +class VirtualMachineExtension(ResourceWithOptionalLocation): """Describes a Virtual Machine Extension. Variables are only populated by the server, and will be ignored when sending a request. @@ -8653,7 +8652,7 @@ def __init__(self, *, value: Optional[List["_models.VirtualMachineExtension"]] = self.value = value -class VirtualMachineExtensionUpdate(UpdateResource): # pylint: disable=too-many-instance-attributes +class VirtualMachineExtensionUpdate(UpdateResource): """Describes a Virtual Machine Extension. :ivar tags: Resource tags. @@ -8915,7 +8914,7 @@ def __init__( self.extended_location = extended_location -class VirtualMachineImage(VirtualMachineImageResource): # pylint: disable=too-many-instance-attributes +class VirtualMachineImage(VirtualMachineImageResource): """Describes a Virtual Machine Image. All required parameters must be populated in order to send to server. @@ -9131,7 +9130,7 @@ def __init__( self.linux_parameters = linux_parameters -class VirtualMachineInstallPatchesResult(_serialization.Model): # pylint: disable=too-many-instance-attributes +class VirtualMachineInstallPatchesResult(_serialization.Model): """The result summary of an installation operation. Variables are only populated by the server, and will be ignored when sending a request. @@ -9221,7 +9220,7 @@ def __init__(self, **kwargs: Any) -> None: self.error = None -class VirtualMachineInstanceView(_serialization.Model): # pylint: disable=too-many-instance-attributes +class VirtualMachineInstanceView(_serialization.Model): """The instance view of a virtual machine. Variables are only populated by the server, and will be ignored when sending a request. @@ -9430,9 +9429,7 @@ def __init__( self.next_link = next_link -class VirtualMachineNetworkInterfaceConfiguration( - _serialization.Model -): # pylint: disable=too-many-instance-attributes,name-too-long +class VirtualMachineNetworkInterfaceConfiguration(_serialization.Model): # pylint: disable=name-too-long """Describes a virtual machine network interface configurations. All required parameters must be populated in order to send to server. @@ -9896,7 +9893,7 @@ def __init__(self, *, temp_disk: Optional[bool] = None, **kwargs: Any) -> None: self.temp_disk = temp_disk -class VirtualMachineRunCommand(Resource): # pylint: disable=too-many-instance-attributes +class VirtualMachineRunCommand(Resource): """Describes a Virtual Machine run command. Variables are only populated by the server, and will be ignored when sending a request. @@ -10179,7 +10176,7 @@ def __init__( self.next_link = next_link -class VirtualMachineRunCommandUpdate(UpdateResource): # pylint: disable=too-many-instance-attributes +class VirtualMachineRunCommandUpdate(UpdateResource): """Describes a Virtual Machine run command. Variables are only populated by the server, and will be ignored when sending a request. @@ -10292,7 +10289,7 @@ def __init__( self.instance_view = None -class VirtualMachineScaleSet(Resource): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSet(Resource): """Describes a Virtual Machine Scale Set. Variables are only populated by the server, and will be ignored when sending a request. @@ -10691,7 +10688,7 @@ def __init__( self.delete_option = delete_option -class VirtualMachineScaleSetExtension(SubResourceReadOnly): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetExtension(SubResourceReadOnly): """Describes a Virtual Machine Scale Set Extension. Variables are only populated by the server, and will be ignored when sending a request. @@ -10913,7 +10910,7 @@ def __init__( self.extensions_time_budget = extensions_time_budget -class VirtualMachineScaleSetExtensionUpdate(SubResourceReadOnly): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetExtensionUpdate(SubResourceReadOnly): """Describes a Virtual Machine Scale Set Extension. Variables are only populated by the server, and will be ignored when sending a request. @@ -11571,9 +11568,7 @@ def __init__( self.security_profile = security_profile -class VirtualMachineScaleSetNetworkConfiguration( - SubResource -): # pylint: disable=too-many-instance-attributes,name-too-long +class VirtualMachineScaleSetNetworkConfiguration(SubResource): # pylint: disable=name-too-long """Describes a virtual machine scale set network profile's network configurations. All required parameters must be populated in order to send to server. @@ -11760,7 +11755,7 @@ def __init__( self.network_api_version = network_api_version -class VirtualMachineScaleSetOSDisk(_serialization.Model): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetOSDisk(_serialization.Model): """Describes a virtual machine scale set operating system disk. All required parameters must be populated in order to send to server. @@ -12363,7 +12358,7 @@ def __init__( self.disk_controller_type = disk_controller_type -class VirtualMachineScaleSetUpdate(UpdateResource): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetUpdate(UpdateResource): """Describes a Virtual Machine Scale Set. :ivar tags: Resource tags. @@ -12623,9 +12618,7 @@ def __init__( self.load_balancer_inbound_nat_pools = load_balancer_inbound_nat_pools -class VirtualMachineScaleSetUpdateNetworkConfiguration( - SubResource -): # pylint: disable=too-many-instance-attributes,name-too-long +class VirtualMachineScaleSetUpdateNetworkConfiguration(SubResource): # pylint: disable=name-too-long """Describes a virtual machine scale set network profile's network configurations. :ivar id: Resource Id. @@ -13039,7 +13032,7 @@ def __init__( self.disk_controller_type = disk_controller_type -class VirtualMachineScaleSetUpdateVMProfile(_serialization.Model): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetUpdateVMProfile(_serialization.Model): """Describes a virtual machine scale set virtual machine profile. :ivar os_profile: The virtual machine scale set OS profile. @@ -13152,7 +13145,7 @@ def __init__( self.hardware_profile = hardware_profile -class VirtualMachineScaleSetVM(Resource): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetVM(Resource): """Describes a virtual machine scale set virtual machine. Variables are only populated by the server, and will be ignored when sending a request. @@ -13412,7 +13405,7 @@ def __init__( # pylint: disable=too-many-locals self.user_data = user_data -class VirtualMachineScaleSetVMExtension(SubResourceReadOnly): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetVMExtension(SubResourceReadOnly): """Describes a VMSS VM Extension. Variables are only populated by the server, and will be ignored when sending a request. @@ -13608,7 +13601,7 @@ def __init__(self, **kwargs: Any) -> None: self.statuses_summary = None -class VirtualMachineScaleSetVMExtensionUpdate(SubResourceReadOnly): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetVMExtensionUpdate(SubResourceReadOnly): """Describes a VMSS VM Extension. Variables are only populated by the server, and will be ignored when sending a request. @@ -13788,7 +13781,7 @@ def __init__(self, *, instance_ids: List[str], **kwargs: Any) -> None: self.instance_ids = instance_ids -class VirtualMachineScaleSetVMInstanceView(_serialization.Model): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetVMInstanceView(_serialization.Model): """The instance view of a virtual machine scale set VM. Variables are only populated by the server, and will be ignored when sending a request. @@ -13972,7 +13965,7 @@ def __init__( self.network_interface_configurations = network_interface_configurations -class VirtualMachineScaleSetVMProfile(_serialization.Model): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetVMProfile(_serialization.Model): """Describes a virtual machine scale set virtual machine profile. :ivar os_profile: Specifies the operating system settings for the virtual machines in the scale @@ -14391,7 +14384,7 @@ def __init__(self, **kwargs: Any) -> None: self.count = None -class VirtualMachineUpdate(UpdateResource): # pylint: disable=too-many-instance-attributes +class VirtualMachineUpdate(UpdateResource): """Describes a Virtual Machine Update. Variables are only populated by the server, and will be ignored when sending a request. diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_01/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_01/operations/__init__.py index 3cc8e8e7a73a8..5cc9a11e23416 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_01/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_01/operations/__init__.py @@ -5,36 +5,42 @@ # Code generated by Microsoft (R) AutoRest 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 UsageOperations -from ._operations import VirtualMachineSizesOperations -from ._operations import VirtualMachineScaleSetsOperations -from ._operations import VirtualMachineScaleSetExtensionsOperations -from ._operations import VirtualMachineScaleSetRollingUpgradesOperations -from ._operations import VirtualMachineScaleSetVMExtensionsOperations -from ._operations import VirtualMachineScaleSetVMsOperations -from ._operations import VirtualMachineExtensionsOperations -from ._operations import VirtualMachinesOperations -from ._operations import VirtualMachineImagesOperations -from ._operations import VirtualMachineImagesEdgeZoneOperations -from ._operations import VirtualMachineExtensionImagesOperations -from ._operations import AvailabilitySetsOperations -from ._operations import ProximityPlacementGroupsOperations -from ._operations import DedicatedHostGroupsOperations -from ._operations import DedicatedHostsOperations -from ._operations import SshPublicKeysOperations -from ._operations import ImagesOperations -from ._operations import RestorePointCollectionsOperations -from ._operations import RestorePointsOperations -from ._operations import CapacityReservationGroupsOperations -from ._operations import CapacityReservationsOperations -from ._operations import LogAnalyticsOperations -from ._operations import VirtualMachineRunCommandsOperations -from ._operations import VirtualMachineScaleSetVMRunCommandsOperations +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 UsageOperations # type: ignore +from ._operations import VirtualMachineSizesOperations # type: ignore +from ._operations import VirtualMachineScaleSetsOperations # type: ignore +from ._operations import VirtualMachineScaleSetExtensionsOperations # type: ignore +from ._operations import VirtualMachineScaleSetRollingUpgradesOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMExtensionsOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMsOperations # type: ignore +from ._operations import VirtualMachineExtensionsOperations # type: ignore +from ._operations import VirtualMachinesOperations # type: ignore +from ._operations import VirtualMachineImagesOperations # type: ignore +from ._operations import VirtualMachineImagesEdgeZoneOperations # type: ignore +from ._operations import VirtualMachineExtensionImagesOperations # type: ignore +from ._operations import AvailabilitySetsOperations # type: ignore +from ._operations import ProximityPlacementGroupsOperations # type: ignore +from ._operations import DedicatedHostGroupsOperations # type: ignore +from ._operations import DedicatedHostsOperations # type: ignore +from ._operations import SshPublicKeysOperations # type: ignore +from ._operations import ImagesOperations # type: ignore +from ._operations import RestorePointCollectionsOperations # type: ignore +from ._operations import RestorePointsOperations # type: ignore +from ._operations import CapacityReservationGroupsOperations # type: ignore +from ._operations import CapacityReservationsOperations # type: ignore +from ._operations import LogAnalyticsOperations # type: ignore +from ._operations import VirtualMachineRunCommandsOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMRunCommandsOperations # 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__ = [ @@ -65,5 +71,5 @@ "VirtualMachineRunCommandsOperations", "VirtualMachineScaleSetVMRunCommandsOperations", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_01/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_01/operations/_operations.py index a03d616b3c4f4..08950e065cd67 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_01/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_01/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. @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Iterable, Iterator, List, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Iterable, Iterator, List, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -36,7 +36,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, HttpResponse], T, Dict[str, Any]], Any]] @@ -5967,7 +5967,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.ComputeOperationValue"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.ComputeOperationListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6064,7 +6064,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.Usage"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.ListUsagesResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6163,7 +6163,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.VirtualMachine api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6264,7 +6264,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> Iterable["_models.Vi api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6332,7 +6332,7 @@ def _create_or_update_initial( parameters: Union[_models.VirtualMachineScaleSet, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6524,7 +6524,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineScaleSetUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6713,7 +6713,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, *, force_deletion: Optional[bool] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6842,7 +6842,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_08_01.models.VirtualMachineScaleSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6892,7 +6892,7 @@ def _deallocate_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7089,7 +7089,7 @@ def _delete_instances_initial( force_deletion: Optional[bool] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7297,7 +7297,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2022_08_01.models.VirtualMachineScaleSetInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7357,7 +7357,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Vir api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7436,7 +7436,7 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.VirtualMachineScaleSet"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.VirtualMachineScaleSetListWithLinkResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7519,7 +7519,7 @@ def list_skus( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.VirtualMachineScaleSetListSkusResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7603,7 +7603,7 @@ def get_os_upgrade_history( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.VirtualMachineScaleSetListOSUpgradeHistory] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7674,7 +7674,7 @@ def _power_off_initial( skip_shutdown: bool = False, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7887,7 +7887,7 @@ def _restart_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8076,7 +8076,7 @@ def _start_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8265,7 +8265,7 @@ def _redeploy_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8457,7 +8457,7 @@ def _perform_maintenance_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8655,7 +8655,7 @@ def _update_instances_initial( vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8841,7 +8841,7 @@ def _reimage_initial( vm_scale_set_reimage_input: Optional[Union[_models.VirtualMachineScaleSetReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9034,7 +9034,7 @@ def _reimage_all_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9250,7 +9250,7 @@ def force_recovery_service_fabric_platform_update_domain_walk( # pylint: disabl :rtype: ~azure.mgmt.compute.v2022_08_01.models.RecoveryWalkResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9296,7 +9296,7 @@ def force_recovery_service_fabric_platform_update_domain_walk( # pylint: disabl return deserialized # type: ignore @overload - def convert_to_single_placement_group( # pylint: disable=inconsistent-return-statements + def convert_to_single_placement_group( self, resource_group_name: str, vm_scale_set_name: str, @@ -9324,7 +9324,7 @@ def convert_to_single_placement_group( # pylint: disable=inconsistent-return-st """ @overload - def convert_to_single_placement_group( # pylint: disable=inconsistent-return-statements + def convert_to_single_placement_group( self, resource_group_name: str, vm_scale_set_name: str, @@ -9374,7 +9374,7 @@ def convert_to_single_placement_group( # pylint: disable=inconsistent-return-st :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9431,7 +9431,7 @@ def _set_orchestration_service_state_initial( parameters: Union[_models.OrchestrationServiceStateInput, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9639,7 +9639,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtension, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9850,7 +9850,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtensionUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10057,7 +10057,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, vmss_extension_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10187,7 +10187,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_08_01.models.VirtualMachineScaleSetExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10253,7 +10253,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.VirtualMachineScaleSetExtensionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10337,7 +10337,7 @@ def __init__(self, *args, **kwargs): self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") def _cancel_initial(self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10439,7 +10439,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_os_upgrade_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10545,7 +10545,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_extension_upgrade_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10662,7 +10662,7 @@ def get_latest( :rtype: ~azure.mgmt.compute.v2022_08_01.models.RollingUpgradeStatusInfo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10734,7 +10734,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetVMExtension, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10954,7 +10954,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetVMExtensionUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11169,7 +11169,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, vm_extension_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11305,7 +11305,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_08_01.models.VirtualMachineScaleSetVMExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11374,7 +11374,7 @@ def list( :rtype: ~azure.mgmt.compute.v2022_08_01.models.VirtualMachineScaleSetVMExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11451,7 +11451,7 @@ def _reimage_initial( ] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11650,7 +11650,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _reimage_all_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11759,7 +11759,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _deallocate_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11874,7 +11874,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineScaleSetVM, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12084,7 +12084,7 @@ def _delete_initial( force_deletion: Optional[bool] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12226,7 +12226,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_08_01.models.VirtualMachineScaleSetVM :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12286,7 +12286,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2022_08_01.models.VirtualMachineScaleSetVMInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12368,7 +12368,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.VirtualMachineScaleSetVMListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12442,7 +12442,7 @@ def _power_off_initial( skip_shutdown: bool = False, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12564,7 +12564,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _restart_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12672,7 +12672,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12780,7 +12780,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _redeploy_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12914,7 +12914,7 @@ def retrieve_boot_diagnostics_data( :rtype: ~azure.mgmt.compute.v2022_08_01.models.RetrieveBootDiagnosticsDataResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12961,7 +12961,7 @@ def retrieve_boot_diagnostics_data( def _perform_maintenance_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13082,7 +13082,7 @@ def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13129,7 +13129,7 @@ def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13353,7 +13353,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineExtension, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13563,7 +13563,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineExtensionUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13769,7 +13769,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_name: str, vm_extension_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13899,7 +13899,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_08_01.models.VirtualMachineExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13959,7 +13959,7 @@ def list( :rtype: ~azure.mgmt.compute.v2022_08_01.models.VirtualMachineExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14040,7 +14040,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> Iterable["_models.Vi api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14108,7 +14108,7 @@ def _capture_initial( parameters: Union[_models.VirtualMachineCaptureParameters, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14306,7 +14306,7 @@ def _create_or_update_initial( parameters: Union[_models.VirtualMachine, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14498,7 +14498,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14683,7 +14683,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_name: str, *, force_deletion: Optional[bool] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14814,7 +14814,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_08_01.models.VirtualMachine :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14871,7 +14871,7 @@ def instance_view( :rtype: ~azure.mgmt.compute.v2022_08_01.models.VirtualMachineInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14916,7 +14916,7 @@ def instance_view( def _convert_to_managed_disks_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15019,7 +15019,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _deallocate_initial( self, resource_group_name: str, vm_name: str, *, hibernate: Optional[bool] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15145,7 +15145,7 @@ def generalize( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15187,6 +15187,7 @@ def generalize( # pylint: disable=inconsistent-return-statements def list( self, resource_group_name: str, *, filter: Optional[str] = None, **kwargs: Any ) -> Iterable["_models.VirtualMachine"]: + # pylint: disable=line-too-long """Lists all of the virtual machines in the specified resource group. Use the nextLink property in the response to get the next page of virtual machines. @@ -15207,7 +15208,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15273,6 +15274,7 @@ def get_next(next_link=None): def list_all( self, *, status_only: Optional[str] = None, filter: Optional[str] = None, **kwargs: Any ) -> Iterable["_models.VirtualMachine"]: + # pylint: disable=line-too-long """Lists all of the virtual machines in the specified subscription. Use the nextLink property in the response to get the next page of virtual machines. @@ -15294,7 +15296,7 @@ def list_all( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15377,7 +15379,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15442,7 +15444,7 @@ def get_next(next_link=None): def _power_off_initial( self, resource_group_name: str, vm_name: str, *, skip_shutdown: bool = False, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15551,7 +15553,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _reapply_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15651,7 +15653,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _restart_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15751,7 +15753,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _start_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15851,7 +15853,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _redeploy_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15957,7 +15959,7 @@ def _reimage_initial( parameters: Optional[Union[_models.VirtualMachineReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16162,7 +16164,7 @@ def retrieve_boot_diagnostics_data( :rtype: ~azure.mgmt.compute.v2022_08_01.models.RetrieveBootDiagnosticsDataResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16206,7 +16208,7 @@ def retrieve_boot_diagnostics_data( return deserialized # type: ignore def _perform_maintenance_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16319,7 +16321,7 @@ def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16358,7 +16360,7 @@ def simulate_eviction( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore def _assess_patches_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16474,7 +16476,7 @@ def _install_patches_initial( install_patches_input: Union[_models.VirtualMachineInstallPatchesParameters, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16672,7 +16674,7 @@ def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16897,7 +16899,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_08_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16976,7 +16978,7 @@ def list( :rtype: list[~azure.mgmt.compute.v2022_08_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17037,7 +17039,7 @@ def list_offers( :rtype: list[~azure.mgmt.compute.v2022_08_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17089,7 +17091,7 @@ def list_publishers(self, location: str, **kwargs: Any) -> List[_models.VirtualM :rtype: list[~azure.mgmt.compute.v2022_08_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17146,7 +17148,7 @@ def list_skus( :rtype: list[~azure.mgmt.compute.v2022_08_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17201,7 +17203,7 @@ def list_by_edge_zone(self, location: str, edge_zone: str, **kwargs: Any) -> _mo :rtype: ~azure.mgmt.compute.v2022_08_01.models.VmImagesInEdgeZoneListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17286,7 +17288,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_08_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17371,7 +17373,7 @@ def list( :rtype: list[~azure.mgmt.compute.v2022_08_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17436,7 +17438,7 @@ def list_offers( :rtype: list[~azure.mgmt.compute.v2022_08_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17493,7 +17495,7 @@ def list_publishers( :rtype: list[~azure.mgmt.compute.v2022_08_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17554,7 +17556,7 @@ def list_skus( :rtype: list[~azure.mgmt.compute.v2022_08_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17637,7 +17639,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_08_01.models.VirtualMachineExtensionImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17695,7 +17697,7 @@ def list_types( :rtype: list[~azure.mgmt.compute.v2022_08_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17767,7 +17769,7 @@ def list_versions( :rtype: list[~azure.mgmt.compute.v2022_08_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17907,7 +17909,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2022_08_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18034,7 +18036,7 @@ def update( :rtype: ~azure.mgmt.compute.v2022_08_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18102,7 +18104,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18152,7 +18154,7 @@ def get(self, resource_group_name: str, availability_set_name: str, **kwargs: An :rtype: ~azure.mgmt.compute.v2022_08_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18213,7 +18215,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18290,7 +18292,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Ava api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18372,7 +18374,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18530,7 +18532,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2022_08_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18660,7 +18662,7 @@ def update( :rtype: ~azure.mgmt.compute.v2022_08_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18728,7 +18730,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18788,7 +18790,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_08_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18847,7 +18849,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.ProximityPlac api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18927,7 +18929,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19088,7 +19090,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2022_08_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19215,7 +19217,7 @@ def update( :rtype: ~azure.mgmt.compute.v2022_08_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19283,7 +19285,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19345,7 +19347,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_08_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19405,7 +19407,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19481,7 +19483,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.DedicatedHost api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19570,7 +19572,7 @@ def _create_or_update_initial( parameters: Union[_models.DedicatedHost, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19771,7 +19773,7 @@ def _update_initial( parameters: Union[_models.DedicatedHostUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19967,7 +19969,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20098,7 +20100,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_08_01.models.DedicatedHost :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20163,7 +20165,7 @@ def list_by_host_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.DedicatedHostListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20228,7 +20230,7 @@ def get_next(next_link=None): def _restart_initial( self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20374,7 +20376,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.SshPublicKeyR api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20455,7 +20457,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20589,7 +20591,7 @@ def create( :rtype: ~azure.mgmt.compute.v2022_08_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20717,7 +20719,7 @@ def update( :rtype: ~azure.mgmt.compute.v2022_08_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20785,7 +20787,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20835,7 +20837,7 @@ def get(self, resource_group_name: str, ssh_public_key_name: str, **kwargs: Any) :rtype: ~azure.mgmt.compute.v2022_08_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20893,7 +20895,7 @@ def generate_key_pair( :rtype: ~azure.mgmt.compute.v2022_08_01.models.SshPublicKeyGenerateKeyPairResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20959,7 +20961,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, image_name: str, parameters: Union[_models.Image, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21141,7 +21143,7 @@ def _update_initial( parameters: Union[_models.ImageUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21321,7 +21323,7 @@ def get_long_running_output(pipeline_response): ) def _delete_initial(self, resource_group_name: str, image_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21436,7 +21438,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_08_01.models.Image :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21495,7 +21497,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21571,7 +21573,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Image"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21733,7 +21735,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2022_08_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21863,7 +21865,7 @@ def update( :rtype: ~azure.mgmt.compute.v2022_08_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21920,7 +21922,7 @@ def update( def _delete_initial( self, resource_group_name: str, restore_point_collection_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22046,7 +22048,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_08_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22107,7 +22109,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Res api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.RestorePointCollectionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22186,7 +22188,7 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.RestorePointCollection"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.RestorePointCollectionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22275,7 +22277,7 @@ def _create_initial( parameters: Union[_models.RestorePoint, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22474,7 +22476,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, restore_point_collection_name: str, restore_point_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22604,7 +22606,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_08_01.models.RestorePoint :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22748,7 +22750,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2022_08_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22881,7 +22883,7 @@ def update( :rtype: ~azure.mgmt.compute.v2022_08_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22952,7 +22954,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23016,7 +23018,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_08_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23090,7 +23092,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.CapacityReservationGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23177,7 +23179,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.CapacityReservationGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23267,7 +23269,7 @@ def _create_or_update_initial( parameters: Union[_models.CapacityReservation, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23477,7 +23479,7 @@ def _update_initial( parameters: Union[_models.CapacityReservationUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23680,7 +23682,7 @@ def _delete_initial( capacity_reservation_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23818,7 +23820,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_08_01.models.CapacityReservation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23884,7 +23886,7 @@ def list_by_capacity_reservation_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.CapacityReservationListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23970,7 +23972,7 @@ def __init__(self, *args, **kwargs): def _export_request_rate_by_interval_initial( self, location: str, parameters: Union[_models.RequestRateByIntervalInput, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24147,7 +24149,7 @@ def get_long_running_output(pipeline_response): def _export_throttled_requests_initial( self, location: str, parameters: Union[_models.ThrottledRequestsInput, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24357,7 +24359,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.RunCommandDocu api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.RunCommandListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24430,7 +24432,7 @@ def get(self, location: str, command_id: str, **kwargs: Any) -> _models.RunComma :rtype: ~azure.mgmt.compute.v2022_08_01.models.RunCommandDocument :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24480,7 +24482,7 @@ def _create_or_update_initial( run_command: Union[_models.VirtualMachineRunCommand, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24689,7 +24691,7 @@ def _update_initial( run_command: Union[_models.VirtualMachineRunCommandUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24894,7 +24896,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_name: str, run_command_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25024,7 +25026,7 @@ def get_by_virtual_machine( :rtype: ~azure.mgmt.compute.v2022_08_01.models.VirtualMachineRunCommand :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25092,7 +25094,7 @@ def list_by_virtual_machine( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.VirtualMachineRunCommandsListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25185,7 +25187,7 @@ def _create_or_update_initial( run_command: Union[_models.VirtualMachineRunCommand, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25403,7 +25405,7 @@ def _update_initial( run_command: Union[_models.VirtualMachineRunCommandUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25616,7 +25618,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, run_command_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25752,7 +25754,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_08_01.models.VirtualMachineRunCommand :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25829,7 +25831,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-01")) cls: ClsType[_models.VirtualMachineRunCommandsListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_03/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_03/__init__.py index 3b1b6244b2375..ab7c46e8991db 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_03/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_03/__init__.py @@ -5,15 +5,21 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._compute_management_client import ComputeManagementClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._compute_management_client import ComputeManagementClient # 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__ = [ "ComputeManagementClient", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_03/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_03/_compute_management_client.py index 6c8cb9b1a92a1..2289748e19ac4 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_03/_compute_management_client.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_03/_compute_management_client.py @@ -34,11 +34,10 @@ ) if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class ComputeManagementClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes +class ComputeManagementClient: # pylint: disable=too-many-instance-attributes """Compute Client. :ivar galleries: GalleriesOperations operations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_03/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_03/_configuration.py index ac16da701e763..1071bba0a5ac0 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_03/_configuration.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_03/_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 ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ComputeManagementClient. Note that all parameters used to create this instance are saved as instance diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_03/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_03/_version.py index d79b2760319c5..e5754a47ce68f 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_03/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_03/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "33.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_03/aio/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_03/aio/__init__.py index 0715f50185586..d3fd1ba93379a 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_03/aio/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_03/aio/__init__.py @@ -5,12 +5,18 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._compute_management_client import ComputeManagementClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._compute_management_client import ComputeManagementClient # 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__ = [ "ComputeManagementClient", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_03/aio/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_03/aio/_compute_management_client.py index 1c1bcf2fe35e2..165db5da057e1 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_03/aio/_compute_management_client.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_03/aio/_compute_management_client.py @@ -34,11 +34,10 @@ ) if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class ComputeManagementClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes +class ComputeManagementClient: # pylint: disable=too-many-instance-attributes """Compute Client. :ivar galleries: GalleriesOperations operations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_03/aio/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_03/aio/_configuration.py index 14da25f019ce2..e7bf8486308e1 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_03/aio/_configuration.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_03/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 ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ComputeManagementClient. Note that all parameters used to create this instance are saved as instance diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_03/aio/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_03/aio/operations/__init__.py index 322500f753256..139d983a58402 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_03/aio/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_03/aio/operations/__init__.py @@ -5,22 +5,28 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._operations import GalleriesOperations -from ._operations import GalleryImagesOperations -from ._operations import GalleryImageVersionsOperations -from ._operations import GalleryApplicationsOperations -from ._operations import GalleryApplicationVersionsOperations -from ._operations import GallerySharingProfileOperations -from ._operations import SharedGalleriesOperations -from ._operations import SharedGalleryImagesOperations -from ._operations import SharedGalleryImageVersionsOperations -from ._operations import CommunityGalleriesOperations -from ._operations import CommunityGalleryImagesOperations -from ._operations import CommunityGalleryImageVersionsOperations +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._operations import GalleriesOperations # type: ignore +from ._operations import GalleryImagesOperations # type: ignore +from ._operations import GalleryImageVersionsOperations # type: ignore +from ._operations import GalleryApplicationsOperations # type: ignore +from ._operations import GalleryApplicationVersionsOperations # type: ignore +from ._operations import GallerySharingProfileOperations # type: ignore +from ._operations import SharedGalleriesOperations # type: ignore +from ._operations import SharedGalleryImagesOperations # type: ignore +from ._operations import SharedGalleryImageVersionsOperations # type: ignore +from ._operations import CommunityGalleriesOperations # type: ignore +from ._operations import CommunityGalleryImagesOperations # type: ignore +from ._operations import CommunityGalleryImageVersionsOperations # 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__ = [ @@ -37,5 +43,5 @@ "CommunityGalleryImagesOperations", "CommunityGalleryImageVersionsOperations", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_03/aio/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_03/aio/operations/_operations.py index 2829efdcbd700..e285081405524 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_03/aio/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_03/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. @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -76,7 +76,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]] @@ -104,7 +104,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, gallery_name: str, gallery: Union[_models.Gallery, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -297,7 +297,7 @@ async def _update_initial( gallery: Union[_models.GalleryUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -511,7 +511,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_08_03.models.Gallery :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -556,7 +556,7 @@ async def get( return deserialized # type: ignore async def _delete_initial(self, resource_group_name: str, gallery_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -671,7 +671,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-03")) cls: ClsType[_models.GalleryList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -746,7 +746,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Gallery"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-03")) cls: ClsType[_models.GalleryList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -835,7 +835,7 @@ async def _create_or_update_initial( gallery_image: Union[_models.GalleryImage, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1047,7 +1047,7 @@ async def _update_initial( gallery_image: Union[_models.GalleryImageUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1266,7 +1266,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_08_03.models.GalleryImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1312,7 +1312,7 @@ async def get( async def _delete_initial( self, resource_group_name: str, gallery_name: str, gallery_image_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1440,7 +1440,7 @@ def list_by_gallery( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-03")) cls: ClsType[_models.GalleryImageList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1532,7 +1532,7 @@ async def _create_or_update_initial( gallery_image_version: Union[_models.GalleryImageVersion, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1766,7 +1766,7 @@ async def _update_initial( gallery_image_version: Union[_models.GalleryImageVersionUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2022,7 +2022,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_08_03.models.GalleryImageVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2075,7 +2075,7 @@ async def _delete_initial( gallery_image_version_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2217,7 +2217,7 @@ def list_by_gallery_image( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-03")) cls: ClsType[_models.GalleryImageVersionList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2309,7 +2309,7 @@ async def _create_or_update_initial( gallery_application: Union[_models.GalleryApplication, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2525,7 +2525,7 @@ async def _update_initial( gallery_application: Union[_models.GalleryApplicationUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2751,7 +2751,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_08_03.models.GalleryApplication :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2797,7 +2797,7 @@ async def get( async def _delete_initial( self, resource_group_name: str, gallery_name: str, gallery_application_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2926,7 +2926,7 @@ def list_by_gallery( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-03")) cls: ClsType[_models.GalleryApplicationList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3018,7 +3018,7 @@ async def _create_or_update_initial( gallery_application_version: Union[_models.GalleryApplicationVersion, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3254,7 +3254,7 @@ async def _update_initial( gallery_application_version: Union[_models.GalleryApplicationVersionUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3512,7 +3512,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_08_03.models.GalleryApplicationVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3565,7 +3565,7 @@ async def _delete_initial( gallery_application_version_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3708,7 +3708,7 @@ def list_by_gallery_application( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-03")) cls: ClsType[_models.GalleryApplicationVersionList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3799,7 +3799,7 @@ async def _update_initial( sharing_update: Union[_models.SharingUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4027,7 +4027,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-03")) cls: ClsType[_models.SharedGalleryList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4101,7 +4101,7 @@ async def get(self, location: str, gallery_unique_name: str, **kwargs: Any) -> _ :rtype: ~azure.mgmt.compute.v2022_08_03.models.SharedGallery :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4193,7 +4193,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-03")) cls: ClsType[_models.SharedGalleryImageList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4273,7 +4273,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_08_03.models.SharedGalleryImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4371,7 +4371,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-03")) cls: ClsType[_models.SharedGalleryImageVersionList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4462,7 +4462,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_08_03.models.SharedGalleryImageVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4539,7 +4539,7 @@ async def get(self, location: str, public_gallery_name: str, **kwargs: Any) -> _ :rtype: ~azure.mgmt.compute.v2022_08_03.models.CommunityGallery :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4618,7 +4618,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_08_03.models.CommunityGalleryImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4683,7 +4683,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-03")) cls: ClsType[_models.CommunityGalleryImageList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4792,7 +4792,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_08_03.models.CommunityGalleryImageVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4860,7 +4860,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-03")) cls: ClsType[_models.CommunityGalleryImageVersionList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_03/models/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_03/models/__init__.py index 515d7cc6390ff..e97c8bf11e641 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_03/models/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_03/models/__init__.py @@ -5,133 +5,144 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._models_py3 import ApiError -from ._models_py3 import ApiErrorBase -from ._models_py3 import CommunityGallery -from ._models_py3 import CommunityGalleryImage -from ._models_py3 import CommunityGalleryImageIdentifier -from ._models_py3 import CommunityGalleryImageList -from ._models_py3 import CommunityGalleryImageVersion -from ._models_py3 import CommunityGalleryImageVersionList -from ._models_py3 import CommunityGalleryInfo -from ._models_py3 import CommunityGalleryMetadata -from ._models_py3 import DataDiskImageEncryption -from ._models_py3 import Disallowed -from ._models_py3 import DiskImageEncryption -from ._models_py3 import EncryptionImages -from ._models_py3 import ExtendedLocation -from ._models_py3 import Gallery -from ._models_py3 import GalleryApplication -from ._models_py3 import GalleryApplicationCustomAction -from ._models_py3 import GalleryApplicationCustomActionParameter -from ._models_py3 import GalleryApplicationList -from ._models_py3 import GalleryApplicationUpdate -from ._models_py3 import GalleryApplicationVersion -from ._models_py3 import GalleryApplicationVersionList -from ._models_py3 import GalleryApplicationVersionPublishingProfile -from ._models_py3 import GalleryApplicationVersionSafetyProfile -from ._models_py3 import GalleryApplicationVersionUpdate -from ._models_py3 import GalleryArtifactPublishingProfileBase -from ._models_py3 import GalleryArtifactSafetyProfileBase -from ._models_py3 import GalleryArtifactSource -from ._models_py3 import GalleryArtifactVersionFullSource -from ._models_py3 import GalleryArtifactVersionSource -from ._models_py3 import GalleryDataDiskImage -from ._models_py3 import GalleryDiskImage -from ._models_py3 import GalleryDiskImageSource -from ._models_py3 import GalleryExtendedLocation -from ._models_py3 import GalleryIdentifier -from ._models_py3 import GalleryImage -from ._models_py3 import GalleryImageFeature -from ._models_py3 import GalleryImageIdentifier -from ._models_py3 import GalleryImageList -from ._models_py3 import GalleryImageUpdate -from ._models_py3 import GalleryImageVersion -from ._models_py3 import GalleryImageVersionList -from ._models_py3 import GalleryImageVersionPublishingProfile -from ._models_py3 import GalleryImageVersionSafetyProfile -from ._models_py3 import GalleryImageVersionStorageProfile -from ._models_py3 import GalleryImageVersionUefiSettings -from ._models_py3 import GalleryImageVersionUpdate -from ._models_py3 import GalleryList -from ._models_py3 import GalleryOSDiskImage -from ._models_py3 import GalleryTargetExtendedLocation -from ._models_py3 import GalleryUpdate -from ._models_py3 import ImagePurchasePlan -from ._models_py3 import ImageVersionSecurityProfile -from ._models_py3 import InnerError -from ._models_py3 import LatestGalleryImageVersion -from ._models_py3 import ManagedArtifact -from ._models_py3 import OSDiskImageEncryption -from ._models_py3 import OSDiskImageSecurityProfile -from ._models_py3 import PirCommunityGalleryResource -from ._models_py3 import PirResource -from ._models_py3 import PirSharedGalleryResource -from ._models_py3 import PolicyViolation -from ._models_py3 import RecommendedMachineConfiguration -from ._models_py3 import RegionalReplicationStatus -from ._models_py3 import RegionalSharingStatus -from ._models_py3 import ReplicationStatus -from ._models_py3 import Resource -from ._models_py3 import ResourceRange -from ._models_py3 import ResourceWithOptionalLocation -from ._models_py3 import SharedGallery -from ._models_py3 import SharedGalleryDataDiskImage -from ._models_py3 import SharedGalleryDiskImage -from ._models_py3 import SharedGalleryImage -from ._models_py3 import SharedGalleryImageList -from ._models_py3 import SharedGalleryImageVersion -from ._models_py3 import SharedGalleryImageVersionList -from ._models_py3 import SharedGalleryImageVersionStorageProfile -from ._models_py3 import SharedGalleryList -from ._models_py3 import SharedGalleryOSDiskImage -from ._models_py3 import SharingProfile -from ._models_py3 import SharingProfileGroup -from ._models_py3 import SharingStatus -from ._models_py3 import SharingUpdate -from ._models_py3 import SoftDeletePolicy -from ._models_py3 import SubResource -from ._models_py3 import SubResourceReadOnly -from ._models_py3 import SystemData -from ._models_py3 import TargetRegion -from ._models_py3 import UefiKey -from ._models_py3 import UefiKeySignatures -from ._models_py3 import UpdateResourceDefinition -from ._models_py3 import UserArtifactManage -from ._models_py3 import UserArtifactSettings -from ._models_py3 import UserArtifactSource -from ._models_py3 import UserAssignedIdentitiesValue +from typing import TYPE_CHECKING -from ._compute_management_client_enums import AggregatedReplicationState -from ._compute_management_client_enums import Architecture -from ._compute_management_client_enums import ConfidentialVMEncryptionType -from ._compute_management_client_enums import EdgeZoneStorageAccountType -from ._compute_management_client_enums import ExtendedLocationTypes -from ._compute_management_client_enums import GalleryApplicationCustomActionParameterType -from ._compute_management_client_enums import GalleryExpandParams -from ._compute_management_client_enums import GalleryExtendedLocationType -from ._compute_management_client_enums import GalleryProvisioningState -from ._compute_management_client_enums import GallerySharingPermissionTypes -from ._compute_management_client_enums import HostCaching -from ._compute_management_client_enums import HyperVGeneration -from ._compute_management_client_enums import OperatingSystemStateTypes -from ._compute_management_client_enums import OperatingSystemTypes -from ._compute_management_client_enums import PolicyViolationCategory -from ._compute_management_client_enums import ReplicationMode -from ._compute_management_client_enums import ReplicationState -from ._compute_management_client_enums import ReplicationStatusTypes -from ._compute_management_client_enums import SelectPermissions -from ._compute_management_client_enums import SharedGalleryHostCaching -from ._compute_management_client_enums import SharedToValues -from ._compute_management_client_enums import SharingProfileGroupTypes -from ._compute_management_client_enums import SharingState -from ._compute_management_client_enums import SharingUpdateOperationTypes -from ._compute_management_client_enums import StorageAccountType -from ._compute_management_client_enums import UefiKeyType -from ._compute_management_client_enums import UefiSignatureTemplateName +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + + +from ._models_py3 import ( # type: ignore + ApiError, + ApiErrorBase, + CommunityGallery, + CommunityGalleryImage, + CommunityGalleryImageIdentifier, + CommunityGalleryImageList, + CommunityGalleryImageVersion, + CommunityGalleryImageVersionList, + CommunityGalleryInfo, + CommunityGalleryMetadata, + DataDiskImageEncryption, + Disallowed, + DiskImageEncryption, + EncryptionImages, + ExtendedLocation, + Gallery, + GalleryApplication, + GalleryApplicationCustomAction, + GalleryApplicationCustomActionParameter, + GalleryApplicationList, + GalleryApplicationUpdate, + GalleryApplicationVersion, + GalleryApplicationVersionList, + GalleryApplicationVersionPublishingProfile, + GalleryApplicationVersionSafetyProfile, + GalleryApplicationVersionUpdate, + GalleryArtifactPublishingProfileBase, + GalleryArtifactSafetyProfileBase, + GalleryArtifactSource, + GalleryArtifactVersionFullSource, + GalleryArtifactVersionSource, + GalleryDataDiskImage, + GalleryDiskImage, + GalleryDiskImageSource, + GalleryExtendedLocation, + GalleryIdentifier, + GalleryImage, + GalleryImageFeature, + GalleryImageIdentifier, + GalleryImageList, + GalleryImageUpdate, + GalleryImageVersion, + GalleryImageVersionList, + GalleryImageVersionPublishingProfile, + GalleryImageVersionSafetyProfile, + GalleryImageVersionStorageProfile, + GalleryImageVersionUefiSettings, + GalleryImageVersionUpdate, + GalleryList, + GalleryOSDiskImage, + GalleryTargetExtendedLocation, + GalleryUpdate, + ImagePurchasePlan, + ImageVersionSecurityProfile, + InnerError, + LatestGalleryImageVersion, + ManagedArtifact, + OSDiskImageEncryption, + OSDiskImageSecurityProfile, + PirCommunityGalleryResource, + PirResource, + PirSharedGalleryResource, + PolicyViolation, + RecommendedMachineConfiguration, + RegionalReplicationStatus, + RegionalSharingStatus, + ReplicationStatus, + Resource, + ResourceRange, + ResourceWithOptionalLocation, + SharedGallery, + SharedGalleryDataDiskImage, + SharedGalleryDiskImage, + SharedGalleryImage, + SharedGalleryImageList, + SharedGalleryImageVersion, + SharedGalleryImageVersionList, + SharedGalleryImageVersionStorageProfile, + SharedGalleryList, + SharedGalleryOSDiskImage, + SharingProfile, + SharingProfileGroup, + SharingStatus, + SharingUpdate, + SoftDeletePolicy, + SubResource, + SubResourceReadOnly, + SystemData, + TargetRegion, + UefiKey, + UefiKeySignatures, + UpdateResourceDefinition, + UserArtifactManage, + UserArtifactSettings, + UserArtifactSource, + UserAssignedIdentitiesValue, +) + +from ._compute_management_client_enums import ( # type: ignore + AggregatedReplicationState, + Architecture, + ConfidentialVMEncryptionType, + EdgeZoneStorageAccountType, + ExtendedLocationTypes, + GalleryApplicationCustomActionParameterType, + GalleryExpandParams, + GalleryExtendedLocationType, + GalleryProvisioningState, + GallerySharingPermissionTypes, + HostCaching, + HyperVGeneration, + OperatingSystemStateTypes, + OperatingSystemTypes, + PolicyViolationCategory, + ReplicationMode, + ReplicationState, + ReplicationStatusTypes, + SelectPermissions, + SharedGalleryHostCaching, + SharedToValues, + SharingProfileGroupTypes, + SharingState, + SharingUpdateOperationTypes, + StorageAccountType, + UefiKeyType, + UefiSignatureTemplateName, +) 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__ = [ @@ -259,5 +270,5 @@ "UefiKeyType", "UefiSignatureTemplateName", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_03/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_03/models/_models_py3.py index 56fcc6878bc4a..cd80c679ff371 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_03/models/_models_py3.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_03/models/_models_py3.py @@ -1,5 +1,5 @@ -# 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. @@ -13,7 +13,6 @@ from ... import _serialization if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models @@ -206,7 +205,7 @@ def __init__( self.community_metadata = community_metadata -class CommunityGalleryImage(PirCommunityGalleryResource): # pylint: disable=too-many-instance-attributes +class CommunityGalleryImage(PirCommunityGalleryResource): """Specifies information about the gallery image definition that you want to create or update. Variables are only populated by the server, and will be ignored when sending a request. @@ -882,7 +881,7 @@ def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kw self.tags = tags -class Gallery(Resource): # pylint: disable=too-many-instance-attributes +class Gallery(Resource): """Specifies information about the Shared Image Gallery that you want to create or update. Variables are only populated by the server, and will be ignored when sending a request. @@ -975,7 +974,7 @@ def __init__( self.sharing_status = None -class GalleryApplication(Resource): # pylint: disable=too-many-instance-attributes +class GalleryApplication(Resource): """Specifies information about the gallery Application Definition that you want to create or update. @@ -1291,7 +1290,7 @@ def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> N self.tags = tags -class GalleryApplicationUpdate(UpdateResourceDefinition): # pylint: disable=too-many-instance-attributes +class GalleryApplicationUpdate(UpdateResourceDefinition): """Specifies information about the gallery Application Definition that you want to update. Variables are only populated by the server, and will be ignored when sending a request. @@ -1611,9 +1610,7 @@ def __init__( self.target_extended_locations = target_extended_locations -class GalleryApplicationVersionPublishingProfile( - GalleryArtifactPublishingProfileBase -): # pylint: disable=too-many-instance-attributes,name-too-long +class GalleryApplicationVersionPublishingProfile(GalleryArtifactPublishingProfileBase): # pylint: disable=name-too-long """The publishing profile of a gallery image version. Variables are only populated by the server, and will be ignored when sending a request. @@ -2153,7 +2150,7 @@ def __init__(self, **kwargs: Any) -> None: self.unique_name = None -class GalleryImage(Resource): # pylint: disable=too-many-instance-attributes +class GalleryImage(Resource): """Specifies information about the gallery image definition that you want to create or update. Variables are only populated by the server, and will be ignored when sending a request. @@ -2428,7 +2425,7 @@ def __init__(self, *, value: List["_models.GalleryImage"], next_link: Optional[s self.next_link = next_link -class GalleryImageUpdate(UpdateResourceDefinition): # pylint: disable=too-many-instance-attributes +class GalleryImageUpdate(UpdateResourceDefinition): """Specifies information about the gallery image definition that you want to update. Variables are only populated by the server, and will be ignored when sending a request. @@ -2594,7 +2591,7 @@ def __init__( self.architecture = architecture -class GalleryImageVersion(Resource): # pylint: disable=too-many-instance-attributes +class GalleryImageVersion(Resource): """Specifies information about the gallery image version that you want to create or update. Variables are only populated by the server, and will be ignored when sending a request. @@ -3801,7 +3798,7 @@ def __init__( self.lun = lun -class SharedGalleryImage(PirSharedGalleryResource): # pylint: disable=too-many-instance-attributes +class SharedGalleryImage(PirSharedGalleryResource): """Specifies information about the gallery image definition that you want to create or update. Variables are only populated by the server, and will be ignored when sending a request. diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_03/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_03/operations/__init__.py index 322500f753256..139d983a58402 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_03/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_03/operations/__init__.py @@ -5,22 +5,28 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._operations import GalleriesOperations -from ._operations import GalleryImagesOperations -from ._operations import GalleryImageVersionsOperations -from ._operations import GalleryApplicationsOperations -from ._operations import GalleryApplicationVersionsOperations -from ._operations import GallerySharingProfileOperations -from ._operations import SharedGalleriesOperations -from ._operations import SharedGalleryImagesOperations -from ._operations import SharedGalleryImageVersionsOperations -from ._operations import CommunityGalleriesOperations -from ._operations import CommunityGalleryImagesOperations -from ._operations import CommunityGalleryImageVersionsOperations +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._operations import GalleriesOperations # type: ignore +from ._operations import GalleryImagesOperations # type: ignore +from ._operations import GalleryImageVersionsOperations # type: ignore +from ._operations import GalleryApplicationsOperations # type: ignore +from ._operations import GalleryApplicationVersionsOperations # type: ignore +from ._operations import GallerySharingProfileOperations # type: ignore +from ._operations import SharedGalleriesOperations # type: ignore +from ._operations import SharedGalleryImagesOperations # type: ignore +from ._operations import SharedGalleryImageVersionsOperations # type: ignore +from ._operations import CommunityGalleriesOperations # type: ignore +from ._operations import CommunityGalleryImagesOperations # type: ignore +from ._operations import CommunityGalleryImageVersionsOperations # 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__ = [ @@ -37,5 +43,5 @@ "CommunityGalleryImagesOperations", "CommunityGalleryImageVersionsOperations", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_03/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_03/operations/_operations.py index c1f0f5d9489eb..f9d03aeca941c 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_03/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_08_03/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. @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -36,7 +36,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, HttpResponse], T, Dict[str, Any]], Any]] @@ -1400,7 +1400,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, gallery_name: str, gallery: Union[_models.Gallery, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1590,7 +1590,7 @@ def _update_initial( gallery: Union[_models.GalleryUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1801,7 +1801,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_08_03.models.Gallery :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1846,7 +1846,7 @@ def get( return deserialized # type: ignore def _delete_initial(self, resource_group_name: str, gallery_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1961,7 +1961,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-03")) cls: ClsType[_models.GalleryList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2036,7 +2036,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Gallery"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-03")) cls: ClsType[_models.GalleryList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2125,7 +2125,7 @@ def _create_or_update_initial( gallery_image: Union[_models.GalleryImage, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2337,7 +2337,7 @@ def _update_initial( gallery_image: Union[_models.GalleryImageUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2556,7 +2556,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_08_03.models.GalleryImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2602,7 +2602,7 @@ def get( def _delete_initial( self, resource_group_name: str, gallery_name: str, gallery_image_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2729,7 +2729,7 @@ def list_by_gallery( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-03")) cls: ClsType[_models.GalleryImageList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2821,7 +2821,7 @@ def _create_or_update_initial( gallery_image_version: Union[_models.GalleryImageVersion, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3055,7 +3055,7 @@ def _update_initial( gallery_image_version: Union[_models.GalleryImageVersionUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3311,7 +3311,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_08_03.models.GalleryImageVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3364,7 +3364,7 @@ def _delete_initial( gallery_image_version_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3506,7 +3506,7 @@ def list_by_gallery_image( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-03")) cls: ClsType[_models.GalleryImageVersionList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3598,7 +3598,7 @@ def _create_or_update_initial( gallery_application: Union[_models.GalleryApplication, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3814,7 +3814,7 @@ def _update_initial( gallery_application: Union[_models.GalleryApplicationUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4040,7 +4040,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_08_03.models.GalleryApplication :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4086,7 +4086,7 @@ def get( def _delete_initial( self, resource_group_name: str, gallery_name: str, gallery_application_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4214,7 +4214,7 @@ def list_by_gallery( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-03")) cls: ClsType[_models.GalleryApplicationList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4306,7 +4306,7 @@ def _create_or_update_initial( gallery_application_version: Union[_models.GalleryApplicationVersion, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4542,7 +4542,7 @@ def _update_initial( gallery_application_version: Union[_models.GalleryApplicationVersionUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4800,7 +4800,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_08_03.models.GalleryApplicationVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4853,7 +4853,7 @@ def _delete_initial( gallery_application_version_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4996,7 +4996,7 @@ def list_by_gallery_application( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-03")) cls: ClsType[_models.GalleryApplicationVersionList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5087,7 +5087,7 @@ def _update_initial( sharing_update: Union[_models.SharingUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5311,7 +5311,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-03")) cls: ClsType[_models.SharedGalleryList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5385,7 +5385,7 @@ def get(self, location: str, gallery_unique_name: str, **kwargs: Any) -> _models :rtype: ~azure.mgmt.compute.v2022_08_03.models.SharedGallery :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5476,7 +5476,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-03")) cls: ClsType[_models.SharedGalleryImageList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5556,7 +5556,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_08_03.models.SharedGalleryImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5654,7 +5654,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-03")) cls: ClsType[_models.SharedGalleryImageVersionList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5745,7 +5745,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_08_03.models.SharedGalleryImageVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5822,7 +5822,7 @@ def get(self, location: str, public_gallery_name: str, **kwargs: Any) -> _models :rtype: ~azure.mgmt.compute.v2022_08_03.models.CommunityGallery :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5901,7 +5901,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_08_03.models.CommunityGalleryImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5964,7 +5964,7 @@ def list(self, location: str, public_gallery_name: str, **kwargs: Any) -> Iterab api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-03")) cls: ClsType[_models.CommunityGalleryImageList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6073,7 +6073,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_08_03.models.CommunityGalleryImageVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6141,7 +6141,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-08-03")) cls: ClsType[_models.CommunityGalleryImageVersionList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_09_04/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_09_04/__init__.py index 3b1b6244b2375..ab7c46e8991db 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_09_04/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_09_04/__init__.py @@ -5,15 +5,21 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._compute_management_client import ComputeManagementClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._compute_management_client import ComputeManagementClient # 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__ = [ "ComputeManagementClient", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_09_04/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_09_04/_compute_management_client.py index af1740d25298c..42a094bf786ee 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_09_04/_compute_management_client.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_09_04/_compute_management_client.py @@ -27,11 +27,10 @@ ) if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class ComputeManagementClient: # pylint: disable=client-accepts-api-version-keyword +class ComputeManagementClient: """Compute Client. :ivar cloud_service_role_instances: CloudServiceRoleInstancesOperations operations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_09_04/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_09_04/_configuration.py index 24dda0302a537..8cd85ff7c762a 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_09_04/_configuration.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_09_04/_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 ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ComputeManagementClient. Note that all parameters used to create this instance are saved as instance diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_09_04/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_09_04/_version.py index d79b2760319c5..e5754a47ce68f 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_09_04/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_09_04/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "33.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_09_04/aio/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_09_04/aio/__init__.py index 0715f50185586..d3fd1ba93379a 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_09_04/aio/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_09_04/aio/__init__.py @@ -5,12 +5,18 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._compute_management_client import ComputeManagementClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._compute_management_client import ComputeManagementClient # 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__ = [ "ComputeManagementClient", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_09_04/aio/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_09_04/aio/_compute_management_client.py index 8db2c629bf895..c0ea383988d9a 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_09_04/aio/_compute_management_client.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_09_04/aio/_compute_management_client.py @@ -27,11 +27,10 @@ ) if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class ComputeManagementClient: # pylint: disable=client-accepts-api-version-keyword +class ComputeManagementClient: """Compute Client. :ivar cloud_service_role_instances: CloudServiceRoleInstancesOperations operations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_09_04/aio/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_09_04/aio/_configuration.py index 31275a357b8d0..bf6f80a700d9a 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_09_04/aio/_configuration.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_09_04/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 ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ComputeManagementClient. Note that all parameters used to create this instance are saved as instance diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_09_04/aio/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_09_04/aio/operations/__init__.py index b21df5e1d1dda..6422d5c48bb10 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_09_04/aio/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_09_04/aio/operations/__init__.py @@ -5,15 +5,21 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._operations import CloudServiceRoleInstancesOperations -from ._operations import CloudServiceRolesOperations -from ._operations import CloudServicesOperations -from ._operations import CloudServicesUpdateDomainOperations -from ._operations import CloudServiceOperatingSystemsOperations +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._operations import CloudServiceRoleInstancesOperations # type: ignore +from ._operations import CloudServiceRolesOperations # type: ignore +from ._operations import CloudServicesOperations # type: ignore +from ._operations import CloudServicesUpdateDomainOperations # type: ignore +from ._operations import CloudServiceOperatingSystemsOperations # 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__ = [ @@ -23,5 +29,5 @@ "CloudServicesUpdateDomainOperations", "CloudServiceOperatingSystemsOperations", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_09_04/aio/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_09_04/aio/operations/_operations.py index 1269f7b25db1b..e26b77076b8f7 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_09_04/aio/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_09_04/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. @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -68,7 +68,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]] @@ -96,7 +96,7 @@ def __init__(self, *args, **kwargs) -> None: async def _delete_initial( self, role_instance_name: str, resource_group_name: str, cloud_service_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -226,7 +226,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_09_04.models.RoleInstance :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -286,7 +286,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2022_09_04.models.RoleInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -360,7 +360,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-09-04")) cls: ClsType[_models.RoleInstanceListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -426,7 +426,7 @@ async def get_next(next_link=None): async def _restart_initial( self, role_instance_name: str, resource_group_name: str, cloud_service_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -535,7 +535,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _reimage_initial( self, role_instance_name: str, resource_group_name: str, cloud_service_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -644,7 +644,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _rebuild_initial( self, role_instance_name: str, resource_group_name: str, cloud_service_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -767,7 +767,7 @@ async def get_remote_desktop_file( :rtype: AsyncIterator[bytes] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -852,7 +852,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_09_04.models.CloudServiceRole :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -917,7 +917,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-09-04")) cls: ClsType[_models.CloudServiceRoleListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1007,7 +1007,7 @@ async def _create_or_update_initial( parameters: Optional[Union[_models.CloudService, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1202,7 +1202,7 @@ async def _update_initial( parameters: Optional[Union[_models.CloudServiceUpdate, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1390,7 +1390,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, cloud_service_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1503,7 +1503,7 @@ async def get(self, resource_group_name: str, cloud_service_name: str, **kwargs: :rtype: ~azure.mgmt.compute.v2022_09_04.models.CloudService :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1559,7 +1559,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2022_09_04.models.CloudServiceInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1618,7 +1618,7 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.CloudService"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-09-04")) cls: ClsType[_models.CloudServiceListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1697,7 +1697,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-09-04")) cls: ClsType[_models.CloudServiceListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1761,7 +1761,7 @@ async def get_next(next_link=None): async def _start_initial( self, resource_group_name: str, cloud_service_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1865,7 +1865,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _power_off_initial( self, resource_group_name: str, cloud_service_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1974,7 +1974,7 @@ async def _restart_initial( parameters: Optional[Union[_models.RoleInstances, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2159,7 +2159,7 @@ async def _reimage_initial( parameters: Optional[Union[_models.RoleInstances, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2347,7 +2347,7 @@ async def _rebuild_initial( parameters: Optional[Union[_models.RoleInstances, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2538,7 +2538,7 @@ async def _delete_instances_initial( parameters: Optional[Union[_models.RoleInstances, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2745,7 +2745,7 @@ async def _walk_update_domain_initial( parameters: Optional[Union[_models.UpdateDomain, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2960,7 +2960,7 @@ async def get_update_domain( :rtype: ~azure.mgmt.compute.v2022_09_04.models.UpdateDomain :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3024,7 +3024,7 @@ def list_update_domains( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-09-04")) cls: ClsType[_models.UpdateDomainListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3120,7 +3120,7 @@ async def get_os_version(self, location: str, os_version_name: str, **kwargs: An :rtype: ~azure.mgmt.compute.v2022_09_04.models.OSVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3181,7 +3181,7 @@ def list_os_versions(self, location: str, **kwargs: Any) -> AsyncIterable["_mode api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-09-04")) cls: ClsType[_models.OSVersionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3255,7 +3255,7 @@ async def get_os_family(self, location: str, os_family_name: str, **kwargs: Any) :rtype: ~azure.mgmt.compute.v2022_09_04.models.OSFamily :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3316,7 +3316,7 @@ def list_os_families(self, location: str, **kwargs: Any) -> AsyncIterable["_mode api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-09-04")) cls: ClsType[_models.OSFamilyListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_09_04/models/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_09_04/models/__init__.py index a0bdf635fe468..c38558c72df30 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_09_04/models/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_09_04/models/__init__.py @@ -5,67 +5,78 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._models_py3 import ApiError -from ._models_py3 import ApiErrorBase -from ._models_py3 import CloudService -from ._models_py3 import CloudServiceExtensionProfile -from ._models_py3 import CloudServiceExtensionProperties -from ._models_py3 import CloudServiceInstanceView -from ._models_py3 import CloudServiceListResult -from ._models_py3 import CloudServiceNetworkProfile -from ._models_py3 import CloudServiceOsProfile -from ._models_py3 import CloudServiceProperties -from ._models_py3 import CloudServiceRole -from ._models_py3 import CloudServiceRoleListResult -from ._models_py3 import CloudServiceRoleProfile -from ._models_py3 import CloudServiceRoleProfileProperties -from ._models_py3 import CloudServiceRoleProperties -from ._models_py3 import CloudServiceRoleSku -from ._models_py3 import CloudServiceUpdate -from ._models_py3 import CloudServiceVaultAndSecretReference -from ._models_py3 import CloudServiceVaultCertificate -from ._models_py3 import CloudServiceVaultSecretGroup -from ._models_py3 import ExtendedLocation -from ._models_py3 import Extension -from ._models_py3 import InnerError -from ._models_py3 import InstanceSku -from ._models_py3 import InstanceViewStatusesSummary -from ._models_py3 import LoadBalancerConfiguration -from ._models_py3 import LoadBalancerConfigurationProperties -from ._models_py3 import LoadBalancerFrontendIpConfiguration -from ._models_py3 import LoadBalancerFrontendIpConfigurationProperties -from ._models_py3 import OSFamily -from ._models_py3 import OSFamilyListResult -from ._models_py3 import OSFamilyProperties -from ._models_py3 import OSVersion -from ._models_py3 import OSVersionListResult -from ._models_py3 import OSVersionProperties -from ._models_py3 import OSVersionPropertiesBase -from ._models_py3 import Resource -from ._models_py3 import ResourceInstanceViewStatus -from ._models_py3 import ResourceWithOptionalLocation -from ._models_py3 import RoleInstance -from ._models_py3 import RoleInstanceListResult -from ._models_py3 import RoleInstanceNetworkProfile -from ._models_py3 import RoleInstanceProperties -from ._models_py3 import RoleInstanceView -from ._models_py3 import RoleInstances -from ._models_py3 import StatusCodeCount -from ._models_py3 import SubResource -from ._models_py3 import SubResourceReadOnly -from ._models_py3 import SystemData -from ._models_py3 import UpdateDomain -from ._models_py3 import UpdateDomainListResult -from ._models_py3 import UserAssignedIdentitiesValue +from typing import TYPE_CHECKING -from ._compute_management_client_enums import CloudServiceSlotType -from ._compute_management_client_enums import CloudServiceUpgradeMode -from ._compute_management_client_enums import ExtendedLocationTypes -from ._compute_management_client_enums import InstanceViewTypes -from ._compute_management_client_enums import StatusLevelTypes +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + + +from ._models_py3 import ( # type: ignore + ApiError, + ApiErrorBase, + CloudService, + CloudServiceExtensionProfile, + CloudServiceExtensionProperties, + CloudServiceInstanceView, + CloudServiceListResult, + CloudServiceNetworkProfile, + CloudServiceOsProfile, + CloudServiceProperties, + CloudServiceRole, + CloudServiceRoleListResult, + CloudServiceRoleProfile, + CloudServiceRoleProfileProperties, + CloudServiceRoleProperties, + CloudServiceRoleSku, + CloudServiceUpdate, + CloudServiceVaultAndSecretReference, + CloudServiceVaultCertificate, + CloudServiceVaultSecretGroup, + ExtendedLocation, + Extension, + InnerError, + InstanceSku, + InstanceViewStatusesSummary, + LoadBalancerConfiguration, + LoadBalancerConfigurationProperties, + LoadBalancerFrontendIpConfiguration, + LoadBalancerFrontendIpConfigurationProperties, + OSFamily, + OSFamilyListResult, + OSFamilyProperties, + OSVersion, + OSVersionListResult, + OSVersionProperties, + OSVersionPropertiesBase, + Resource, + ResourceInstanceViewStatus, + ResourceWithOptionalLocation, + RoleInstance, + RoleInstanceListResult, + RoleInstanceNetworkProfile, + RoleInstanceProperties, + RoleInstanceView, + RoleInstances, + StatusCodeCount, + SubResource, + SubResourceReadOnly, + SystemData, + UpdateDomain, + UpdateDomainListResult, + UserAssignedIdentitiesValue, +) + +from ._compute_management_client_enums import ( # type: ignore + CloudServiceSlotType, + CloudServiceUpgradeMode, + ExtendedLocationTypes, + InstanceViewTypes, + StatusLevelTypes, +) 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__ = [ @@ -127,5 +138,5 @@ "InstanceViewTypes", "StatusLevelTypes", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_09_04/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_09_04/models/_models_py3.py index 740ccf577755f..86a1ff6610102 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_09_04/models/_models_py3.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_09_04/models/_models_py3.py @@ -1,5 +1,5 @@ -# 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. @@ -15,10 +15,9 @@ 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 if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object @@ -501,7 +500,7 @@ def __init__( self.secrets = secrets -class CloudServiceProperties(_serialization.Model): # pylint: disable=too-many-instance-attributes +class CloudServiceProperties(_serialization.Model): """Cloud service properties. Variables are only populated by the server, and will be ignored when sending a request. diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_09_04/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_09_04/operations/__init__.py index b21df5e1d1dda..6422d5c48bb10 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_09_04/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_09_04/operations/__init__.py @@ -5,15 +5,21 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._operations import CloudServiceRoleInstancesOperations -from ._operations import CloudServiceRolesOperations -from ._operations import CloudServicesOperations -from ._operations import CloudServicesUpdateDomainOperations -from ._operations import CloudServiceOperatingSystemsOperations +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._operations import CloudServiceRoleInstancesOperations # type: ignore +from ._operations import CloudServiceRolesOperations # type: ignore +from ._operations import CloudServicesOperations # type: ignore +from ._operations import CloudServicesUpdateDomainOperations # type: ignore +from ._operations import CloudServiceOperatingSystemsOperations # 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__ = [ @@ -23,5 +29,5 @@ "CloudServicesUpdateDomainOperations", "CloudServiceOperatingSystemsOperations", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_09_04/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_09_04/operations/_operations.py index 3482f24688750..d7547dfd53cc7 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_09_04/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_09_04/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. @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -36,7 +36,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, HttpResponse], T, Dict[str, Any]], Any]] @@ -1031,7 +1031,7 @@ def __init__(self, *args, **kwargs): def _delete_initial( self, role_instance_name: str, resource_group_name: str, cloud_service_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1161,7 +1161,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_09_04.models.RoleInstance :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1221,7 +1221,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2022_09_04.models.RoleInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1294,7 +1294,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-09-04")) cls: ClsType[_models.RoleInstanceListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1360,7 +1360,7 @@ def get_next(next_link=None): def _restart_initial( self, role_instance_name: str, resource_group_name: str, cloud_service_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1469,7 +1469,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _reimage_initial( self, role_instance_name: str, resource_group_name: str, cloud_service_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1578,7 +1578,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _rebuild_initial( self, role_instance_name: str, resource_group_name: str, cloud_service_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1701,7 +1701,7 @@ def get_remote_desktop_file( :rtype: Iterator[bytes] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1786,7 +1786,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_09_04.models.CloudServiceRole :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1850,7 +1850,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-09-04")) cls: ClsType[_models.CloudServiceRoleListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1940,7 +1940,7 @@ def _create_or_update_initial( parameters: Optional[Union[_models.CloudService, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2135,7 +2135,7 @@ def _update_initial( parameters: Optional[Union[_models.CloudServiceUpdate, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2321,7 +2321,7 @@ def get_long_running_output(pipeline_response): ) def _delete_initial(self, resource_group_name: str, cloud_service_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2432,7 +2432,7 @@ def get(self, resource_group_name: str, cloud_service_name: str, **kwargs: Any) :rtype: ~azure.mgmt.compute.v2022_09_04.models.CloudService :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2488,7 +2488,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2022_09_04.models.CloudServiceInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2546,7 +2546,7 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.CloudService"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-09-04")) cls: ClsType[_models.CloudServiceListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2624,7 +2624,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Clo api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-09-04")) cls: ClsType[_models.CloudServiceListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2686,7 +2686,7 @@ def get_next(next_link=None): return ItemPaged(get_next, extract_data) def _start_initial(self, resource_group_name: str, cloud_service_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2786,7 +2786,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _power_off_initial(self, resource_group_name: str, cloud_service_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2893,7 +2893,7 @@ def _restart_initial( parameters: Optional[Union[_models.RoleInstances, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3078,7 +3078,7 @@ def _reimage_initial( parameters: Optional[Union[_models.RoleInstances, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3266,7 +3266,7 @@ def _rebuild_initial( parameters: Optional[Union[_models.RoleInstances, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3457,7 +3457,7 @@ def _delete_instances_initial( parameters: Optional[Union[_models.RoleInstances, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3664,7 +3664,7 @@ def _walk_update_domain_initial( parameters: Optional[Union[_models.UpdateDomain, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3879,7 +3879,7 @@ def get_update_domain( :rtype: ~azure.mgmt.compute.v2022_09_04.models.UpdateDomain :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3942,7 +3942,7 @@ def list_update_domains( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-09-04")) cls: ClsType[_models.UpdateDomainListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4038,7 +4038,7 @@ def get_os_version(self, location: str, os_version_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.compute.v2022_09_04.models.OSVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4098,7 +4098,7 @@ def list_os_versions(self, location: str, **kwargs: Any) -> Iterable["_models.OS api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-09-04")) cls: ClsType[_models.OSVersionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4172,7 +4172,7 @@ def get_os_family(self, location: str, os_family_name: str, **kwargs: Any) -> _m :rtype: ~azure.mgmt.compute.v2022_09_04.models.OSFamily :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4232,7 +4232,7 @@ def list_os_families(self, location: str, **kwargs: Any) -> Iterable["_models.OS api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-09-04")) cls: ClsType[_models.OSFamilyListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_11_01/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_11_01/__init__.py index 3b1b6244b2375..ab7c46e8991db 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_11_01/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_11_01/__init__.py @@ -5,15 +5,21 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._compute_management_client import ComputeManagementClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._compute_management_client import ComputeManagementClient # 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__ = [ "ComputeManagementClient", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_11_01/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_11_01/_compute_management_client.py index 80bc22070aff8..fc5325958409c 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_11_01/_compute_management_client.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_11_01/_compute_management_client.py @@ -48,11 +48,10 @@ ) if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class ComputeManagementClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes +class ComputeManagementClient: # pylint: disable=too-many-instance-attributes """Compute Client. :ivar operations: Operations operations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_11_01/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_11_01/_configuration.py index bfae89d71b9ee..bfa333732995a 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_11_01/_configuration.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_11_01/_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 ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ComputeManagementClient. Note that all parameters used to create this instance are saved as instance diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_11_01/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_11_01/_version.py index d79b2760319c5..e5754a47ce68f 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_11_01/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_11_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "33.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_11_01/aio/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_11_01/aio/__init__.py index 0715f50185586..d3fd1ba93379a 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_11_01/aio/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_11_01/aio/__init__.py @@ -5,12 +5,18 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._compute_management_client import ComputeManagementClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._compute_management_client import ComputeManagementClient # 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__ = [ "ComputeManagementClient", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_11_01/aio/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_11_01/aio/_compute_management_client.py index bfecbf89cbfe3..3acf2c1407753 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_11_01/aio/_compute_management_client.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_11_01/aio/_compute_management_client.py @@ -48,11 +48,10 @@ ) if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class ComputeManagementClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes +class ComputeManagementClient: # pylint: disable=too-many-instance-attributes """Compute Client. :ivar operations: Operations operations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_11_01/aio/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_11_01/aio/_configuration.py index 6eee2e47ad0a9..3f5c907e1a9f7 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_11_01/aio/_configuration.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_11_01/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 ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ComputeManagementClient. Note that all parameters used to create this instance are saved as instance diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_11_01/aio/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_11_01/aio/operations/__init__.py index 3cc8e8e7a73a8..5cc9a11e23416 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_11_01/aio/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_11_01/aio/operations/__init__.py @@ -5,36 +5,42 @@ # Code generated by Microsoft (R) AutoRest 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 UsageOperations -from ._operations import VirtualMachineSizesOperations -from ._operations import VirtualMachineScaleSetsOperations -from ._operations import VirtualMachineScaleSetExtensionsOperations -from ._operations import VirtualMachineScaleSetRollingUpgradesOperations -from ._operations import VirtualMachineScaleSetVMExtensionsOperations -from ._operations import VirtualMachineScaleSetVMsOperations -from ._operations import VirtualMachineExtensionsOperations -from ._operations import VirtualMachinesOperations -from ._operations import VirtualMachineImagesOperations -from ._operations import VirtualMachineImagesEdgeZoneOperations -from ._operations import VirtualMachineExtensionImagesOperations -from ._operations import AvailabilitySetsOperations -from ._operations import ProximityPlacementGroupsOperations -from ._operations import DedicatedHostGroupsOperations -from ._operations import DedicatedHostsOperations -from ._operations import SshPublicKeysOperations -from ._operations import ImagesOperations -from ._operations import RestorePointCollectionsOperations -from ._operations import RestorePointsOperations -from ._operations import CapacityReservationGroupsOperations -from ._operations import CapacityReservationsOperations -from ._operations import LogAnalyticsOperations -from ._operations import VirtualMachineRunCommandsOperations -from ._operations import VirtualMachineScaleSetVMRunCommandsOperations +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 UsageOperations # type: ignore +from ._operations import VirtualMachineSizesOperations # type: ignore +from ._operations import VirtualMachineScaleSetsOperations # type: ignore +from ._operations import VirtualMachineScaleSetExtensionsOperations # type: ignore +from ._operations import VirtualMachineScaleSetRollingUpgradesOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMExtensionsOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMsOperations # type: ignore +from ._operations import VirtualMachineExtensionsOperations # type: ignore +from ._operations import VirtualMachinesOperations # type: ignore +from ._operations import VirtualMachineImagesOperations # type: ignore +from ._operations import VirtualMachineImagesEdgeZoneOperations # type: ignore +from ._operations import VirtualMachineExtensionImagesOperations # type: ignore +from ._operations import AvailabilitySetsOperations # type: ignore +from ._operations import ProximityPlacementGroupsOperations # type: ignore +from ._operations import DedicatedHostGroupsOperations # type: ignore +from ._operations import DedicatedHostsOperations # type: ignore +from ._operations import SshPublicKeysOperations # type: ignore +from ._operations import ImagesOperations # type: ignore +from ._operations import RestorePointCollectionsOperations # type: ignore +from ._operations import RestorePointsOperations # type: ignore +from ._operations import CapacityReservationGroupsOperations # type: ignore +from ._operations import CapacityReservationsOperations # type: ignore +from ._operations import LogAnalyticsOperations # type: ignore +from ._operations import VirtualMachineRunCommandsOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMRunCommandsOperations # 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__ = [ @@ -65,5 +71,5 @@ "VirtualMachineRunCommandsOperations", "VirtualMachineScaleSetVMRunCommandsOperations", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_11_01/aio/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_11_01/aio/operations/_operations.py index 370549be70b1d..5ac4b37433343 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_11_01/aio/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_11_01/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. @@ -8,21 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import ( - Any, - AsyncIterable, - AsyncIterator, - Callable, - Dict, - IO, - List, - Optional, - Type, - TypeVar, - Union, - cast, - overload, -) +from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, List, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -224,7 +210,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]] @@ -265,7 +251,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.ComputeOperationValue"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.ComputeOperationListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -362,7 +348,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.Usage"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.ListUsagesResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -462,7 +448,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.VirtualMa api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -563,7 +549,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> AsyncIterable["_mode api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -631,7 +617,7 @@ async def _create_or_update_initial( parameters: Union[_models.VirtualMachineScaleSet, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -823,7 +809,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineScaleSetUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1012,7 +998,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, *, force_deletion: Optional[bool] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1141,7 +1127,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_11_01.models.VirtualMachineScaleSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1191,7 +1177,7 @@ async def _deallocate_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1388,7 +1374,7 @@ async def _delete_instances_initial( force_deletion: Optional[bool] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1596,7 +1582,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2022_11_01.models.VirtualMachineScaleSetInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1656,7 +1642,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1735,7 +1721,7 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.VirtualMachineScaleS api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.VirtualMachineScaleSetListWithLinkResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1818,7 +1804,7 @@ def list_skus( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.VirtualMachineScaleSetListSkusResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1884,6 +1870,7 @@ async def get_next(next_link=None): def get_os_upgrade_history( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> AsyncIterable["_models.UpgradeOperationHistoricalStatusInfo"]: + # pylint: disable=line-too-long """Gets list of OS upgrades on a VM scale set instance. :param resource_group_name: The name of the resource group. Required. @@ -1902,7 +1889,7 @@ def get_os_upgrade_history( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.VirtualMachineScaleSetListOSUpgradeHistory] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1973,7 +1960,7 @@ async def _power_off_initial( skip_shutdown: bool = False, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2186,7 +2173,7 @@ async def _restart_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2375,7 +2362,7 @@ async def _start_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2564,7 +2551,7 @@ async def _redeploy_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2756,7 +2743,7 @@ async def _perform_maintenance_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2954,7 +2941,7 @@ async def _update_instances_initial( vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3140,7 +3127,7 @@ async def _reimage_initial( vm_scale_set_reimage_input: Optional[Union[_models.VirtualMachineScaleSetReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3333,7 +3320,7 @@ async def _reimage_all_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3549,7 +3536,7 @@ async def force_recovery_service_fabric_platform_update_domain_walk( # pylint: :rtype: ~azure.mgmt.compute.v2022_11_01.models.RecoveryWalkResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3595,7 +3582,7 @@ async def force_recovery_service_fabric_platform_update_domain_walk( # pylint: return deserialized # type: ignore @overload - async def convert_to_single_placement_group( # pylint: disable=inconsistent-return-statements + async def convert_to_single_placement_group( self, resource_group_name: str, vm_scale_set_name: str, @@ -3623,7 +3610,7 @@ async def convert_to_single_placement_group( # pylint: disable=inconsistent-ret """ @overload - async def convert_to_single_placement_group( # pylint: disable=inconsistent-return-statements + async def convert_to_single_placement_group( self, resource_group_name: str, vm_scale_set_name: str, @@ -3650,7 +3637,7 @@ async def convert_to_single_placement_group( # pylint: disable=inconsistent-ret """ @distributed_trace_async - async def convert_to_single_placement_group( # pylint: disable=inconsistent-return-statements + async def convert_to_single_placement_group( self, resource_group_name: str, vm_scale_set_name: str, @@ -3673,7 +3660,7 @@ async def convert_to_single_placement_group( # pylint: disable=inconsistent-ret :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3730,7 +3717,7 @@ async def _set_orchestration_service_state_initial( parameters: Union[_models.OrchestrationServiceStateInput, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3938,7 +3925,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtension, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4149,7 +4136,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtensionUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4356,7 +4343,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, vmss_extension_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4486,7 +4473,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_11_01.models.VirtualMachineScaleSetExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4552,7 +4539,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.VirtualMachineScaleSetExtensionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4638,7 +4625,7 @@ def __init__(self, *args, **kwargs) -> None: async def _cancel_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4742,7 +4729,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_os_upgrade_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4848,7 +4835,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_extension_upgrade_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4965,7 +4952,7 @@ async def get_latest( :rtype: ~azure.mgmt.compute.v2022_11_01.models.RollingUpgradeStatusInfo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5037,7 +5024,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetVMExtension, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5257,7 +5244,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetVMExtensionUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5472,7 +5459,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, vm_extension_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5608,7 +5595,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_11_01.models.VirtualMachineScaleSetVMExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5677,7 +5664,7 @@ async def list( :rtype: ~azure.mgmt.compute.v2022_11_01.models.VirtualMachineScaleSetVMExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5754,7 +5741,7 @@ async def _reimage_initial( ] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5953,7 +5940,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _reimage_all_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6062,7 +6049,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _deallocate_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6177,7 +6164,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineScaleSetVM, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6387,7 +6374,7 @@ async def _delete_initial( force_deletion: Optional[bool] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6529,7 +6516,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_11_01.models.VirtualMachineScaleSetVM :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6589,7 +6576,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2022_11_01.models.VirtualMachineScaleSetVMInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6671,7 +6658,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.VirtualMachineScaleSetVMListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6745,7 +6732,7 @@ async def _power_off_initial( skip_shutdown: bool = False, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6867,7 +6854,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _restart_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6975,7 +6962,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7083,7 +7070,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _redeploy_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7217,7 +7204,7 @@ async def retrieve_boot_diagnostics_data( :rtype: ~azure.mgmt.compute.v2022_11_01.models.RetrieveBootDiagnosticsDataResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7264,7 +7251,7 @@ async def retrieve_boot_diagnostics_data( async def _perform_maintenance_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7370,7 +7357,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace_async - async def simulate_eviction( # pylint: disable=inconsistent-return-statements + async def simulate_eviction( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: """The operation to simulate the eviction of spot virtual machine in a VM scale set. @@ -7385,7 +7372,7 @@ async def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7432,7 +7419,7 @@ async def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7659,7 +7646,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineExtension, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7869,7 +7856,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineExtensionUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8075,7 +8062,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_name: str, vm_extension_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8205,7 +8192,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_11_01.models.VirtualMachineExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8265,7 +8252,7 @@ async def list( :rtype: ~azure.mgmt.compute.v2022_11_01.models.VirtualMachineExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8347,7 +8334,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> AsyncIterable["_mode api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8415,7 +8402,7 @@ async def _capture_initial( parameters: Union[_models.VirtualMachineCaptureParameters, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8613,7 +8600,7 @@ async def _create_or_update_initial( parameters: Union[_models.VirtualMachine, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8808,7 +8795,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8996,7 +8983,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_name: str, *, force_deletion: Optional[bool] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9127,7 +9114,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_11_01.models.VirtualMachine :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9184,7 +9171,7 @@ async def instance_view( :rtype: ~azure.mgmt.compute.v2022_11_01.models.VirtualMachineInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9229,7 +9216,7 @@ async def instance_view( async def _convert_to_managed_disks_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9334,7 +9321,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _deallocate_initial( self, resource_group_name: str, vm_name: str, *, hibernate: Optional[bool] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9442,9 +9429,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace_async - async def generalize( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, vm_name: str, **kwargs: Any - ) -> None: + async def generalize(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> None: """Sets the OS state of the virtual machine to generalized. It is recommended to sysprep the virtual machine before performing this operation. :code:`
`For Windows, please refer to `Create a managed image of a generalized VM in Azure @@ -9460,7 +9445,7 @@ async def generalize( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9502,6 +9487,7 @@ async def generalize( # pylint: disable=inconsistent-return-statements def list( self, resource_group_name: str, *, filter: Optional[str] = None, **kwargs: Any ) -> AsyncIterable["_models.VirtualMachine"]: + # pylint: disable=line-too-long """Lists all of the virtual machines in the specified resource group. Use the nextLink property in the response to get the next page of virtual machines. @@ -9523,7 +9509,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9589,6 +9575,7 @@ async def get_next(next_link=None): def list_all( self, *, status_only: Optional[str] = None, filter: Optional[str] = None, **kwargs: Any ) -> AsyncIterable["_models.VirtualMachine"]: + # pylint: disable=line-too-long """Lists all of the virtual machines in the specified subscription. Use the nextLink property in the response to get the next page of virtual machines. @@ -9611,7 +9598,7 @@ def list_all( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9695,7 +9682,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9760,7 +9747,7 @@ async def get_next(next_link=None): async def _power_off_initial( self, resource_group_name: str, vm_name: str, *, skip_shutdown: bool = False, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9869,7 +9856,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _reapply_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9969,7 +9956,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _restart_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10069,7 +10056,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _start_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10169,7 +10156,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _redeploy_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10275,7 +10262,7 @@ async def _reimage_initial( parameters: Optional[Union[_models.VirtualMachineReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10495,7 +10482,7 @@ async def retrieve_boot_diagnostics_data( :rtype: ~azure.mgmt.compute.v2022_11_01.models.RetrieveBootDiagnosticsDataResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10541,7 +10528,7 @@ async def retrieve_boot_diagnostics_data( async def _perform_maintenance_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10643,9 +10630,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace_async - async def simulate_eviction( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, vm_name: str, **kwargs: Any - ) -> None: + async def simulate_eviction(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> None: """The operation to simulate the eviction of spot virtual machine. :param resource_group_name: The name of the resource group. Required. @@ -10656,7 +10641,7 @@ async def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10697,7 +10682,7 @@ async def simulate_eviction( # pylint: disable=inconsistent-return-statements async def _assess_patches_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10813,7 +10798,7 @@ async def _install_patches_initial( install_patches_input: Union[_models.VirtualMachineInstallPatchesParameters, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11011,7 +10996,7 @@ async def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11239,7 +11224,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_11_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11318,7 +11303,7 @@ async def list( :rtype: list[~azure.mgmt.compute.v2022_11_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11379,7 +11364,7 @@ async def list_offers( :rtype: list[~azure.mgmt.compute.v2022_11_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11431,7 +11416,7 @@ async def list_publishers(self, location: str, **kwargs: Any) -> List[_models.Vi :rtype: list[~azure.mgmt.compute.v2022_11_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11488,7 +11473,7 @@ async def list_skus( :rtype: list[~azure.mgmt.compute.v2022_11_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11545,7 +11530,7 @@ async def list_by_edge_zone( :rtype: ~azure.mgmt.compute.v2022_11_01.models.VmImagesInEdgeZoneListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11630,7 +11615,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_11_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11715,7 +11700,7 @@ async def list( :rtype: list[~azure.mgmt.compute.v2022_11_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11780,7 +11765,7 @@ async def list_offers( :rtype: list[~azure.mgmt.compute.v2022_11_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11837,7 +11822,7 @@ async def list_publishers( :rtype: list[~azure.mgmt.compute.v2022_11_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11898,7 +11883,7 @@ async def list_skus( :rtype: list[~azure.mgmt.compute.v2022_11_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11981,7 +11966,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_11_01.models.VirtualMachineExtensionImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12039,7 +12024,7 @@ async def list_types( :rtype: list[~azure.mgmt.compute.v2022_11_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12111,7 +12096,7 @@ async def list_versions( :rtype: list[~azure.mgmt.compute.v2022_11_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12251,7 +12236,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2022_11_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12378,7 +12363,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2022_11_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12433,9 +12418,7 @@ async def update( return deserialized # type: ignore @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, availability_set_name: str, **kwargs: Any - ) -> None: + async def delete(self, resource_group_name: str, availability_set_name: str, **kwargs: Any) -> None: """Delete an availability set. :param resource_group_name: The name of the resource group. Required. @@ -12446,7 +12429,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12496,7 +12479,7 @@ async def get(self, resource_group_name: str, availability_set_name: str, **kwar :rtype: ~azure.mgmt.compute.v2022_11_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12558,7 +12541,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12636,7 +12619,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12719,7 +12702,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12877,7 +12860,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2022_11_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13007,7 +12990,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2022_11_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13062,9 +13045,7 @@ async def update( return deserialized # type: ignore @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, proximity_placement_group_name: str, **kwargs: Any - ) -> None: + async def delete(self, resource_group_name: str, proximity_placement_group_name: str, **kwargs: Any) -> None: """Delete a proximity placement group. :param resource_group_name: The name of the resource group. Required. @@ -13075,7 +13056,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13135,7 +13116,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_11_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13194,7 +13175,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Proximit api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13274,7 +13255,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13435,7 +13416,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2022_11_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13562,7 +13543,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2022_11_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13617,9 +13598,7 @@ async def update( return deserialized # type: ignore @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, host_group_name: str, **kwargs: Any - ) -> None: + async def delete(self, resource_group_name: str, host_group_name: str, **kwargs: Any) -> None: """Delete a dedicated host group. :param resource_group_name: The name of the resource group. Required. @@ -13630,7 +13609,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13692,7 +13671,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_11_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13755,7 +13734,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13832,7 +13811,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Dedicate api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13921,7 +13900,7 @@ async def _create_or_update_initial( parameters: Union[_models.DedicatedHost, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14125,7 +14104,7 @@ async def _update_initial( parameters: Union[_models.DedicatedHostUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14324,7 +14303,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14455,7 +14434,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_11_01.models.DedicatedHost :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14521,7 +14500,7 @@ def list_by_host_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.DedicatedHostListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14586,7 +14565,7 @@ async def get_next(next_link=None): async def _restart_initial( self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14732,7 +14711,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.SshPubli api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14813,7 +14792,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14947,7 +14926,7 @@ async def create( :rtype: ~azure.mgmt.compute.v2022_11_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15075,7 +15054,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2022_11_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15130,9 +15109,7 @@ async def update( return deserialized # type: ignore @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, ssh_public_key_name: str, **kwargs: Any - ) -> None: + async def delete(self, resource_group_name: str, ssh_public_key_name: str, **kwargs: Any) -> None: """Delete an SSH public key. :param resource_group_name: The name of the resource group. Required. @@ -15143,7 +15120,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15195,7 +15172,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_11_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15253,7 +15230,7 @@ async def generate_key_pair( :rtype: ~azure.mgmt.compute.v2022_11_01.models.SshPublicKeyGenerateKeyPairResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15319,7 +15296,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, image_name: str, parameters: Union[_models.Image, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15501,7 +15478,7 @@ async def _update_initial( parameters: Union[_models.ImageUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15681,7 +15658,7 @@ def get_long_running_output(pipeline_response): ) async def _delete_initial(self, resource_group_name: str, image_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15796,7 +15773,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_11_01.models.Image :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15855,7 +15832,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15931,7 +15908,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Image"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16093,7 +16070,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2022_11_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16223,7 +16200,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2022_11_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16280,7 +16257,7 @@ async def update( async def _delete_initial( self, resource_group_name: str, restore_point_collection_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16406,7 +16383,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_11_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16467,7 +16444,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.RestorePointCollectionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16546,7 +16523,7 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.RestorePointCollecti api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.RestorePointCollectionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16635,7 +16612,7 @@ async def _create_initial( parameters: Union[_models.RestorePoint, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16834,7 +16811,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, restore_point_collection_name: str, restore_point_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16964,7 +16941,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_11_01.models.RestorePoint :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17108,7 +17085,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2022_11_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17241,7 +17218,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2022_11_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17296,9 +17273,7 @@ async def update( return deserialized # type: ignore @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, capacity_reservation_group_name: str, **kwargs: Any - ) -> None: + async def delete(self, resource_group_name: str, capacity_reservation_group_name: str, **kwargs: Any) -> None: """The operation to delete a capacity reservation group. This operation is allowed only if all the associated resources are disassociated from the reservation group and all capacity reservations under the reservation group have also been deleted. Please refer to @@ -17312,7 +17287,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17376,7 +17351,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_11_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17450,7 +17425,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.CapacityReservationGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17537,7 +17512,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.CapacityReservationGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17627,7 +17602,7 @@ async def _create_or_update_initial( parameters: Union[_models.CapacityReservation, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17837,7 +17812,7 @@ async def _update_initial( parameters: Union[_models.CapacityReservationUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18040,7 +18015,7 @@ async def _delete_initial( capacity_reservation_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18178,7 +18153,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_11_01.models.CapacityReservation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18244,7 +18219,7 @@ def list_by_capacity_reservation_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.CapacityReservationListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18330,7 +18305,7 @@ def __init__(self, *args, **kwargs) -> None: async def _export_request_rate_by_interval_initial( self, location: str, parameters: Union[_models.RequestRateByIntervalInput, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18508,7 +18483,7 @@ def get_long_running_output(pipeline_response): async def _export_throttled_requests_initial( self, location: str, parameters: Union[_models.ThrottledRequestsInput, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18719,7 +18694,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.RunComman api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.RunCommandListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18792,7 +18767,7 @@ async def get(self, location: str, command_id: str, **kwargs: Any) -> _models.Ru :rtype: ~azure.mgmt.compute.v2022_11_01.models.RunCommandDocument :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18842,7 +18817,7 @@ async def _create_or_update_initial( run_command: Union[_models.VirtualMachineRunCommand, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19051,7 +19026,7 @@ async def _update_initial( run_command: Union[_models.VirtualMachineRunCommandUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19256,7 +19231,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_name: str, run_command_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19386,7 +19361,7 @@ async def get_by_virtual_machine( :rtype: ~azure.mgmt.compute.v2022_11_01.models.VirtualMachineRunCommand :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19454,7 +19429,7 @@ def list_by_virtual_machine( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.VirtualMachineRunCommandsListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19547,7 +19522,7 @@ async def _create_or_update_initial( run_command: Union[_models.VirtualMachineRunCommand, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19765,7 +19740,7 @@ async def _update_initial( run_command: Union[_models.VirtualMachineRunCommandUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19978,7 +19953,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, run_command_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20114,7 +20089,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2022_11_01.models.VirtualMachineRunCommand :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20191,7 +20166,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.VirtualMachineRunCommandsListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_11_01/models/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_11_01/models/__init__.py index 08121e925836d..9080bd806870a 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_11_01/models/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_11_01/models/__init__.py @@ -5,339 +5,350 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._models_py3 import AdditionalCapabilities -from ._models_py3 import AdditionalUnattendContent -from ._models_py3 import AlternativeOption -from ._models_py3 import ApiEntityReference -from ._models_py3 import ApiError -from ._models_py3 import ApiErrorBase -from ._models_py3 import ApplicationProfile -from ._models_py3 import AutomaticOSUpgradePolicy -from ._models_py3 import AutomaticOSUpgradeProperties -from ._models_py3 import AutomaticRepairsPolicy -from ._models_py3 import AvailabilitySet -from ._models_py3 import AvailabilitySetListResult -from ._models_py3 import AvailabilitySetUpdate -from ._models_py3 import AvailablePatchSummary -from ._models_py3 import BillingProfile -from ._models_py3 import BootDiagnostics -from ._models_py3 import BootDiagnosticsInstanceView -from ._models_py3 import CapacityReservation -from ._models_py3 import CapacityReservationGroup -from ._models_py3 import CapacityReservationGroupInstanceView -from ._models_py3 import CapacityReservationGroupListResult -from ._models_py3 import CapacityReservationGroupUpdate -from ._models_py3 import CapacityReservationInstanceView -from ._models_py3 import CapacityReservationInstanceViewWithName -from ._models_py3 import CapacityReservationListResult -from ._models_py3 import CapacityReservationProfile -from ._models_py3 import CapacityReservationUpdate -from ._models_py3 import CapacityReservationUtilization -from ._models_py3 import ComputeOperationListResult -from ._models_py3 import ComputeOperationValue -from ._models_py3 import DataDisk -from ._models_py3 import DataDiskImage -from ._models_py3 import DedicatedHost -from ._models_py3 import DedicatedHostAllocatableVM -from ._models_py3 import DedicatedHostAvailableCapacity -from ._models_py3 import DedicatedHostGroup -from ._models_py3 import DedicatedHostGroupInstanceView -from ._models_py3 import DedicatedHostGroupListResult -from ._models_py3 import DedicatedHostGroupPropertiesAdditionalCapabilities -from ._models_py3 import DedicatedHostGroupUpdate -from ._models_py3 import DedicatedHostInstanceView -from ._models_py3 import DedicatedHostInstanceViewWithName -from ._models_py3 import DedicatedHostListResult -from ._models_py3 import DedicatedHostUpdate -from ._models_py3 import DiagnosticsProfile -from ._models_py3 import DiffDiskSettings -from ._models_py3 import DisallowedConfiguration -from ._models_py3 import DiskEncryptionSetParameters -from ._models_py3 import DiskEncryptionSettings -from ._models_py3 import DiskInstanceView -from ._models_py3 import DiskRestorePointInstanceView -from ._models_py3 import DiskRestorePointReplicationStatus -from ._models_py3 import ExtendedLocation -from ._models_py3 import HardwareProfile -from ._models_py3 import Image -from ._models_py3 import ImageDataDisk -from ._models_py3 import ImageDeprecationStatus -from ._models_py3 import ImageDisk -from ._models_py3 import ImageListResult -from ._models_py3 import ImageOSDisk -from ._models_py3 import ImageReference -from ._models_py3 import ImageStorageProfile -from ._models_py3 import ImageUpdate -from ._models_py3 import InnerError -from ._models_py3 import InstanceViewStatus -from ._models_py3 import KeyVaultKeyReference -from ._models_py3 import KeyVaultSecretReference -from ._models_py3 import LastPatchInstallationSummary -from ._models_py3 import LinuxConfiguration -from ._models_py3 import LinuxParameters -from ._models_py3 import LinuxPatchSettings -from ._models_py3 import LinuxVMGuestPatchAutomaticByPlatformSettings -from ._models_py3 import ListUsagesResult -from ._models_py3 import LogAnalyticsInputBase -from ._models_py3 import LogAnalyticsOperationResult -from ._models_py3 import LogAnalyticsOutput -from ._models_py3 import MaintenanceRedeployStatus -from ._models_py3 import ManagedDiskParameters -from ._models_py3 import NetworkInterfaceReference -from ._models_py3 import NetworkProfile -from ._models_py3 import OSDisk -from ._models_py3 import OSDiskImage -from ._models_py3 import OSImageNotificationProfile -from ._models_py3 import OSProfile -from ._models_py3 import OSProfileProvisioningData -from ._models_py3 import OrchestrationServiceStateInput -from ._models_py3 import OrchestrationServiceSummary -from ._models_py3 import PatchInstallationDetail -from ._models_py3 import PatchSettings -from ._models_py3 import Plan -from ._models_py3 import PriorityMixPolicy -from ._models_py3 import ProximityPlacementGroup -from ._models_py3 import ProximityPlacementGroupListResult -from ._models_py3 import ProximityPlacementGroupPropertiesIntent -from ._models_py3 import ProximityPlacementGroupUpdate -from ._models_py3 import ProxyResource -from ._models_py3 import PublicIPAddressSku -from ._models_py3 import PurchasePlan -from ._models_py3 import RecoveryWalkResponse -from ._models_py3 import RequestRateByIntervalInput -from ._models_py3 import Resource -from ._models_py3 import ResourceWithOptionalLocation -from ._models_py3 import RestorePoint -from ._models_py3 import RestorePointCollection -from ._models_py3 import RestorePointCollectionListResult -from ._models_py3 import RestorePointCollectionSourceProperties -from ._models_py3 import RestorePointCollectionUpdate -from ._models_py3 import RestorePointInstanceView -from ._models_py3 import RestorePointSourceMetadata -from ._models_py3 import RestorePointSourceVMDataDisk -from ._models_py3 import RestorePointSourceVMOSDisk -from ._models_py3 import RestorePointSourceVMStorageProfile -from ._models_py3 import RetrieveBootDiagnosticsDataResult -from ._models_py3 import RollbackStatusInfo -from ._models_py3 import RollingUpgradePolicy -from ._models_py3 import RollingUpgradeProgressInfo -from ._models_py3 import RollingUpgradeRunningStatus -from ._models_py3 import RollingUpgradeStatusInfo -from ._models_py3 import RunCommandDocument -from ._models_py3 import RunCommandDocumentBase -from ._models_py3 import RunCommandInput -from ._models_py3 import RunCommandInputParameter -from ._models_py3 import RunCommandListResult -from ._models_py3 import RunCommandParameterDefinition -from ._models_py3 import RunCommandResult -from ._models_py3 import ScaleInPolicy -from ._models_py3 import ScheduledEventsProfile -from ._models_py3 import SecurityProfile -from ._models_py3 import ServiceArtifactReference -from ._models_py3 import Sku -from ._models_py3 import SpotRestorePolicy -from ._models_py3 import SshConfiguration -from ._models_py3 import SshPublicKey -from ._models_py3 import SshPublicKeyGenerateKeyPairResult -from ._models_py3 import SshPublicKeyResource -from ._models_py3 import SshPublicKeyUpdateResource -from ._models_py3 import SshPublicKeysGroupListResult -from ._models_py3 import StorageProfile -from ._models_py3 import SubResource -from ._models_py3 import SubResourceReadOnly -from ._models_py3 import SubResourceWithColocationStatus -from ._models_py3 import SystemData -from ._models_py3 import TerminateNotificationProfile -from ._models_py3 import ThrottledRequestsInput -from ._models_py3 import UefiSettings -from ._models_py3 import UpdateResource -from ._models_py3 import UpgradeOperationHistoricalStatusInfo -from ._models_py3 import UpgradeOperationHistoricalStatusInfoProperties -from ._models_py3 import UpgradeOperationHistoryStatus -from ._models_py3 import UpgradePolicy -from ._models_py3 import Usage -from ._models_py3 import UsageName -from ._models_py3 import UserAssignedIdentitiesValue -from ._models_py3 import VMDiskSecurityProfile -from ._models_py3 import VMGalleryApplication -from ._models_py3 import VMScaleSetConvertToSinglePlacementGroupInput -from ._models_py3 import VMSizeProperties -from ._models_py3 import VaultCertificate -from ._models_py3 import VaultSecretGroup -from ._models_py3 import VirtualHardDisk -from ._models_py3 import VirtualMachine -from ._models_py3 import VirtualMachineAgentInstanceView -from ._models_py3 import VirtualMachineAssessPatchesResult -from ._models_py3 import VirtualMachineCaptureParameters -from ._models_py3 import VirtualMachineCaptureResult -from ._models_py3 import VirtualMachineExtension -from ._models_py3 import VirtualMachineExtensionHandlerInstanceView -from ._models_py3 import VirtualMachineExtensionImage -from ._models_py3 import VirtualMachineExtensionInstanceView -from ._models_py3 import VirtualMachineExtensionUpdate -from ._models_py3 import VirtualMachineExtensionsListResult -from ._models_py3 import VirtualMachineHealthStatus -from ._models_py3 import VirtualMachineIdentity -from ._models_py3 import VirtualMachineImage -from ._models_py3 import VirtualMachineImageFeature -from ._models_py3 import VirtualMachineImageResource -from ._models_py3 import VirtualMachineInstallPatchesParameters -from ._models_py3 import VirtualMachineInstallPatchesResult -from ._models_py3 import VirtualMachineInstanceView -from ._models_py3 import VirtualMachineIpTag -from ._models_py3 import VirtualMachineListResult -from ._models_py3 import VirtualMachineNetworkInterfaceConfiguration -from ._models_py3 import VirtualMachineNetworkInterfaceDnsSettingsConfiguration -from ._models_py3 import VirtualMachineNetworkInterfaceIPConfiguration -from ._models_py3 import VirtualMachinePatchStatus -from ._models_py3 import VirtualMachinePublicIPAddressConfiguration -from ._models_py3 import VirtualMachinePublicIPAddressDnsSettingsConfiguration -from ._models_py3 import VirtualMachineReimageParameters -from ._models_py3 import VirtualMachineRunCommand -from ._models_py3 import VirtualMachineRunCommandInstanceView -from ._models_py3 import VirtualMachineRunCommandScriptSource -from ._models_py3 import VirtualMachineRunCommandUpdate -from ._models_py3 import VirtualMachineRunCommandsListResult -from ._models_py3 import VirtualMachineScaleSet -from ._models_py3 import VirtualMachineScaleSetDataDisk -from ._models_py3 import VirtualMachineScaleSetExtension -from ._models_py3 import VirtualMachineScaleSetExtensionListResult -from ._models_py3 import VirtualMachineScaleSetExtensionProfile -from ._models_py3 import VirtualMachineScaleSetExtensionUpdate -from ._models_py3 import VirtualMachineScaleSetHardwareProfile -from ._models_py3 import VirtualMachineScaleSetIPConfiguration -from ._models_py3 import VirtualMachineScaleSetIdentity -from ._models_py3 import VirtualMachineScaleSetInstanceView -from ._models_py3 import VirtualMachineScaleSetInstanceViewStatusesSummary -from ._models_py3 import VirtualMachineScaleSetIpTag -from ._models_py3 import VirtualMachineScaleSetListOSUpgradeHistory -from ._models_py3 import VirtualMachineScaleSetListResult -from ._models_py3 import VirtualMachineScaleSetListSkusResult -from ._models_py3 import VirtualMachineScaleSetListWithLinkResult -from ._models_py3 import VirtualMachineScaleSetManagedDiskParameters -from ._models_py3 import VirtualMachineScaleSetNetworkConfiguration -from ._models_py3 import VirtualMachineScaleSetNetworkConfigurationDnsSettings -from ._models_py3 import VirtualMachineScaleSetNetworkProfile -from ._models_py3 import VirtualMachineScaleSetOSDisk -from ._models_py3 import VirtualMachineScaleSetOSProfile -from ._models_py3 import VirtualMachineScaleSetPublicIPAddressConfiguration -from ._models_py3 import VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings -from ._models_py3 import VirtualMachineScaleSetReimageParameters -from ._models_py3 import VirtualMachineScaleSetSku -from ._models_py3 import VirtualMachineScaleSetSkuCapacity -from ._models_py3 import VirtualMachineScaleSetStorageProfile -from ._models_py3 import VirtualMachineScaleSetUpdate -from ._models_py3 import VirtualMachineScaleSetUpdateIPConfiguration -from ._models_py3 import VirtualMachineScaleSetUpdateNetworkConfiguration -from ._models_py3 import VirtualMachineScaleSetUpdateNetworkProfile -from ._models_py3 import VirtualMachineScaleSetUpdateOSDisk -from ._models_py3 import VirtualMachineScaleSetUpdateOSProfile -from ._models_py3 import VirtualMachineScaleSetUpdatePublicIPAddressConfiguration -from ._models_py3 import VirtualMachineScaleSetUpdateStorageProfile -from ._models_py3 import VirtualMachineScaleSetUpdateVMProfile -from ._models_py3 import VirtualMachineScaleSetVM -from ._models_py3 import VirtualMachineScaleSetVMExtension -from ._models_py3 import VirtualMachineScaleSetVMExtensionUpdate -from ._models_py3 import VirtualMachineScaleSetVMExtensionsListResult -from ._models_py3 import VirtualMachineScaleSetVMExtensionsSummary -from ._models_py3 import VirtualMachineScaleSetVMInstanceIDs -from ._models_py3 import VirtualMachineScaleSetVMInstanceRequiredIDs -from ._models_py3 import VirtualMachineScaleSetVMInstanceView -from ._models_py3 import VirtualMachineScaleSetVMListResult -from ._models_py3 import VirtualMachineScaleSetVMNetworkProfileConfiguration -from ._models_py3 import VirtualMachineScaleSetVMProfile -from ._models_py3 import VirtualMachineScaleSetVMProtectionPolicy -from ._models_py3 import VirtualMachineScaleSetVMReimageParameters -from ._models_py3 import VirtualMachineSize -from ._models_py3 import VirtualMachineSizeListResult -from ._models_py3 import VirtualMachineSoftwarePatchProperties -from ._models_py3 import VirtualMachineStatusCodeCount -from ._models_py3 import VirtualMachineUpdate -from ._models_py3 import VmImagesInEdgeZoneListResult -from ._models_py3 import WinRMConfiguration -from ._models_py3 import WinRMListener -from ._models_py3 import WindowsConfiguration -from ._models_py3 import WindowsParameters -from ._models_py3 import WindowsVMGuestPatchAutomaticByPlatformSettings +from typing import TYPE_CHECKING -from ._compute_management_client_enums import AlternativeType -from ._compute_management_client_enums import ArchitectureTypes -from ._compute_management_client_enums import AvailabilitySetSkuTypes -from ._compute_management_client_enums import CachingTypes -from ._compute_management_client_enums import CapacityReservationGroupInstanceViewTypes -from ._compute_management_client_enums import CapacityReservationInstanceViewTypes -from ._compute_management_client_enums import ConsistencyModeTypes -from ._compute_management_client_enums import DedicatedHostLicenseTypes -from ._compute_management_client_enums import DeleteOptions -from ._compute_management_client_enums import DiffDiskOptions -from ._compute_management_client_enums import DiffDiskPlacement -from ._compute_management_client_enums import DiskControllerTypes -from ._compute_management_client_enums import DiskCreateOptionTypes -from ._compute_management_client_enums import DiskDeleteOptionTypes -from ._compute_management_client_enums import DiskDetachOptionTypes -from ._compute_management_client_enums import ExecutionState -from ._compute_management_client_enums import ExpandTypesForGetCapacityReservationGroups -from ._compute_management_client_enums import ExpandTypesForGetVMScaleSets -from ._compute_management_client_enums import ExtendedLocationTypes -from ._compute_management_client_enums import HyperVGeneration -from ._compute_management_client_enums import HyperVGenerationType -from ._compute_management_client_enums import HyperVGenerationTypes -from ._compute_management_client_enums import IPVersion -from ._compute_management_client_enums import IPVersions -from ._compute_management_client_enums import ImageState -from ._compute_management_client_enums import InstanceViewTypes -from ._compute_management_client_enums import IntervalInMins -from ._compute_management_client_enums import LinuxPatchAssessmentMode -from ._compute_management_client_enums import LinuxVMGuestPatchAutomaticByPlatformRebootSetting -from ._compute_management_client_enums import LinuxVMGuestPatchMode -from ._compute_management_client_enums import MaintenanceOperationResultCodeTypes -from ._compute_management_client_enums import NetworkApiVersion -from ._compute_management_client_enums import OperatingSystemStateTypes -from ._compute_management_client_enums import OperatingSystemType -from ._compute_management_client_enums import OperatingSystemTypes -from ._compute_management_client_enums import OrchestrationMode -from ._compute_management_client_enums import OrchestrationServiceNames -from ._compute_management_client_enums import OrchestrationServiceState -from ._compute_management_client_enums import OrchestrationServiceStateAction -from ._compute_management_client_enums import PatchAssessmentState -from ._compute_management_client_enums import PatchInstallationState -from ._compute_management_client_enums import PatchOperationStatus -from ._compute_management_client_enums import ProtocolTypes -from ._compute_management_client_enums import ProximityPlacementGroupType -from ._compute_management_client_enums import PublicIPAddressSkuName -from ._compute_management_client_enums import PublicIPAddressSkuTier -from ._compute_management_client_enums import PublicIPAllocationMethod -from ._compute_management_client_enums import RepairAction -from ._compute_management_client_enums import ResourceIdentityType -from ._compute_management_client_enums import RestorePointCollectionExpandOptions -from ._compute_management_client_enums import RestorePointExpandOptions -from ._compute_management_client_enums import RollingUpgradeActionType -from ._compute_management_client_enums import RollingUpgradeStatusCode -from ._compute_management_client_enums import SecurityEncryptionTypes -from ._compute_management_client_enums import SecurityTypes -from ._compute_management_client_enums import SettingNames -from ._compute_management_client_enums import StatusLevelTypes -from ._compute_management_client_enums import StorageAccountTypes -from ._compute_management_client_enums import UpgradeMode -from ._compute_management_client_enums import UpgradeOperationInvoker -from ._compute_management_client_enums import UpgradeState -from ._compute_management_client_enums import VMGuestPatchClassificationLinux -from ._compute_management_client_enums import VMGuestPatchClassificationWindows -from ._compute_management_client_enums import VMGuestPatchRebootBehavior -from ._compute_management_client_enums import VMGuestPatchRebootSetting -from ._compute_management_client_enums import VMGuestPatchRebootStatus -from ._compute_management_client_enums import VirtualMachineEvictionPolicyTypes -from ._compute_management_client_enums import VirtualMachinePriorityTypes -from ._compute_management_client_enums import VirtualMachineScaleSetScaleInRules -from ._compute_management_client_enums import VirtualMachineScaleSetSkuScaleType -from ._compute_management_client_enums import VirtualMachineSizeTypes -from ._compute_management_client_enums import VmDiskTypes -from ._compute_management_client_enums import WindowsPatchAssessmentMode -from ._compute_management_client_enums import WindowsVMGuestPatchAutomaticByPlatformRebootSetting -from ._compute_management_client_enums import WindowsVMGuestPatchMode +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + + +from ._models_py3 import ( # type: ignore + AdditionalCapabilities, + AdditionalUnattendContent, + AlternativeOption, + ApiEntityReference, + ApiError, + ApiErrorBase, + ApplicationProfile, + AutomaticOSUpgradePolicy, + AutomaticOSUpgradeProperties, + AutomaticRepairsPolicy, + AvailabilitySet, + AvailabilitySetListResult, + AvailabilitySetUpdate, + AvailablePatchSummary, + BillingProfile, + BootDiagnostics, + BootDiagnosticsInstanceView, + CapacityReservation, + CapacityReservationGroup, + CapacityReservationGroupInstanceView, + CapacityReservationGroupListResult, + CapacityReservationGroupUpdate, + CapacityReservationInstanceView, + CapacityReservationInstanceViewWithName, + CapacityReservationListResult, + CapacityReservationProfile, + CapacityReservationUpdate, + CapacityReservationUtilization, + ComputeOperationListResult, + ComputeOperationValue, + DataDisk, + DataDiskImage, + DedicatedHost, + DedicatedHostAllocatableVM, + DedicatedHostAvailableCapacity, + DedicatedHostGroup, + DedicatedHostGroupInstanceView, + DedicatedHostGroupListResult, + DedicatedHostGroupPropertiesAdditionalCapabilities, + DedicatedHostGroupUpdate, + DedicatedHostInstanceView, + DedicatedHostInstanceViewWithName, + DedicatedHostListResult, + DedicatedHostUpdate, + DiagnosticsProfile, + DiffDiskSettings, + DisallowedConfiguration, + DiskEncryptionSetParameters, + DiskEncryptionSettings, + DiskInstanceView, + DiskRestorePointInstanceView, + DiskRestorePointReplicationStatus, + ExtendedLocation, + HardwareProfile, + Image, + ImageDataDisk, + ImageDeprecationStatus, + ImageDisk, + ImageListResult, + ImageOSDisk, + ImageReference, + ImageStorageProfile, + ImageUpdate, + InnerError, + InstanceViewStatus, + KeyVaultKeyReference, + KeyVaultSecretReference, + LastPatchInstallationSummary, + LinuxConfiguration, + LinuxParameters, + LinuxPatchSettings, + LinuxVMGuestPatchAutomaticByPlatformSettings, + ListUsagesResult, + LogAnalyticsInputBase, + LogAnalyticsOperationResult, + LogAnalyticsOutput, + MaintenanceRedeployStatus, + ManagedDiskParameters, + NetworkInterfaceReference, + NetworkProfile, + OSDisk, + OSDiskImage, + OSImageNotificationProfile, + OSProfile, + OSProfileProvisioningData, + OrchestrationServiceStateInput, + OrchestrationServiceSummary, + PatchInstallationDetail, + PatchSettings, + Plan, + PriorityMixPolicy, + ProximityPlacementGroup, + ProximityPlacementGroupListResult, + ProximityPlacementGroupPropertiesIntent, + ProximityPlacementGroupUpdate, + ProxyResource, + PublicIPAddressSku, + PurchasePlan, + RecoveryWalkResponse, + RequestRateByIntervalInput, + Resource, + ResourceWithOptionalLocation, + RestorePoint, + RestorePointCollection, + RestorePointCollectionListResult, + RestorePointCollectionSourceProperties, + RestorePointCollectionUpdate, + RestorePointInstanceView, + RestorePointSourceMetadata, + RestorePointSourceVMDataDisk, + RestorePointSourceVMOSDisk, + RestorePointSourceVMStorageProfile, + RetrieveBootDiagnosticsDataResult, + RollbackStatusInfo, + RollingUpgradePolicy, + RollingUpgradeProgressInfo, + RollingUpgradeRunningStatus, + RollingUpgradeStatusInfo, + RunCommandDocument, + RunCommandDocumentBase, + RunCommandInput, + RunCommandInputParameter, + RunCommandListResult, + RunCommandParameterDefinition, + RunCommandResult, + ScaleInPolicy, + ScheduledEventsProfile, + SecurityProfile, + ServiceArtifactReference, + Sku, + SpotRestorePolicy, + SshConfiguration, + SshPublicKey, + SshPublicKeyGenerateKeyPairResult, + SshPublicKeyResource, + SshPublicKeyUpdateResource, + SshPublicKeysGroupListResult, + StorageProfile, + SubResource, + SubResourceReadOnly, + SubResourceWithColocationStatus, + SystemData, + TerminateNotificationProfile, + ThrottledRequestsInput, + UefiSettings, + UpdateResource, + UpgradeOperationHistoricalStatusInfo, + UpgradeOperationHistoricalStatusInfoProperties, + UpgradeOperationHistoryStatus, + UpgradePolicy, + Usage, + UsageName, + UserAssignedIdentitiesValue, + VMDiskSecurityProfile, + VMGalleryApplication, + VMScaleSetConvertToSinglePlacementGroupInput, + VMSizeProperties, + VaultCertificate, + VaultSecretGroup, + VirtualHardDisk, + VirtualMachine, + VirtualMachineAgentInstanceView, + VirtualMachineAssessPatchesResult, + VirtualMachineCaptureParameters, + VirtualMachineCaptureResult, + VirtualMachineExtension, + VirtualMachineExtensionHandlerInstanceView, + VirtualMachineExtensionImage, + VirtualMachineExtensionInstanceView, + VirtualMachineExtensionUpdate, + VirtualMachineExtensionsListResult, + VirtualMachineHealthStatus, + VirtualMachineIdentity, + VirtualMachineImage, + VirtualMachineImageFeature, + VirtualMachineImageResource, + VirtualMachineInstallPatchesParameters, + VirtualMachineInstallPatchesResult, + VirtualMachineInstanceView, + VirtualMachineIpTag, + VirtualMachineListResult, + VirtualMachineNetworkInterfaceConfiguration, + VirtualMachineNetworkInterfaceDnsSettingsConfiguration, + VirtualMachineNetworkInterfaceIPConfiguration, + VirtualMachinePatchStatus, + VirtualMachinePublicIPAddressConfiguration, + VirtualMachinePublicIPAddressDnsSettingsConfiguration, + VirtualMachineReimageParameters, + VirtualMachineRunCommand, + VirtualMachineRunCommandInstanceView, + VirtualMachineRunCommandScriptSource, + VirtualMachineRunCommandUpdate, + VirtualMachineRunCommandsListResult, + VirtualMachineScaleSet, + VirtualMachineScaleSetDataDisk, + VirtualMachineScaleSetExtension, + VirtualMachineScaleSetExtensionListResult, + VirtualMachineScaleSetExtensionProfile, + VirtualMachineScaleSetExtensionUpdate, + VirtualMachineScaleSetHardwareProfile, + VirtualMachineScaleSetIPConfiguration, + VirtualMachineScaleSetIdentity, + VirtualMachineScaleSetInstanceView, + VirtualMachineScaleSetInstanceViewStatusesSummary, + VirtualMachineScaleSetIpTag, + VirtualMachineScaleSetListOSUpgradeHistory, + VirtualMachineScaleSetListResult, + VirtualMachineScaleSetListSkusResult, + VirtualMachineScaleSetListWithLinkResult, + VirtualMachineScaleSetManagedDiskParameters, + VirtualMachineScaleSetNetworkConfiguration, + VirtualMachineScaleSetNetworkConfigurationDnsSettings, + VirtualMachineScaleSetNetworkProfile, + VirtualMachineScaleSetOSDisk, + VirtualMachineScaleSetOSProfile, + VirtualMachineScaleSetPublicIPAddressConfiguration, + VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings, + VirtualMachineScaleSetReimageParameters, + VirtualMachineScaleSetSku, + VirtualMachineScaleSetSkuCapacity, + VirtualMachineScaleSetStorageProfile, + VirtualMachineScaleSetUpdate, + VirtualMachineScaleSetUpdateIPConfiguration, + VirtualMachineScaleSetUpdateNetworkConfiguration, + VirtualMachineScaleSetUpdateNetworkProfile, + VirtualMachineScaleSetUpdateOSDisk, + VirtualMachineScaleSetUpdateOSProfile, + VirtualMachineScaleSetUpdatePublicIPAddressConfiguration, + VirtualMachineScaleSetUpdateStorageProfile, + VirtualMachineScaleSetUpdateVMProfile, + VirtualMachineScaleSetVM, + VirtualMachineScaleSetVMExtension, + VirtualMachineScaleSetVMExtensionUpdate, + VirtualMachineScaleSetVMExtensionsListResult, + VirtualMachineScaleSetVMExtensionsSummary, + VirtualMachineScaleSetVMInstanceIDs, + VirtualMachineScaleSetVMInstanceRequiredIDs, + VirtualMachineScaleSetVMInstanceView, + VirtualMachineScaleSetVMListResult, + VirtualMachineScaleSetVMNetworkProfileConfiguration, + VirtualMachineScaleSetVMProfile, + VirtualMachineScaleSetVMProtectionPolicy, + VirtualMachineScaleSetVMReimageParameters, + VirtualMachineSize, + VirtualMachineSizeListResult, + VirtualMachineSoftwarePatchProperties, + VirtualMachineStatusCodeCount, + VirtualMachineUpdate, + VmImagesInEdgeZoneListResult, + WinRMConfiguration, + WinRMListener, + WindowsConfiguration, + WindowsParameters, + WindowsVMGuestPatchAutomaticByPlatformSettings, +) + +from ._compute_management_client_enums import ( # type: ignore + AlternativeType, + ArchitectureTypes, + AvailabilitySetSkuTypes, + CachingTypes, + CapacityReservationGroupInstanceViewTypes, + CapacityReservationInstanceViewTypes, + ConsistencyModeTypes, + DedicatedHostLicenseTypes, + DeleteOptions, + DiffDiskOptions, + DiffDiskPlacement, + DiskControllerTypes, + DiskCreateOptionTypes, + DiskDeleteOptionTypes, + DiskDetachOptionTypes, + ExecutionState, + ExpandTypesForGetCapacityReservationGroups, + ExpandTypesForGetVMScaleSets, + ExtendedLocationTypes, + HyperVGeneration, + HyperVGenerationType, + HyperVGenerationTypes, + IPVersion, + IPVersions, + ImageState, + InstanceViewTypes, + IntervalInMins, + LinuxPatchAssessmentMode, + LinuxVMGuestPatchAutomaticByPlatformRebootSetting, + LinuxVMGuestPatchMode, + MaintenanceOperationResultCodeTypes, + NetworkApiVersion, + OperatingSystemStateTypes, + OperatingSystemType, + OperatingSystemTypes, + OrchestrationMode, + OrchestrationServiceNames, + OrchestrationServiceState, + OrchestrationServiceStateAction, + PatchAssessmentState, + PatchInstallationState, + PatchOperationStatus, + ProtocolTypes, + ProximityPlacementGroupType, + PublicIPAddressSkuName, + PublicIPAddressSkuTier, + PublicIPAllocationMethod, + RepairAction, + ResourceIdentityType, + RestorePointCollectionExpandOptions, + RestorePointExpandOptions, + RollingUpgradeActionType, + RollingUpgradeStatusCode, + SecurityEncryptionTypes, + SecurityTypes, + SettingNames, + StatusLevelTypes, + StorageAccountTypes, + UpgradeMode, + UpgradeOperationInvoker, + UpgradeState, + VMGuestPatchClassificationLinux, + VMGuestPatchClassificationWindows, + VMGuestPatchRebootBehavior, + VMGuestPatchRebootSetting, + VMGuestPatchRebootStatus, + VirtualMachineEvictionPolicyTypes, + VirtualMachinePriorityTypes, + VirtualMachineScaleSetScaleInRules, + VirtualMachineScaleSetSkuScaleType, + VirtualMachineSizeTypes, + VmDiskTypes, + WindowsPatchAssessmentMode, + WindowsVMGuestPatchAutomaticByPlatformRebootSetting, + WindowsVMGuestPatchMode, +) 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__ = [ @@ -671,5 +682,5 @@ "WindowsVMGuestPatchAutomaticByPlatformRebootSetting", "WindowsVMGuestPatchMode", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_11_01/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_11_01/models/_models_py3.py index 4156a35673fed..b156d16ada68e 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_11_01/models/_models_py3.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_11_01/models/_models_py3.py @@ -1,5 +1,5 @@ -# 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. @@ -16,10 +16,9 @@ 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 if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object @@ -476,7 +475,7 @@ def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kw self.tags = tags -class AvailabilitySet(Resource): # pylint: disable=too-many-instance-attributes +class AvailabilitySet(Resource): """Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see `Availability sets @@ -896,7 +895,7 @@ def __init__(self, **kwargs: Any) -> None: self.status = None -class CapacityReservation(Resource): # pylint: disable=too-many-instance-attributes +class CapacityReservation(Resource): """Specifies information about the capacity reservation. Variables are only populated by the server, and will be ignored when sending a request. @@ -1534,7 +1533,7 @@ def __init__(self, **kwargs: Any) -> None: self.provider = None -class DataDisk(_serialization.Model): # pylint: disable=too-many-instance-attributes +class DataDisk(_serialization.Model): """Describes a data disk. Variables are only populated by the server, and will be ignored when sending a request. @@ -1747,7 +1746,7 @@ def __init__(self, **kwargs: Any) -> None: self.lun = None -class DedicatedHost(Resource): # pylint: disable=too-many-instance-attributes +class DedicatedHost(Resource): """Specifies information about the Dedicated host. Variables are only populated by the server, and will be ignored when sending a request. @@ -1927,7 +1926,7 @@ def __init__( self.allocatable_v_ms = allocatable_v_ms -class DedicatedHostGroup(Resource): # pylint: disable=too-many-instance-attributes +class DedicatedHostGroup(Resource): """Specifies information about the dedicated host group that the dedicated hosts should be assigned to. :code:`
`:code:`
` Currently, a dedicated host can only be added to a dedicated host group at creation time. An existing dedicated host cannot be added to another @@ -3749,7 +3748,7 @@ def __init__(self, *, secret_url: str, source_vault: "_models.SubResource", **kw self.source_vault = source_vault -class LastPatchInstallationSummary(_serialization.Model): # pylint: disable=too-many-instance-attributes +class LastPatchInstallationSummary(_serialization.Model): """Describes the properties of the last installed patch summary. Variables are only populated by the server, and will be ignored when sending a request. @@ -4517,7 +4516,7 @@ def __init__(self, **kwargs: Any) -> None: self.service_state = None -class OSDisk(_serialization.Model): # pylint: disable=too-many-instance-attributes +class OSDisk(_serialization.Model): """Specifies information about the operating system disk used by the virtual machine. :code:`
`:code:`
` For more information about disks, see `About disks and VHDs for Azure virtual machines `_. @@ -5230,7 +5229,7 @@ def __init__( self.regular_priority_percentage_above_base = regular_priority_percentage_above_base -class ProximityPlacementGroup(Resource): # pylint: disable=too-many-instance-attributes +class ProximityPlacementGroup(Resource): """Specifies information about the proximity placement group. Variables are only populated by the server, and will be ignored when sending a request. @@ -8040,7 +8039,7 @@ def __init__(self, *, uri: Optional[str] = None, **kwargs: Any) -> None: self.uri = uri -class VirtualMachine(Resource): # pylint: disable=too-many-instance-attributes +class VirtualMachine(Resource): """Describes a Virtual Machine. Variables are only populated by the server, and will be ignored when sending a request. @@ -8622,7 +8621,7 @@ def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylin self.resources = None -class VirtualMachineExtension(ResourceWithOptionalLocation): # pylint: disable=too-many-instance-attributes +class VirtualMachineExtension(ResourceWithOptionalLocation): """Describes a Virtual Machine Extension. Variables are only populated by the server, and will be ignored when sending a request. @@ -8979,7 +8978,7 @@ def __init__(self, *, value: Optional[List["_models.VirtualMachineExtension"]] = self.value = value -class VirtualMachineExtensionUpdate(UpdateResource): # pylint: disable=too-many-instance-attributes +class VirtualMachineExtensionUpdate(UpdateResource): """Describes a Virtual Machine Extension. :ivar tags: Resource tags. @@ -9241,7 +9240,7 @@ def __init__( self.extended_location = extended_location -class VirtualMachineImage(VirtualMachineImageResource): # pylint: disable=too-many-instance-attributes +class VirtualMachineImage(VirtualMachineImageResource): """Describes a Virtual Machine Image. All required parameters must be populated in order to send to server. @@ -9466,7 +9465,7 @@ def __init__( self.linux_parameters = linux_parameters -class VirtualMachineInstallPatchesResult(_serialization.Model): # pylint: disable=too-many-instance-attributes +class VirtualMachineInstallPatchesResult(_serialization.Model): """The result summary of an installation operation. Variables are only populated by the server, and will be ignored when sending a request. @@ -9556,7 +9555,7 @@ def __init__(self, **kwargs: Any) -> None: self.error = None -class VirtualMachineInstanceView(_serialization.Model): # pylint: disable=too-many-instance-attributes +class VirtualMachineInstanceView(_serialization.Model): """The instance view of a virtual machine. Variables are only populated by the server, and will be ignored when sending a request. @@ -9765,9 +9764,7 @@ def __init__( self.next_link = next_link -class VirtualMachineNetworkInterfaceConfiguration( - _serialization.Model -): # pylint: disable=too-many-instance-attributes,name-too-long +class VirtualMachineNetworkInterfaceConfiguration(_serialization.Model): # pylint: disable=name-too-long """Describes a virtual machine network interface configurations. All required parameters must be populated in order to send to server. @@ -10254,7 +10251,7 @@ def __init__( self.os_profile = os_profile -class VirtualMachineRunCommand(Resource): # pylint: disable=too-many-instance-attributes +class VirtualMachineRunCommand(Resource): """Describes a Virtual Machine run command. Variables are only populated by the server, and will be ignored when sending a request. @@ -10537,7 +10534,7 @@ def __init__( self.next_link = next_link -class VirtualMachineRunCommandUpdate(UpdateResource): # pylint: disable=too-many-instance-attributes +class VirtualMachineRunCommandUpdate(UpdateResource): """Describes a Virtual Machine run command. Variables are only populated by the server, and will be ignored when sending a request. @@ -10650,7 +10647,7 @@ def __init__( self.instance_view = None -class VirtualMachineScaleSet(Resource): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSet(Resource): """Describes a Virtual Machine Scale Set. Variables are only populated by the server, and will be ignored when sending a request. @@ -11058,7 +11055,7 @@ def __init__( self.delete_option = delete_option -class VirtualMachineScaleSetExtension(SubResourceReadOnly): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetExtension(SubResourceReadOnly): """Describes a Virtual Machine Scale Set Extension. Variables are only populated by the server, and will be ignored when sending a request. @@ -11280,7 +11277,7 @@ def __init__( self.extensions_time_budget = extensions_time_budget -class VirtualMachineScaleSetExtensionUpdate(SubResourceReadOnly): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetExtensionUpdate(SubResourceReadOnly): """Describes a Virtual Machine Scale Set Extension. Variables are only populated by the server, and will be ignored when sending a request. @@ -12113,7 +12110,7 @@ def __init__( self.network_api_version = network_api_version -class VirtualMachineScaleSetOSDisk(_serialization.Model): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetOSDisk(_serialization.Model): """Describes a virtual machine scale set operating system disk. All required parameters must be populated in order to send to server. @@ -12751,7 +12748,7 @@ def __init__( self.disk_controller_type = disk_controller_type -class VirtualMachineScaleSetUpdate(UpdateResource): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetUpdate(UpdateResource): """Describes a Virtual Machine Scale Set. :ivar tags: Resource tags. @@ -13011,9 +13008,7 @@ def __init__( self.load_balancer_inbound_nat_pools = load_balancer_inbound_nat_pools -class VirtualMachineScaleSetUpdateNetworkConfiguration( - SubResource -): # pylint: disable=too-many-instance-attributes,name-too-long +class VirtualMachineScaleSetUpdateNetworkConfiguration(SubResource): # pylint: disable=name-too-long """Describes a virtual machine scale set network profile's network configurations. :ivar id: Resource Id. @@ -13427,7 +13422,7 @@ def __init__( self.disk_controller_type = disk_controller_type -class VirtualMachineScaleSetUpdateVMProfile(_serialization.Model): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetUpdateVMProfile(_serialization.Model): """Describes a virtual machine scale set virtual machine profile. :ivar os_profile: The virtual machine scale set OS profile. @@ -13540,7 +13535,7 @@ def __init__( self.hardware_profile = hardware_profile -class VirtualMachineScaleSetVM(Resource): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetVM(Resource): """Describes a virtual machine scale set virtual machine. Variables are only populated by the server, and will be ignored when sending a request. @@ -13800,7 +13795,7 @@ def __init__( # pylint: disable=too-many-locals self.user_data = user_data -class VirtualMachineScaleSetVMExtension(SubResourceReadOnly): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetVMExtension(SubResourceReadOnly): """Describes a VMSS VM Extension. Variables are only populated by the server, and will be ignored when sending a request. @@ -13996,7 +13991,7 @@ def __init__(self, **kwargs: Any) -> None: self.statuses_summary = None -class VirtualMachineScaleSetVMExtensionUpdate(SubResourceReadOnly): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetVMExtensionUpdate(SubResourceReadOnly): """Describes a VMSS VM Extension. Variables are only populated by the server, and will be ignored when sending a request. @@ -14176,7 +14171,7 @@ def __init__(self, *, instance_ids: List[str], **kwargs: Any) -> None: self.instance_ids = instance_ids -class VirtualMachineScaleSetVMInstanceView(_serialization.Model): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetVMInstanceView(_serialization.Model): """The instance view of a virtual machine scale set VM. Variables are only populated by the server, and will be ignored when sending a request. @@ -14400,7 +14395,7 @@ def __init__( self.network_interface_configurations = network_interface_configurations -class VirtualMachineScaleSetVMProfile(_serialization.Model): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetVMProfile(_serialization.Model): """Describes a virtual machine scale set virtual machine profile. :ivar os_profile: Specifies the operating system settings for the virtual machines in the scale @@ -14832,7 +14827,7 @@ def __init__(self, **kwargs: Any) -> None: self.count = None -class VirtualMachineUpdate(UpdateResource): # pylint: disable=too-many-instance-attributes +class VirtualMachineUpdate(UpdateResource): """Describes a Virtual Machine Update. Variables are only populated by the server, and will be ignored when sending a request. diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_11_01/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_11_01/operations/__init__.py index 3cc8e8e7a73a8..5cc9a11e23416 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_11_01/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_11_01/operations/__init__.py @@ -5,36 +5,42 @@ # Code generated by Microsoft (R) AutoRest 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 UsageOperations -from ._operations import VirtualMachineSizesOperations -from ._operations import VirtualMachineScaleSetsOperations -from ._operations import VirtualMachineScaleSetExtensionsOperations -from ._operations import VirtualMachineScaleSetRollingUpgradesOperations -from ._operations import VirtualMachineScaleSetVMExtensionsOperations -from ._operations import VirtualMachineScaleSetVMsOperations -from ._operations import VirtualMachineExtensionsOperations -from ._operations import VirtualMachinesOperations -from ._operations import VirtualMachineImagesOperations -from ._operations import VirtualMachineImagesEdgeZoneOperations -from ._operations import VirtualMachineExtensionImagesOperations -from ._operations import AvailabilitySetsOperations -from ._operations import ProximityPlacementGroupsOperations -from ._operations import DedicatedHostGroupsOperations -from ._operations import DedicatedHostsOperations -from ._operations import SshPublicKeysOperations -from ._operations import ImagesOperations -from ._operations import RestorePointCollectionsOperations -from ._operations import RestorePointsOperations -from ._operations import CapacityReservationGroupsOperations -from ._operations import CapacityReservationsOperations -from ._operations import LogAnalyticsOperations -from ._operations import VirtualMachineRunCommandsOperations -from ._operations import VirtualMachineScaleSetVMRunCommandsOperations +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 UsageOperations # type: ignore +from ._operations import VirtualMachineSizesOperations # type: ignore +from ._operations import VirtualMachineScaleSetsOperations # type: ignore +from ._operations import VirtualMachineScaleSetExtensionsOperations # type: ignore +from ._operations import VirtualMachineScaleSetRollingUpgradesOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMExtensionsOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMsOperations # type: ignore +from ._operations import VirtualMachineExtensionsOperations # type: ignore +from ._operations import VirtualMachinesOperations # type: ignore +from ._operations import VirtualMachineImagesOperations # type: ignore +from ._operations import VirtualMachineImagesEdgeZoneOperations # type: ignore +from ._operations import VirtualMachineExtensionImagesOperations # type: ignore +from ._operations import AvailabilitySetsOperations # type: ignore +from ._operations import ProximityPlacementGroupsOperations # type: ignore +from ._operations import DedicatedHostGroupsOperations # type: ignore +from ._operations import DedicatedHostsOperations # type: ignore +from ._operations import SshPublicKeysOperations # type: ignore +from ._operations import ImagesOperations # type: ignore +from ._operations import RestorePointCollectionsOperations # type: ignore +from ._operations import RestorePointsOperations # type: ignore +from ._operations import CapacityReservationGroupsOperations # type: ignore +from ._operations import CapacityReservationsOperations # type: ignore +from ._operations import LogAnalyticsOperations # type: ignore +from ._operations import VirtualMachineRunCommandsOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMRunCommandsOperations # 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__ = [ @@ -65,5 +71,5 @@ "VirtualMachineRunCommandsOperations", "VirtualMachineScaleSetVMRunCommandsOperations", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_11_01/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_11_01/operations/_operations.py index 93ae1ca481531..fc3e0158f4cf1 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_11_01/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_11_01/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. @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Iterable, Iterator, List, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Iterable, Iterator, List, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -36,7 +36,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, HttpResponse], T, Dict[str, Any]], Any]] @@ -5967,7 +5967,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.ComputeOperationValue"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.ComputeOperationListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6064,7 +6064,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.Usage"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.ListUsagesResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6163,7 +6163,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.VirtualMachine api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6264,7 +6264,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> Iterable["_models.Vi api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6332,7 +6332,7 @@ def _create_or_update_initial( parameters: Union[_models.VirtualMachineScaleSet, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6524,7 +6524,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineScaleSetUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6713,7 +6713,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, *, force_deletion: Optional[bool] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6842,7 +6842,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_11_01.models.VirtualMachineScaleSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6892,7 +6892,7 @@ def _deallocate_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7089,7 +7089,7 @@ def _delete_instances_initial( force_deletion: Optional[bool] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7297,7 +7297,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2022_11_01.models.VirtualMachineScaleSetInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7357,7 +7357,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Vir api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7436,7 +7436,7 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.VirtualMachineScaleSet"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.VirtualMachineScaleSetListWithLinkResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7519,7 +7519,7 @@ def list_skus( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.VirtualMachineScaleSetListSkusResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7603,7 +7603,7 @@ def get_os_upgrade_history( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.VirtualMachineScaleSetListOSUpgradeHistory] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7674,7 +7674,7 @@ def _power_off_initial( skip_shutdown: bool = False, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7887,7 +7887,7 @@ def _restart_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8076,7 +8076,7 @@ def _start_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8265,7 +8265,7 @@ def _redeploy_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8457,7 +8457,7 @@ def _perform_maintenance_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8655,7 +8655,7 @@ def _update_instances_initial( vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8841,7 +8841,7 @@ def _reimage_initial( vm_scale_set_reimage_input: Optional[Union[_models.VirtualMachineScaleSetReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9034,7 +9034,7 @@ def _reimage_all_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9250,7 +9250,7 @@ def force_recovery_service_fabric_platform_update_domain_walk( # pylint: disabl :rtype: ~azure.mgmt.compute.v2022_11_01.models.RecoveryWalkResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9296,7 +9296,7 @@ def force_recovery_service_fabric_platform_update_domain_walk( # pylint: disabl return deserialized # type: ignore @overload - def convert_to_single_placement_group( # pylint: disable=inconsistent-return-statements + def convert_to_single_placement_group( self, resource_group_name: str, vm_scale_set_name: str, @@ -9324,7 +9324,7 @@ def convert_to_single_placement_group( # pylint: disable=inconsistent-return-st """ @overload - def convert_to_single_placement_group( # pylint: disable=inconsistent-return-statements + def convert_to_single_placement_group( self, resource_group_name: str, vm_scale_set_name: str, @@ -9374,7 +9374,7 @@ def convert_to_single_placement_group( # pylint: disable=inconsistent-return-st :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9431,7 +9431,7 @@ def _set_orchestration_service_state_initial( parameters: Union[_models.OrchestrationServiceStateInput, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9639,7 +9639,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtension, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9850,7 +9850,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtensionUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10057,7 +10057,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, vmss_extension_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10187,7 +10187,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_11_01.models.VirtualMachineScaleSetExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10253,7 +10253,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.VirtualMachineScaleSetExtensionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10337,7 +10337,7 @@ def __init__(self, *args, **kwargs): self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") def _cancel_initial(self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10439,7 +10439,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_os_upgrade_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10545,7 +10545,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_extension_upgrade_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10662,7 +10662,7 @@ def get_latest( :rtype: ~azure.mgmt.compute.v2022_11_01.models.RollingUpgradeStatusInfo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10734,7 +10734,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetVMExtension, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10954,7 +10954,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetVMExtensionUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11169,7 +11169,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, vm_extension_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11305,7 +11305,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_11_01.models.VirtualMachineScaleSetVMExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11374,7 +11374,7 @@ def list( :rtype: ~azure.mgmt.compute.v2022_11_01.models.VirtualMachineScaleSetVMExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11451,7 +11451,7 @@ def _reimage_initial( ] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11650,7 +11650,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _reimage_all_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11759,7 +11759,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _deallocate_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11874,7 +11874,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineScaleSetVM, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12084,7 +12084,7 @@ def _delete_initial( force_deletion: Optional[bool] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12226,7 +12226,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_11_01.models.VirtualMachineScaleSetVM :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12286,7 +12286,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2022_11_01.models.VirtualMachineScaleSetVMInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12368,7 +12368,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.VirtualMachineScaleSetVMListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12442,7 +12442,7 @@ def _power_off_initial( skip_shutdown: bool = False, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12564,7 +12564,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _restart_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12672,7 +12672,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12780,7 +12780,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _redeploy_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12914,7 +12914,7 @@ def retrieve_boot_diagnostics_data( :rtype: ~azure.mgmt.compute.v2022_11_01.models.RetrieveBootDiagnosticsDataResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12961,7 +12961,7 @@ def retrieve_boot_diagnostics_data( def _perform_maintenance_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13082,7 +13082,7 @@ def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13129,7 +13129,7 @@ def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13353,7 +13353,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineExtension, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13563,7 +13563,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineExtensionUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13769,7 +13769,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_name: str, vm_extension_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13899,7 +13899,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_11_01.models.VirtualMachineExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13959,7 +13959,7 @@ def list( :rtype: ~azure.mgmt.compute.v2022_11_01.models.VirtualMachineExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14040,7 +14040,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> Iterable["_models.Vi api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14108,7 +14108,7 @@ def _capture_initial( parameters: Union[_models.VirtualMachineCaptureParameters, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14306,7 +14306,7 @@ def _create_or_update_initial( parameters: Union[_models.VirtualMachine, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14498,7 +14498,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14683,7 +14683,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_name: str, *, force_deletion: Optional[bool] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14814,7 +14814,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_11_01.models.VirtualMachine :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14871,7 +14871,7 @@ def instance_view( :rtype: ~azure.mgmt.compute.v2022_11_01.models.VirtualMachineInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14916,7 +14916,7 @@ def instance_view( def _convert_to_managed_disks_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15019,7 +15019,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _deallocate_initial( self, resource_group_name: str, vm_name: str, *, hibernate: Optional[bool] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15145,7 +15145,7 @@ def generalize( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15187,6 +15187,7 @@ def generalize( # pylint: disable=inconsistent-return-statements def list( self, resource_group_name: str, *, filter: Optional[str] = None, **kwargs: Any ) -> Iterable["_models.VirtualMachine"]: + # pylint: disable=line-too-long """Lists all of the virtual machines in the specified resource group. Use the nextLink property in the response to get the next page of virtual machines. @@ -15207,7 +15208,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15273,6 +15274,7 @@ def get_next(next_link=None): def list_all( self, *, status_only: Optional[str] = None, filter: Optional[str] = None, **kwargs: Any ) -> Iterable["_models.VirtualMachine"]: + # pylint: disable=line-too-long """Lists all of the virtual machines in the specified subscription. Use the nextLink property in the response to get the next page of virtual machines. @@ -15294,7 +15296,7 @@ def list_all( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15377,7 +15379,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15442,7 +15444,7 @@ def get_next(next_link=None): def _power_off_initial( self, resource_group_name: str, vm_name: str, *, skip_shutdown: bool = False, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15551,7 +15553,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _reapply_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15651,7 +15653,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _restart_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15751,7 +15753,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _start_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15851,7 +15853,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _redeploy_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15957,7 +15959,7 @@ def _reimage_initial( parameters: Optional[Union[_models.VirtualMachineReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16177,7 +16179,7 @@ def retrieve_boot_diagnostics_data( :rtype: ~azure.mgmt.compute.v2022_11_01.models.RetrieveBootDiagnosticsDataResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16221,7 +16223,7 @@ def retrieve_boot_diagnostics_data( return deserialized # type: ignore def _perform_maintenance_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16334,7 +16336,7 @@ def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16373,7 +16375,7 @@ def simulate_eviction( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore def _assess_patches_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16489,7 +16491,7 @@ def _install_patches_initial( install_patches_input: Union[_models.VirtualMachineInstallPatchesParameters, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16687,7 +16689,7 @@ def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16912,7 +16914,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_11_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16991,7 +16993,7 @@ def list( :rtype: list[~azure.mgmt.compute.v2022_11_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17052,7 +17054,7 @@ def list_offers( :rtype: list[~azure.mgmt.compute.v2022_11_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17104,7 +17106,7 @@ def list_publishers(self, location: str, **kwargs: Any) -> List[_models.VirtualM :rtype: list[~azure.mgmt.compute.v2022_11_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17161,7 +17163,7 @@ def list_skus( :rtype: list[~azure.mgmt.compute.v2022_11_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17216,7 +17218,7 @@ def list_by_edge_zone(self, location: str, edge_zone: str, **kwargs: Any) -> _mo :rtype: ~azure.mgmt.compute.v2022_11_01.models.VmImagesInEdgeZoneListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17301,7 +17303,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_11_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17386,7 +17388,7 @@ def list( :rtype: list[~azure.mgmt.compute.v2022_11_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17451,7 +17453,7 @@ def list_offers( :rtype: list[~azure.mgmt.compute.v2022_11_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17508,7 +17510,7 @@ def list_publishers( :rtype: list[~azure.mgmt.compute.v2022_11_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17569,7 +17571,7 @@ def list_skus( :rtype: list[~azure.mgmt.compute.v2022_11_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17652,7 +17654,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_11_01.models.VirtualMachineExtensionImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17710,7 +17712,7 @@ def list_types( :rtype: list[~azure.mgmt.compute.v2022_11_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17782,7 +17784,7 @@ def list_versions( :rtype: list[~azure.mgmt.compute.v2022_11_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17922,7 +17924,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2022_11_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18049,7 +18051,7 @@ def update( :rtype: ~azure.mgmt.compute.v2022_11_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18117,7 +18119,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18167,7 +18169,7 @@ def get(self, resource_group_name: str, availability_set_name: str, **kwargs: An :rtype: ~azure.mgmt.compute.v2022_11_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18228,7 +18230,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18305,7 +18307,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Ava api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18387,7 +18389,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18545,7 +18547,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2022_11_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18675,7 +18677,7 @@ def update( :rtype: ~azure.mgmt.compute.v2022_11_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18743,7 +18745,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18803,7 +18805,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_11_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18862,7 +18864,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.ProximityPlac api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18942,7 +18944,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19103,7 +19105,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2022_11_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19230,7 +19232,7 @@ def update( :rtype: ~azure.mgmt.compute.v2022_11_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19298,7 +19300,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19360,7 +19362,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_11_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19420,7 +19422,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19496,7 +19498,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.DedicatedHost api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19585,7 +19587,7 @@ def _create_or_update_initial( parameters: Union[_models.DedicatedHost, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19786,7 +19788,7 @@ def _update_initial( parameters: Union[_models.DedicatedHostUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19982,7 +19984,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20113,7 +20115,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_11_01.models.DedicatedHost :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20178,7 +20180,7 @@ def list_by_host_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.DedicatedHostListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20243,7 +20245,7 @@ def get_next(next_link=None): def _restart_initial( self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20389,7 +20391,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.SshPublicKeyR api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20470,7 +20472,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20604,7 +20606,7 @@ def create( :rtype: ~azure.mgmt.compute.v2022_11_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20732,7 +20734,7 @@ def update( :rtype: ~azure.mgmt.compute.v2022_11_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20800,7 +20802,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20850,7 +20852,7 @@ def get(self, resource_group_name: str, ssh_public_key_name: str, **kwargs: Any) :rtype: ~azure.mgmt.compute.v2022_11_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20908,7 +20910,7 @@ def generate_key_pair( :rtype: ~azure.mgmt.compute.v2022_11_01.models.SshPublicKeyGenerateKeyPairResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20974,7 +20976,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, image_name: str, parameters: Union[_models.Image, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21156,7 +21158,7 @@ def _update_initial( parameters: Union[_models.ImageUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21336,7 +21338,7 @@ def get_long_running_output(pipeline_response): ) def _delete_initial(self, resource_group_name: str, image_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21451,7 +21453,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_11_01.models.Image :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21510,7 +21512,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21586,7 +21588,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Image"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21748,7 +21750,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2022_11_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21878,7 +21880,7 @@ def update( :rtype: ~azure.mgmt.compute.v2022_11_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21935,7 +21937,7 @@ def update( def _delete_initial( self, resource_group_name: str, restore_point_collection_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22061,7 +22063,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_11_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22122,7 +22124,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Res api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.RestorePointCollectionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22201,7 +22203,7 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.RestorePointCollection"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.RestorePointCollectionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22290,7 +22292,7 @@ def _create_initial( parameters: Union[_models.RestorePoint, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22489,7 +22491,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, restore_point_collection_name: str, restore_point_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22619,7 +22621,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_11_01.models.RestorePoint :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22763,7 +22765,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2022_11_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22896,7 +22898,7 @@ def update( :rtype: ~azure.mgmt.compute.v2022_11_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22967,7 +22969,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23031,7 +23033,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_11_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23105,7 +23107,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.CapacityReservationGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23192,7 +23194,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.CapacityReservationGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23282,7 +23284,7 @@ def _create_or_update_initial( parameters: Union[_models.CapacityReservation, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23492,7 +23494,7 @@ def _update_initial( parameters: Union[_models.CapacityReservationUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23695,7 +23697,7 @@ def _delete_initial( capacity_reservation_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23833,7 +23835,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_11_01.models.CapacityReservation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23899,7 +23901,7 @@ def list_by_capacity_reservation_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.CapacityReservationListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23985,7 +23987,7 @@ def __init__(self, *args, **kwargs): def _export_request_rate_by_interval_initial( self, location: str, parameters: Union[_models.RequestRateByIntervalInput, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24162,7 +24164,7 @@ def get_long_running_output(pipeline_response): def _export_throttled_requests_initial( self, location: str, parameters: Union[_models.ThrottledRequestsInput, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24372,7 +24374,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.RunCommandDocu api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.RunCommandListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24445,7 +24447,7 @@ def get(self, location: str, command_id: str, **kwargs: Any) -> _models.RunComma :rtype: ~azure.mgmt.compute.v2022_11_01.models.RunCommandDocument :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24495,7 +24497,7 @@ def _create_or_update_initial( run_command: Union[_models.VirtualMachineRunCommand, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24704,7 +24706,7 @@ def _update_initial( run_command: Union[_models.VirtualMachineRunCommandUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24909,7 +24911,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_name: str, run_command_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25039,7 +25041,7 @@ def get_by_virtual_machine( :rtype: ~azure.mgmt.compute.v2022_11_01.models.VirtualMachineRunCommand :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25107,7 +25109,7 @@ def list_by_virtual_machine( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.VirtualMachineRunCommandsListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25200,7 +25202,7 @@ def _create_or_update_initial( run_command: Union[_models.VirtualMachineRunCommand, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25418,7 +25420,7 @@ def _update_initial( run_command: Union[_models.VirtualMachineRunCommandUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25631,7 +25633,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, run_command_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25767,7 +25769,7 @@ def get( :rtype: ~azure.mgmt.compute.v2022_11_01.models.VirtualMachineRunCommand :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25844,7 +25846,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2022-11-01")) cls: ClsType[_models.VirtualMachineRunCommandsListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_01_02/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_01_02/__init__.py index 3b1b6244b2375..ab7c46e8991db 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_01_02/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_01_02/__init__.py @@ -5,15 +5,21 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._compute_management_client import ComputeManagementClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._compute_management_client import ComputeManagementClient # 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__ = [ "ComputeManagementClient", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_01_02/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_01_02/_compute_management_client.py index 1147472b2cbd4..ed4177a18bfee 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_01_02/_compute_management_client.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_01_02/_compute_management_client.py @@ -27,11 +27,10 @@ ) if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class ComputeManagementClient: # pylint: disable=client-accepts-api-version-keyword +class ComputeManagementClient: """Compute Client. :ivar disks: DisksOperations operations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_01_02/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_01_02/_configuration.py index b2b73c7a3e5ed..07ea3715e8593 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_01_02/_configuration.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_01_02/_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 ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ComputeManagementClient. Note that all parameters used to create this instance are saved as instance diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_01_02/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_01_02/_version.py index d79b2760319c5..e5754a47ce68f 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_01_02/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_01_02/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "33.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_01_02/aio/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_01_02/aio/__init__.py index 0715f50185586..d3fd1ba93379a 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_01_02/aio/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_01_02/aio/__init__.py @@ -5,12 +5,18 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._compute_management_client import ComputeManagementClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._compute_management_client import ComputeManagementClient # 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__ = [ "ComputeManagementClient", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_01_02/aio/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_01_02/aio/_compute_management_client.py index 6324b50fa31b3..201a417a21eb1 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_01_02/aio/_compute_management_client.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_01_02/aio/_compute_management_client.py @@ -27,11 +27,10 @@ ) if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class ComputeManagementClient: # pylint: disable=client-accepts-api-version-keyword +class ComputeManagementClient: """Compute Client. :ivar disks: DisksOperations operations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_01_02/aio/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_01_02/aio/_configuration.py index 059850de7f964..edcd7c327440f 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_01_02/aio/_configuration.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_01_02/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 ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ComputeManagementClient. Note that all parameters used to create this instance are saved as instance diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_01_02/aio/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_01_02/aio/operations/__init__.py index 8ca1cc2598c3b..0e0c2d8aaf8d4 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_01_02/aio/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_01_02/aio/operations/__init__.py @@ -5,15 +5,21 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._operations import DisksOperations -from ._operations import DiskAccessesOperations -from ._operations import DiskEncryptionSetsOperations -from ._operations import DiskRestorePointOperations -from ._operations import SnapshotsOperations +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._operations import DisksOperations # type: ignore +from ._operations import DiskAccessesOperations # type: ignore +from ._operations import DiskEncryptionSetsOperations # type: ignore +from ._operations import DiskRestorePointOperations # type: ignore +from ._operations import SnapshotsOperations # 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__ = [ @@ -23,5 +29,5 @@ "DiskRestorePointOperations", "SnapshotsOperations", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_01_02/aio/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_01_02/aio/operations/_operations.py index fc973c055ba18..9f6c224890e6f 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_01_02/aio/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_01_02/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. @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -76,7 +76,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]] @@ -104,7 +104,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.Disk, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -288,7 +288,7 @@ def get_long_running_output(pipeline_response): async def _update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.DiskUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -483,7 +483,7 @@ async def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.compute.v2023_01_02.models.Disk :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -526,7 +526,7 @@ async def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> return deserialized # type: ignore async def _delete_initial(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -643,7 +643,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-01-02")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -718,7 +718,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Disk"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-01-02")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -785,7 +785,7 @@ async def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -980,7 +980,7 @@ def get_long_running_output(pipeline_response): async def _revoke_access_initial( self, resource_group_name: str, disk_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1113,7 +1113,7 @@ async def _create_or_update_initial( disk_access: Union[_models.DiskAccess, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1310,7 +1310,7 @@ async def _update_initial( disk_access: Union[_models.DiskAccessUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1514,7 +1514,7 @@ async def get(self, resource_group_name: str, disk_access_name: str, **kwargs: A :rtype: ~azure.mgmt.compute.v2023_01_02.models.DiskAccess :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1559,7 +1559,7 @@ async def get(self, resource_group_name: str, disk_access_name: str, **kwargs: A async def _delete_initial( self, resource_group_name: str, disk_access_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1679,7 +1679,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-01-02")) cls: ClsType[_models.DiskAccessList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1755,7 +1755,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.DiskAccess"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-01-02")) cls: ClsType[_models.DiskAccessList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1831,7 +1831,7 @@ async def get_private_link_resources( :rtype: ~azure.mgmt.compute.v2023_01_02.models.PrivateLinkResourceListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1881,7 +1881,7 @@ async def _update_a_private_endpoint_connection_initial( # pylint: disable=name private_endpoint_connection: Union[_models.PrivateEndpointConnection, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2109,7 +2109,7 @@ async def get_a_private_endpoint_connection( :rtype: ~azure.mgmt.compute.v2023_01_02.models.PrivateEndpointConnection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2155,7 +2155,7 @@ async def get_a_private_endpoint_connection( async def _delete_a_private_endpoint_connection_initial( # pylint: disable=name-too-long self, resource_group_name: str, disk_access_name: str, private_endpoint_connection_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2286,7 +2286,7 @@ def list_private_endpoint_connections( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-01-02")) cls: ClsType[_models.PrivateEndpointConnectionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2376,7 +2376,7 @@ async def _create_or_update_initial( disk_encryption_set: Union[_models.DiskEncryptionSet, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2577,7 +2577,7 @@ async def _update_initial( disk_encryption_set: Union[_models.DiskEncryptionSetUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2788,7 +2788,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_01_02.models.DiskEncryptionSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2833,7 +2833,7 @@ async def get( async def _delete_initial( self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2955,7 +2955,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-01-02")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3031,7 +3031,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.DiskEncryptionSet"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-01-02")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3113,7 +3113,7 @@ def list_associated_resources( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-01-02")) cls: ClsType[_models.ResourceUriList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3221,7 +3221,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_01_02.models.DiskRestorePoint :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3290,7 +3290,7 @@ def list_by_restore_point( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-01-02")) cls: ClsType[_models.DiskRestorePointList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3362,7 +3362,7 @@ async def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3584,7 +3584,7 @@ async def _revoke_access_initial( disk_restore_point_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3726,7 +3726,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, snapshot_name: str, snapshot: Union[_models.Snapshot, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3917,7 +3917,7 @@ async def _update_initial( snapshot: Union[_models.SnapshotUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4121,7 +4121,7 @@ async def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) :rtype: ~azure.mgmt.compute.v2023_01_02.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4166,7 +4166,7 @@ async def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) async def _delete_initial( self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4284,7 +4284,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-01-02")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4360,7 +4360,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Snapshot"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-01-02")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4427,7 +4427,7 @@ async def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4622,7 +4622,7 @@ def get_long_running_output(pipeline_response): async def _revoke_access_initial( self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_01_02/models/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_01_02/models/__init__.py index da6dfe3cf02d0..79b8cce52e884 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_01_02/models/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_01_02/models/__init__.py @@ -5,82 +5,93 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._models_py3 import AccessUri -from ._models_py3 import ApiError -from ._models_py3 import ApiErrorBase -from ._models_py3 import CopyCompletionError -from ._models_py3 import CreationData -from ._models_py3 import Disk -from ._models_py3 import DiskAccess -from ._models_py3 import DiskAccessList -from ._models_py3 import DiskAccessUpdate -from ._models_py3 import DiskEncryptionSet -from ._models_py3 import DiskEncryptionSetList -from ._models_py3 import DiskEncryptionSetUpdate -from ._models_py3 import DiskList -from ._models_py3 import DiskRestorePoint -from ._models_py3 import DiskRestorePointList -from ._models_py3 import DiskSecurityProfile -from ._models_py3 import DiskSku -from ._models_py3 import DiskUpdate -from ._models_py3 import Encryption -from ._models_py3 import EncryptionSetIdentity -from ._models_py3 import EncryptionSettingsCollection -from ._models_py3 import EncryptionSettingsElement -from ._models_py3 import ExtendedLocation -from ._models_py3 import GrantAccessData -from ._models_py3 import ImageDiskReference -from ._models_py3 import InnerError -from ._models_py3 import KeyForDiskEncryptionSet -from ._models_py3 import KeyVaultAndKeyReference -from ._models_py3 import KeyVaultAndSecretReference -from ._models_py3 import PrivateEndpoint -from ._models_py3 import PrivateEndpointConnection -from ._models_py3 import PrivateEndpointConnectionListResult -from ._models_py3 import PrivateLinkResource -from ._models_py3 import PrivateLinkResourceListResult -from ._models_py3 import PrivateLinkServiceConnectionState -from ._models_py3 import PropertyUpdatesInProgress -from ._models_py3 import ProxyOnlyResource -from ._models_py3 import PurchasePlan -from ._models_py3 import Resource -from ._models_py3 import ResourceUriList -from ._models_py3 import ResourceWithOptionalLocation -from ._models_py3 import ShareInfoElement -from ._models_py3 import Snapshot -from ._models_py3 import SnapshotList -from ._models_py3 import SnapshotSku -from ._models_py3 import SnapshotUpdate -from ._models_py3 import SourceVault -from ._models_py3 import SubResource -from ._models_py3 import SubResourceReadOnly -from ._models_py3 import SupportedCapabilities -from ._models_py3 import SystemData -from ._models_py3 import UserAssignedIdentitiesValue +from typing import TYPE_CHECKING -from ._compute_management_client_enums import AccessLevel -from ._compute_management_client_enums import Architecture -from ._compute_management_client_enums import CopyCompletionErrorReason -from ._compute_management_client_enums import DataAccessAuthMode -from ._compute_management_client_enums import DiskCreateOption -from ._compute_management_client_enums import DiskEncryptionSetIdentityType -from ._compute_management_client_enums import DiskEncryptionSetType -from ._compute_management_client_enums import DiskSecurityTypes -from ._compute_management_client_enums import DiskState -from ._compute_management_client_enums import DiskStorageAccountTypes -from ._compute_management_client_enums import EncryptionType -from ._compute_management_client_enums import ExtendedLocationTypes -from ._compute_management_client_enums import FileFormat -from ._compute_management_client_enums import HyperVGeneration -from ._compute_management_client_enums import NetworkAccessPolicy -from ._compute_management_client_enums import OperatingSystemTypes -from ._compute_management_client_enums import PrivateEndpointConnectionProvisioningState -from ._compute_management_client_enums import PrivateEndpointServiceConnectionStatus -from ._compute_management_client_enums import PublicNetworkAccess -from ._compute_management_client_enums import SnapshotStorageAccountTypes +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + + +from ._models_py3 import ( # type: ignore + AccessUri, + ApiError, + ApiErrorBase, + CopyCompletionError, + CreationData, + Disk, + DiskAccess, + DiskAccessList, + DiskAccessUpdate, + DiskEncryptionSet, + DiskEncryptionSetList, + DiskEncryptionSetUpdate, + DiskList, + DiskRestorePoint, + DiskRestorePointList, + DiskSecurityProfile, + DiskSku, + DiskUpdate, + Encryption, + EncryptionSetIdentity, + EncryptionSettingsCollection, + EncryptionSettingsElement, + ExtendedLocation, + GrantAccessData, + ImageDiskReference, + InnerError, + KeyForDiskEncryptionSet, + KeyVaultAndKeyReference, + KeyVaultAndSecretReference, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateEndpointConnectionListResult, + PrivateLinkResource, + PrivateLinkResourceListResult, + PrivateLinkServiceConnectionState, + PropertyUpdatesInProgress, + ProxyOnlyResource, + PurchasePlan, + Resource, + ResourceUriList, + ResourceWithOptionalLocation, + ShareInfoElement, + Snapshot, + SnapshotList, + SnapshotSku, + SnapshotUpdate, + SourceVault, + SubResource, + SubResourceReadOnly, + SupportedCapabilities, + SystemData, + UserAssignedIdentitiesValue, +) + +from ._compute_management_client_enums import ( # type: ignore + AccessLevel, + Architecture, + CopyCompletionErrorReason, + DataAccessAuthMode, + DiskCreateOption, + DiskEncryptionSetIdentityType, + DiskEncryptionSetType, + DiskSecurityTypes, + DiskState, + DiskStorageAccountTypes, + EncryptionType, + ExtendedLocationTypes, + FileFormat, + HyperVGeneration, + NetworkAccessPolicy, + OperatingSystemTypes, + PrivateEndpointConnectionProvisioningState, + PrivateEndpointServiceConnectionStatus, + PublicNetworkAccess, + SnapshotStorageAccountTypes, +) 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__ = [ @@ -157,5 +168,5 @@ "PublicNetworkAccess", "SnapshotStorageAccountTypes", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_01_02/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_01_02/models/_models_py3.py index e6a452825529c..fa6ef98036a12 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_01_02/models/_models_py3.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_01_02/models/_models_py3.py @@ -1,5 +1,5 @@ -# 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. @@ -12,7 +12,6 @@ from ... import _serialization if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models @@ -171,7 +170,7 @@ def __init__( self.error_message = error_message -class CreationData(_serialization.Model): # pylint: disable=too-many-instance-attributes +class CreationData(_serialization.Model): """Data used when creating a disk. Variables are only populated by the server, and will be ignored when sending a request. @@ -348,7 +347,7 @@ def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kw self.tags = tags -class Disk(Resource): # pylint: disable=too-many-instance-attributes +class Disk(Resource): """Disk resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -843,7 +842,7 @@ def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> N self.tags = tags -class DiskEncryptionSet(Resource): # pylint: disable=too-many-instance-attributes +class DiskEncryptionSet(Resource): """disk encryption set resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -1144,7 +1143,7 @@ def __init__(self, **kwargs: Any) -> None: self.type = None -class DiskRestorePoint(ProxyOnlyResource): # pylint: disable=too-many-instance-attributes +class DiskRestorePoint(ProxyOnlyResource): """Properties of disk restore point. Variables are only populated by the server, and will be ignored when sending a request. @@ -1411,7 +1410,7 @@ def __init__(self, *, name: Optional[Union[str, "_models.DiskStorageAccountTypes self.tier = None -class DiskUpdate(_serialization.Model): # pylint: disable=too-many-instance-attributes +class DiskUpdate(_serialization.Model): """Disk update resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -2535,7 +2534,7 @@ def __init__(self, **kwargs: Any) -> None: self.vm_uri = None -class Snapshot(Resource): # pylint: disable=too-many-instance-attributes +class Snapshot(Resource): """Snapshot resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -2873,7 +2872,7 @@ def __init__( self.tier = None -class SnapshotUpdate(_serialization.Model): # pylint: disable=too-many-instance-attributes +class SnapshotUpdate(_serialization.Model): """Snapshot update resource. :ivar tags: Resource tags. diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_01_02/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_01_02/operations/__init__.py index 8ca1cc2598c3b..0e0c2d8aaf8d4 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_01_02/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_01_02/operations/__init__.py @@ -5,15 +5,21 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._operations import DisksOperations -from ._operations import DiskAccessesOperations -from ._operations import DiskEncryptionSetsOperations -from ._operations import DiskRestorePointOperations -from ._operations import SnapshotsOperations +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._operations import DisksOperations # type: ignore +from ._operations import DiskAccessesOperations # type: ignore +from ._operations import DiskEncryptionSetsOperations # type: ignore +from ._operations import DiskRestorePointOperations # type: ignore +from ._operations import SnapshotsOperations # 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__ = [ @@ -23,5 +29,5 @@ "DiskRestorePointOperations", "SnapshotsOperations", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_01_02/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_01_02/operations/_operations.py index 62a5d71fe79c8..ca5c945c8b736 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_01_02/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_01_02/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. @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -36,7 +36,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, HttpResponse], T, Dict[str, Any]], Any]] @@ -1280,7 +1280,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.Disk, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1464,7 +1464,7 @@ def get_long_running_output(pipeline_response): def _update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.DiskUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1659,7 +1659,7 @@ def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> _model :rtype: ~azure.mgmt.compute.v2023_01_02.models.Disk :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1702,7 +1702,7 @@ def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> _model return deserialized # type: ignore def _delete_initial(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1819,7 +1819,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-01-02")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1894,7 +1894,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Disk"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-01-02")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1961,7 +1961,7 @@ def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2151,7 +2151,7 @@ def get_long_running_output(pipeline_response): ) def _revoke_access_initial(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2282,7 +2282,7 @@ def _create_or_update_initial( disk_access: Union[_models.DiskAccess, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2476,7 +2476,7 @@ def _update_initial( disk_access: Union[_models.DiskAccessUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2677,7 +2677,7 @@ def get(self, resource_group_name: str, disk_access_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.compute.v2023_01_02.models.DiskAccess :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2720,7 +2720,7 @@ def get(self, resource_group_name: str, disk_access_name: str, **kwargs: Any) -> return deserialized # type: ignore def _delete_initial(self, resource_group_name: str, disk_access_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2837,7 +2837,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-01-02")) cls: ClsType[_models.DiskAccessList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2912,7 +2912,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.DiskAccess"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-01-02")) cls: ClsType[_models.DiskAccessList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2988,7 +2988,7 @@ def get_private_link_resources( :rtype: ~azure.mgmt.compute.v2023_01_02.models.PrivateLinkResourceListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3038,7 +3038,7 @@ def _update_a_private_endpoint_connection_initial( # pylint: disable=name-too-l private_endpoint_connection: Union[_models.PrivateEndpointConnection, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3266,7 +3266,7 @@ def get_a_private_endpoint_connection( :rtype: ~azure.mgmt.compute.v2023_01_02.models.PrivateEndpointConnection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3312,7 +3312,7 @@ def get_a_private_endpoint_connection( def _delete_a_private_endpoint_connection_initial( # pylint: disable=name-too-long self, resource_group_name: str, disk_access_name: str, private_endpoint_connection_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3443,7 +3443,7 @@ def list_private_endpoint_connections( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-01-02")) cls: ClsType[_models.PrivateEndpointConnectionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3533,7 +3533,7 @@ def _create_or_update_initial( disk_encryption_set: Union[_models.DiskEncryptionSet, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3731,7 +3731,7 @@ def _update_initial( disk_encryption_set: Union[_models.DiskEncryptionSetUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3937,7 +3937,7 @@ def get(self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: :rtype: ~azure.mgmt.compute.v2023_01_02.models.DiskEncryptionSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3982,7 +3982,7 @@ def get(self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: def _delete_initial( self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4099,7 +4099,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-01-02")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4174,7 +4174,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.DiskEncryptionSet"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-01-02")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4256,7 +4256,7 @@ def list_associated_resources( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-01-02")) cls: ClsType[_models.ResourceUriList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4364,7 +4364,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_01_02.models.DiskRestorePoint :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4432,7 +4432,7 @@ def list_by_restore_point( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-01-02")) cls: ClsType[_models.DiskRestorePointList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4504,7 +4504,7 @@ def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4723,7 +4723,7 @@ def _revoke_access_initial( disk_restore_point_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4865,7 +4865,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, snapshot_name: str, snapshot: Union[_models.Snapshot, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5053,7 +5053,7 @@ def _update_initial( snapshot: Union[_models.SnapshotUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5254,7 +5254,7 @@ def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> _m :rtype: ~azure.mgmt.compute.v2023_01_02.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5297,7 +5297,7 @@ def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> _m return deserialized # type: ignore def _delete_initial(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5414,7 +5414,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-01-02")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5489,7 +5489,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Snapshot"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-01-02")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5556,7 +5556,7 @@ def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5746,7 +5746,7 @@ def get_long_running_output(pipeline_response): ) def _revoke_access_initial(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_03_01/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_03_01/__init__.py index 3b1b6244b2375..ab7c46e8991db 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_03_01/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_03_01/__init__.py @@ -5,15 +5,21 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._compute_management_client import ComputeManagementClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._compute_management_client import ComputeManagementClient # 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__ = [ "ComputeManagementClient", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_03_01/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_03_01/_compute_management_client.py index f0ffc3be0d089..539a2cb353add 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_03_01/_compute_management_client.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_03_01/_compute_management_client.py @@ -48,11 +48,10 @@ ) if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class ComputeManagementClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes +class ComputeManagementClient: # pylint: disable=too-many-instance-attributes """Compute Client. :ivar operations: Operations operations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_03_01/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_03_01/_configuration.py index 1b21d309858d3..02411212dbb3e 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_03_01/_configuration.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_03_01/_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 ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ComputeManagementClient. Note that all parameters used to create this instance are saved as instance diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_03_01/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_03_01/_version.py index d79b2760319c5..e5754a47ce68f 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_03_01/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_03_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "33.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_03_01/aio/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_03_01/aio/__init__.py index 0715f50185586..d3fd1ba93379a 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_03_01/aio/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_03_01/aio/__init__.py @@ -5,12 +5,18 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._compute_management_client import ComputeManagementClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._compute_management_client import ComputeManagementClient # 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__ = [ "ComputeManagementClient", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_03_01/aio/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_03_01/aio/_compute_management_client.py index 108d5b9cbc1b7..bd24a7ea5732e 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_03_01/aio/_compute_management_client.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_03_01/aio/_compute_management_client.py @@ -48,11 +48,10 @@ ) if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class ComputeManagementClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes +class ComputeManagementClient: # pylint: disable=too-many-instance-attributes """Compute Client. :ivar operations: Operations operations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_03_01/aio/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_03_01/aio/_configuration.py index 46b42aab28b36..b8feb02e1057b 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_03_01/aio/_configuration.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_03_01/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 ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ComputeManagementClient. Note that all parameters used to create this instance are saved as instance diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_03_01/aio/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_03_01/aio/operations/__init__.py index 3cc8e8e7a73a8..5cc9a11e23416 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_03_01/aio/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_03_01/aio/operations/__init__.py @@ -5,36 +5,42 @@ # Code generated by Microsoft (R) AutoRest 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 UsageOperations -from ._operations import VirtualMachineSizesOperations -from ._operations import VirtualMachineScaleSetsOperations -from ._operations import VirtualMachineScaleSetExtensionsOperations -from ._operations import VirtualMachineScaleSetRollingUpgradesOperations -from ._operations import VirtualMachineScaleSetVMExtensionsOperations -from ._operations import VirtualMachineScaleSetVMsOperations -from ._operations import VirtualMachineExtensionsOperations -from ._operations import VirtualMachinesOperations -from ._operations import VirtualMachineImagesOperations -from ._operations import VirtualMachineImagesEdgeZoneOperations -from ._operations import VirtualMachineExtensionImagesOperations -from ._operations import AvailabilitySetsOperations -from ._operations import ProximityPlacementGroupsOperations -from ._operations import DedicatedHostGroupsOperations -from ._operations import DedicatedHostsOperations -from ._operations import SshPublicKeysOperations -from ._operations import ImagesOperations -from ._operations import RestorePointCollectionsOperations -from ._operations import RestorePointsOperations -from ._operations import CapacityReservationGroupsOperations -from ._operations import CapacityReservationsOperations -from ._operations import LogAnalyticsOperations -from ._operations import VirtualMachineRunCommandsOperations -from ._operations import VirtualMachineScaleSetVMRunCommandsOperations +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 UsageOperations # type: ignore +from ._operations import VirtualMachineSizesOperations # type: ignore +from ._operations import VirtualMachineScaleSetsOperations # type: ignore +from ._operations import VirtualMachineScaleSetExtensionsOperations # type: ignore +from ._operations import VirtualMachineScaleSetRollingUpgradesOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMExtensionsOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMsOperations # type: ignore +from ._operations import VirtualMachineExtensionsOperations # type: ignore +from ._operations import VirtualMachinesOperations # type: ignore +from ._operations import VirtualMachineImagesOperations # type: ignore +from ._operations import VirtualMachineImagesEdgeZoneOperations # type: ignore +from ._operations import VirtualMachineExtensionImagesOperations # type: ignore +from ._operations import AvailabilitySetsOperations # type: ignore +from ._operations import ProximityPlacementGroupsOperations # type: ignore +from ._operations import DedicatedHostGroupsOperations # type: ignore +from ._operations import DedicatedHostsOperations # type: ignore +from ._operations import SshPublicKeysOperations # type: ignore +from ._operations import ImagesOperations # type: ignore +from ._operations import RestorePointCollectionsOperations # type: ignore +from ._operations import RestorePointsOperations # type: ignore +from ._operations import CapacityReservationGroupsOperations # type: ignore +from ._operations import CapacityReservationsOperations # type: ignore +from ._operations import LogAnalyticsOperations # type: ignore +from ._operations import VirtualMachineRunCommandsOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMRunCommandsOperations # 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__ = [ @@ -65,5 +71,5 @@ "VirtualMachineRunCommandsOperations", "VirtualMachineScaleSetVMRunCommandsOperations", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_03_01/aio/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_03_01/aio/operations/_operations.py index f3e67330113ce..c039377168d81 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_03_01/aio/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_03_01/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. @@ -8,21 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import ( - Any, - AsyncIterable, - AsyncIterator, - Callable, - Dict, - IO, - List, - Optional, - Type, - TypeVar, - Union, - cast, - overload, -) +from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, List, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -226,7 +212,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]] @@ -267,7 +253,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.ComputeOperationValue"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.ComputeOperationListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -364,7 +350,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.Usage"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.ListUsagesResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -464,7 +450,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.VirtualMa api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -565,7 +551,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> AsyncIterable["_mode api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -633,7 +619,7 @@ async def _create_or_update_initial( parameters: Union[_models.VirtualMachineScaleSet, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -825,7 +811,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineScaleSetUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1014,7 +1000,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, *, force_deletion: Optional[bool] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1143,7 +1129,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_03_01.models.VirtualMachineScaleSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1195,7 +1181,7 @@ async def _deallocate_initial( hibernate: Optional[bool] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1410,7 +1396,7 @@ async def _delete_instances_initial( force_deletion: Optional[bool] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1618,7 +1604,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2023_03_01.models.VirtualMachineScaleSetInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1678,7 +1664,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1757,7 +1743,7 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.VirtualMachineScaleS api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.VirtualMachineScaleSetListWithLinkResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1840,7 +1826,7 @@ def list_skus( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.VirtualMachineScaleSetListSkusResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1906,6 +1892,7 @@ async def get_next(next_link=None): def get_os_upgrade_history( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> AsyncIterable["_models.UpgradeOperationHistoricalStatusInfo"]: + # pylint: disable=line-too-long """Gets list of OS upgrades on a VM scale set instance. :param resource_group_name: The name of the resource group. Required. @@ -1924,7 +1911,7 @@ def get_os_upgrade_history( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.VirtualMachineScaleSetListOSUpgradeHistory] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1995,7 +1982,7 @@ async def _power_off_initial( skip_shutdown: bool = False, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2208,7 +2195,7 @@ async def _restart_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2397,7 +2384,7 @@ async def _start_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2582,7 +2569,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _reapply_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2697,7 +2684,7 @@ async def _redeploy_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2889,7 +2876,7 @@ async def _perform_maintenance_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3087,7 +3074,7 @@ async def _update_instances_initial( vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3273,7 +3260,7 @@ async def _reimage_initial( vm_scale_set_reimage_input: Optional[Union[_models.VirtualMachineScaleSetReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3466,7 +3453,7 @@ async def _reimage_all_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3682,7 +3669,7 @@ async def force_recovery_service_fabric_platform_update_domain_walk( # pylint: :rtype: ~azure.mgmt.compute.v2023_03_01.models.RecoveryWalkResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3728,7 +3715,7 @@ async def force_recovery_service_fabric_platform_update_domain_walk( # pylint: return deserialized # type: ignore @overload - async def convert_to_single_placement_group( # pylint: disable=inconsistent-return-statements + async def convert_to_single_placement_group( self, resource_group_name: str, vm_scale_set_name: str, @@ -3756,7 +3743,7 @@ async def convert_to_single_placement_group( # pylint: disable=inconsistent-ret """ @overload - async def convert_to_single_placement_group( # pylint: disable=inconsistent-return-statements + async def convert_to_single_placement_group( self, resource_group_name: str, vm_scale_set_name: str, @@ -3783,7 +3770,7 @@ async def convert_to_single_placement_group( # pylint: disable=inconsistent-ret """ @distributed_trace_async - async def convert_to_single_placement_group( # pylint: disable=inconsistent-return-statements + async def convert_to_single_placement_group( self, resource_group_name: str, vm_scale_set_name: str, @@ -3806,7 +3793,7 @@ async def convert_to_single_placement_group( # pylint: disable=inconsistent-ret :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3863,7 +3850,7 @@ async def _set_orchestration_service_state_initial( parameters: Union[_models.OrchestrationServiceStateInput, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4071,7 +4058,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtension, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4282,7 +4269,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtensionUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4489,7 +4476,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, vmss_extension_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4619,7 +4606,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_03_01.models.VirtualMachineScaleSetExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4685,7 +4672,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.VirtualMachineScaleSetExtensionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4771,7 +4758,7 @@ def __init__(self, *args, **kwargs) -> None: async def _cancel_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4875,7 +4862,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_os_upgrade_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4981,7 +4968,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_extension_upgrade_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5098,7 +5085,7 @@ async def get_latest( :rtype: ~azure.mgmt.compute.v2023_03_01.models.RollingUpgradeStatusInfo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5170,7 +5157,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetVMExtension, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5390,7 +5377,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetVMExtensionUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5605,7 +5592,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, vm_extension_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5741,7 +5728,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_03_01.models.VirtualMachineScaleSetVMExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5810,7 +5797,7 @@ async def list( :rtype: ~azure.mgmt.compute.v2023_03_01.models.VirtualMachineScaleSetVMExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5887,7 +5874,7 @@ async def _reimage_initial( ] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6086,7 +6073,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _reimage_all_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6195,7 +6182,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _deallocate_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6310,7 +6297,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineScaleSetVM, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6520,7 +6507,7 @@ async def _delete_initial( force_deletion: Optional[bool] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6662,7 +6649,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_03_01.models.VirtualMachineScaleSetVM :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6722,7 +6709,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2023_03_01.models.VirtualMachineScaleSetVMInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6804,7 +6791,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.VirtualMachineScaleSetVMListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6878,7 +6865,7 @@ async def _power_off_initial( skip_shutdown: bool = False, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7000,7 +6987,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _restart_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7108,7 +7095,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7216,7 +7203,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _redeploy_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7349,7 +7336,7 @@ async def retrieve_boot_diagnostics_data( :rtype: ~azure.mgmt.compute.v2023_03_01.models.RetrieveBootDiagnosticsDataResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7396,7 +7383,7 @@ async def retrieve_boot_diagnostics_data( async def _perform_maintenance_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7502,7 +7489,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace_async - async def simulate_eviction( # pylint: disable=inconsistent-return-statements + async def simulate_eviction( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: """The operation to simulate the eviction of spot virtual machine in a VM scale set. @@ -7517,7 +7504,7 @@ async def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7564,7 +7551,7 @@ async def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7791,7 +7778,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineExtension, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8001,7 +7988,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineExtensionUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8207,7 +8194,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_name: str, vm_extension_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8337,7 +8324,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_03_01.models.VirtualMachineExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8397,7 +8384,7 @@ async def list( :rtype: ~azure.mgmt.compute.v2023_03_01.models.VirtualMachineExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8479,7 +8466,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> AsyncIterable["_mode api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8547,7 +8534,7 @@ async def _capture_initial( parameters: Union[_models.VirtualMachineCaptureParameters, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8745,7 +8732,7 @@ async def _create_or_update_initial( parameters: Union[_models.VirtualMachine, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8940,7 +8927,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9128,7 +9115,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_name: str, *, force_deletion: Optional[bool] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9259,7 +9246,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_03_01.models.VirtualMachine :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9316,7 +9303,7 @@ async def instance_view( :rtype: ~azure.mgmt.compute.v2023_03_01.models.VirtualMachineInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9361,7 +9348,7 @@ async def instance_view( async def _convert_to_managed_disks_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9466,7 +9453,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _deallocate_initial( self, resource_group_name: str, vm_name: str, *, hibernate: Optional[bool] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9574,9 +9561,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace_async - async def generalize( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, vm_name: str, **kwargs: Any - ) -> None: + async def generalize(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> None: """Sets the OS state of the virtual machine to generalized. It is recommended to sysprep the virtual machine before performing this operation. For Windows, please refer to `Create a managed image of a generalized VM in Azure @@ -9592,7 +9577,7 @@ async def generalize( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9639,6 +9624,7 @@ def list( expand: Optional[Union[str, _models.ExpandTypeForListVMs]] = None, **kwargs: Any ) -> AsyncIterable["_models.VirtualMachine"]: + # pylint: disable=line-too-long """Lists all of the virtual machines in the specified resource group. Use the nextLink property in the response to get the next page of virtual machines. @@ -9664,7 +9650,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9736,6 +9722,7 @@ def list_all( expand: Optional[Union[str, _models.ExpandTypesForListVMs]] = None, **kwargs: Any ) -> AsyncIterable["_models.VirtualMachine"]: + # pylint: disable=line-too-long """Lists all of the virtual machines in the specified subscription. Use the nextLink property in the response to get the next page of virtual machines. @@ -9762,7 +9749,7 @@ def list_all( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9847,7 +9834,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9912,7 +9899,7 @@ async def get_next(next_link=None): async def _power_off_initial( self, resource_group_name: str, vm_name: str, *, skip_shutdown: bool = False, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10021,7 +10008,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _reapply_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10121,7 +10108,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _restart_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10221,7 +10208,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _start_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10321,7 +10308,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _redeploy_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10427,7 +10414,7 @@ async def _reimage_initial( parameters: Optional[Union[_models.VirtualMachineReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10646,7 +10633,7 @@ async def retrieve_boot_diagnostics_data( :rtype: ~azure.mgmt.compute.v2023_03_01.models.RetrieveBootDiagnosticsDataResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10692,7 +10679,7 @@ async def retrieve_boot_diagnostics_data( async def _perform_maintenance_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10794,9 +10781,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace_async - async def simulate_eviction( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, vm_name: str, **kwargs: Any - ) -> None: + async def simulate_eviction(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> None: """The operation to simulate the eviction of spot virtual machine. :param resource_group_name: The name of the resource group. Required. @@ -10807,7 +10792,7 @@ async def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10848,7 +10833,7 @@ async def simulate_eviction( # pylint: disable=inconsistent-return-statements async def _assess_patches_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10964,7 +10949,7 @@ async def _install_patches_initial( install_patches_input: Union[_models.VirtualMachineInstallPatchesParameters, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11162,7 +11147,7 @@ async def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11390,7 +11375,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_03_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11469,7 +11454,7 @@ async def list( :rtype: list[~azure.mgmt.compute.v2023_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11530,7 +11515,7 @@ async def list_offers( :rtype: list[~azure.mgmt.compute.v2023_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11582,7 +11567,7 @@ async def list_publishers(self, location: str, **kwargs: Any) -> List[_models.Vi :rtype: list[~azure.mgmt.compute.v2023_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11639,7 +11624,7 @@ async def list_skus( :rtype: list[~azure.mgmt.compute.v2023_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11696,7 +11681,7 @@ async def list_by_edge_zone( :rtype: ~azure.mgmt.compute.v2023_03_01.models.VmImagesInEdgeZoneListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11781,7 +11766,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_03_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11866,7 +11851,7 @@ async def list( :rtype: list[~azure.mgmt.compute.v2023_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11931,7 +11916,7 @@ async def list_offers( :rtype: list[~azure.mgmt.compute.v2023_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11988,7 +11973,7 @@ async def list_publishers( :rtype: list[~azure.mgmt.compute.v2023_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12049,7 +12034,7 @@ async def list_skus( :rtype: list[~azure.mgmt.compute.v2023_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12132,7 +12117,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_03_01.models.VirtualMachineExtensionImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12190,7 +12175,7 @@ async def list_types( :rtype: list[~azure.mgmt.compute.v2023_03_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12262,7 +12247,7 @@ async def list_versions( :rtype: list[~azure.mgmt.compute.v2023_03_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12402,7 +12387,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2023_03_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12529,7 +12514,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2023_03_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12584,9 +12569,7 @@ async def update( return deserialized # type: ignore @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, availability_set_name: str, **kwargs: Any - ) -> None: + async def delete(self, resource_group_name: str, availability_set_name: str, **kwargs: Any) -> None: """Delete an availability set. :param resource_group_name: The name of the resource group. Required. @@ -12597,7 +12580,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12647,7 +12630,7 @@ async def get(self, resource_group_name: str, availability_set_name: str, **kwar :rtype: ~azure.mgmt.compute.v2023_03_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12709,7 +12692,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12787,7 +12770,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12870,7 +12853,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13028,7 +13011,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2023_03_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13158,7 +13141,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2023_03_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13213,9 +13196,7 @@ async def update( return deserialized # type: ignore @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, proximity_placement_group_name: str, **kwargs: Any - ) -> None: + async def delete(self, resource_group_name: str, proximity_placement_group_name: str, **kwargs: Any) -> None: """Delete a proximity placement group. :param resource_group_name: The name of the resource group. Required. @@ -13226,7 +13207,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13286,7 +13267,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_03_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13345,7 +13326,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Proximit api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13425,7 +13406,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13586,7 +13567,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2023_03_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13713,7 +13694,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2023_03_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13768,9 +13749,7 @@ async def update( return deserialized # type: ignore @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, host_group_name: str, **kwargs: Any - ) -> None: + async def delete(self, resource_group_name: str, host_group_name: str, **kwargs: Any) -> None: """Delete a dedicated host group. :param resource_group_name: The name of the resource group. Required. @@ -13781,7 +13760,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13843,7 +13822,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_03_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13906,7 +13885,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13983,7 +13962,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Dedicate api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14072,7 +14051,7 @@ async def _create_or_update_initial( parameters: Union[_models.DedicatedHost, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14276,7 +14255,7 @@ async def _update_initial( parameters: Union[_models.DedicatedHostUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14475,7 +14454,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14606,7 +14585,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_03_01.models.DedicatedHost :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14672,7 +14651,7 @@ def list_by_host_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.DedicatedHostListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14737,7 +14716,7 @@ async def get_next(next_link=None): async def _restart_initial( self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14869,7 +14848,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.DedicatedHostSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14970,7 +14949,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.SshPubli api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15051,7 +15030,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15185,7 +15164,7 @@ async def create( :rtype: ~azure.mgmt.compute.v2023_03_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15313,7 +15292,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2023_03_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15368,9 +15347,7 @@ async def update( return deserialized # type: ignore @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, ssh_public_key_name: str, **kwargs: Any - ) -> None: + async def delete(self, resource_group_name: str, ssh_public_key_name: str, **kwargs: Any) -> None: """Delete an SSH public key. :param resource_group_name: The name of the resource group. Required. @@ -15381,7 +15358,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15433,7 +15410,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_03_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15491,7 +15468,7 @@ async def generate_key_pair( :rtype: ~azure.mgmt.compute.v2023_03_01.models.SshPublicKeyGenerateKeyPairResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15557,7 +15534,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, image_name: str, parameters: Union[_models.Image, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15739,7 +15716,7 @@ async def _update_initial( parameters: Union[_models.ImageUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15919,7 +15896,7 @@ def get_long_running_output(pipeline_response): ) async def _delete_initial(self, resource_group_name: str, image_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16034,7 +16011,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_03_01.models.Image :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16093,7 +16070,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16169,7 +16146,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Image"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16331,7 +16308,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2023_03_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16461,7 +16438,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2023_03_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16518,7 +16495,7 @@ async def update( async def _delete_initial( self, resource_group_name: str, restore_point_collection_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16644,7 +16621,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_03_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16705,7 +16682,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.RestorePointCollectionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16784,7 +16761,7 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.RestorePointCollecti api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.RestorePointCollectionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16873,7 +16850,7 @@ async def _create_initial( parameters: Union[_models.RestorePoint, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17072,7 +17049,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, restore_point_collection_name: str, restore_point_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17202,7 +17179,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_03_01.models.RestorePoint :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17346,7 +17323,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2023_03_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17479,7 +17456,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2023_03_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17534,9 +17511,7 @@ async def update( return deserialized # type: ignore @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, capacity_reservation_group_name: str, **kwargs: Any - ) -> None: + async def delete(self, resource_group_name: str, capacity_reservation_group_name: str, **kwargs: Any) -> None: """The operation to delete a capacity reservation group. This operation is allowed only if all the associated resources are disassociated from the reservation group and all capacity reservations under the reservation group have also been deleted. Please refer to @@ -17550,7 +17525,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17614,7 +17589,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_03_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17688,7 +17663,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.CapacityReservationGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17775,7 +17750,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.CapacityReservationGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17865,7 +17840,7 @@ async def _create_or_update_initial( parameters: Union[_models.CapacityReservation, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18075,7 +18050,7 @@ async def _update_initial( parameters: Union[_models.CapacityReservationUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18278,7 +18253,7 @@ async def _delete_initial( capacity_reservation_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18416,7 +18391,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_03_01.models.CapacityReservation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18482,7 +18457,7 @@ def list_by_capacity_reservation_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.CapacityReservationListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18568,7 +18543,7 @@ def __init__(self, *args, **kwargs) -> None: async def _export_request_rate_by_interval_initial( self, location: str, parameters: Union[_models.RequestRateByIntervalInput, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18746,7 +18721,7 @@ def get_long_running_output(pipeline_response): async def _export_throttled_requests_initial( self, location: str, parameters: Union[_models.ThrottledRequestsInput, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18957,7 +18932,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.RunComman api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.RunCommandListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19030,7 +19005,7 @@ async def get(self, location: str, command_id: str, **kwargs: Any) -> _models.Ru :rtype: ~azure.mgmt.compute.v2023_03_01.models.RunCommandDocument :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19080,7 +19055,7 @@ async def _create_or_update_initial( run_command: Union[_models.VirtualMachineRunCommand, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19289,7 +19264,7 @@ async def _update_initial( run_command: Union[_models.VirtualMachineRunCommandUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19494,7 +19469,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_name: str, run_command_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19624,7 +19599,7 @@ async def get_by_virtual_machine( :rtype: ~azure.mgmt.compute.v2023_03_01.models.VirtualMachineRunCommand :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19692,7 +19667,7 @@ def list_by_virtual_machine( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.VirtualMachineRunCommandsListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19785,7 +19760,7 @@ async def _create_or_update_initial( run_command: Union[_models.VirtualMachineRunCommand, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20003,7 +19978,7 @@ async def _update_initial( run_command: Union[_models.VirtualMachineRunCommandUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20216,7 +20191,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, run_command_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20352,7 +20327,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_03_01.models.VirtualMachineRunCommand :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20429,7 +20404,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.VirtualMachineRunCommandsListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_03_01/models/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_03_01/models/__init__.py index 8f0e9eee37bcf..cfc144bdd2fe9 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_03_01/models/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_03_01/models/__init__.py @@ -5,347 +5,358 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._models_py3 import AdditionalCapabilities -from ._models_py3 import AdditionalUnattendContent -from ._models_py3 import AlternativeOption -from ._models_py3 import ApiEntityReference -from ._models_py3 import ApiError -from ._models_py3 import ApiErrorBase -from ._models_py3 import ApplicationProfile -from ._models_py3 import AutomaticOSUpgradePolicy -from ._models_py3 import AutomaticOSUpgradeProperties -from ._models_py3 import AutomaticRepairsPolicy -from ._models_py3 import AvailabilitySet -from ._models_py3 import AvailabilitySetListResult -from ._models_py3 import AvailabilitySetUpdate -from ._models_py3 import AvailablePatchSummary -from ._models_py3 import BillingProfile -from ._models_py3 import BootDiagnostics -from ._models_py3 import BootDiagnosticsInstanceView -from ._models_py3 import CapacityReservation -from ._models_py3 import CapacityReservationGroup -from ._models_py3 import CapacityReservationGroupInstanceView -from ._models_py3 import CapacityReservationGroupListResult -from ._models_py3 import CapacityReservationGroupUpdate -from ._models_py3 import CapacityReservationInstanceView -from ._models_py3 import CapacityReservationInstanceViewWithName -from ._models_py3 import CapacityReservationListResult -from ._models_py3 import CapacityReservationProfile -from ._models_py3 import CapacityReservationUpdate -from ._models_py3 import CapacityReservationUtilization -from ._models_py3 import ComputeOperationListResult -from ._models_py3 import ComputeOperationValue -from ._models_py3 import DataDisk -from ._models_py3 import DataDiskImage -from ._models_py3 import DedicatedHost -from ._models_py3 import DedicatedHostAllocatableVM -from ._models_py3 import DedicatedHostAvailableCapacity -from ._models_py3 import DedicatedHostGroup -from ._models_py3 import DedicatedHostGroupInstanceView -from ._models_py3 import DedicatedHostGroupListResult -from ._models_py3 import DedicatedHostGroupPropertiesAdditionalCapabilities -from ._models_py3 import DedicatedHostGroupUpdate -from ._models_py3 import DedicatedHostInstanceView -from ._models_py3 import DedicatedHostInstanceViewWithName -from ._models_py3 import DedicatedHostListResult -from ._models_py3 import DedicatedHostSizeListResult -from ._models_py3 import DedicatedHostUpdate -from ._models_py3 import DiagnosticsProfile -from ._models_py3 import DiffDiskSettings -from ._models_py3 import DisallowedConfiguration -from ._models_py3 import DiskEncryptionSetParameters -from ._models_py3 import DiskEncryptionSettings -from ._models_py3 import DiskInstanceView -from ._models_py3 import DiskRestorePointAttributes -from ._models_py3 import DiskRestorePointInstanceView -from ._models_py3 import DiskRestorePointReplicationStatus -from ._models_py3 import ExtendedLocation -from ._models_py3 import HardwareProfile -from ._models_py3 import Image -from ._models_py3 import ImageDataDisk -from ._models_py3 import ImageDeprecationStatus -from ._models_py3 import ImageDisk -from ._models_py3 import ImageListResult -from ._models_py3 import ImageOSDisk -from ._models_py3 import ImageReference -from ._models_py3 import ImageStorageProfile -from ._models_py3 import ImageUpdate -from ._models_py3 import InnerError -from ._models_py3 import InstanceViewStatus -from ._models_py3 import KeyVaultKeyReference -from ._models_py3 import KeyVaultSecretReference -from ._models_py3 import LastPatchInstallationSummary -from ._models_py3 import LinuxConfiguration -from ._models_py3 import LinuxParameters -from ._models_py3 import LinuxPatchSettings -from ._models_py3 import LinuxVMGuestPatchAutomaticByPlatformSettings -from ._models_py3 import ListUsagesResult -from ._models_py3 import LogAnalyticsInputBase -from ._models_py3 import LogAnalyticsOperationResult -from ._models_py3 import LogAnalyticsOutput -from ._models_py3 import MaintenanceRedeployStatus -from ._models_py3 import ManagedDiskParameters -from ._models_py3 import NetworkInterfaceReference -from ._models_py3 import NetworkProfile -from ._models_py3 import OSDisk -from ._models_py3 import OSDiskImage -from ._models_py3 import OSImageNotificationProfile -from ._models_py3 import OSProfile -from ._models_py3 import OSProfileProvisioningData -from ._models_py3 import OrchestrationServiceStateInput -from ._models_py3 import OrchestrationServiceSummary -from ._models_py3 import PatchInstallationDetail -from ._models_py3 import PatchSettings -from ._models_py3 import Plan -from ._models_py3 import PriorityMixPolicy -from ._models_py3 import ProximityPlacementGroup -from ._models_py3 import ProximityPlacementGroupListResult -from ._models_py3 import ProximityPlacementGroupPropertiesIntent -from ._models_py3 import ProximityPlacementGroupUpdate -from ._models_py3 import ProxyResource -from ._models_py3 import PublicIPAddressSku -from ._models_py3 import PurchasePlan -from ._models_py3 import RecoveryWalkResponse -from ._models_py3 import RequestRateByIntervalInput -from ._models_py3 import Resource -from ._models_py3 import ResourceWithOptionalLocation -from ._models_py3 import RestorePoint -from ._models_py3 import RestorePointCollection -from ._models_py3 import RestorePointCollectionListResult -from ._models_py3 import RestorePointCollectionSourceProperties -from ._models_py3 import RestorePointCollectionUpdate -from ._models_py3 import RestorePointEncryption -from ._models_py3 import RestorePointInstanceView -from ._models_py3 import RestorePointSourceMetadata -from ._models_py3 import RestorePointSourceVMDataDisk -from ._models_py3 import RestorePointSourceVMOSDisk -from ._models_py3 import RestorePointSourceVMStorageProfile -from ._models_py3 import RetrieveBootDiagnosticsDataResult -from ._models_py3 import RollbackStatusInfo -from ._models_py3 import RollingUpgradePolicy -from ._models_py3 import RollingUpgradeProgressInfo -from ._models_py3 import RollingUpgradeRunningStatus -from ._models_py3 import RollingUpgradeStatusInfo -from ._models_py3 import RunCommandDocument -from ._models_py3 import RunCommandDocumentBase -from ._models_py3 import RunCommandInput -from ._models_py3 import RunCommandInputParameter -from ._models_py3 import RunCommandListResult -from ._models_py3 import RunCommandManagedIdentity -from ._models_py3 import RunCommandParameterDefinition -from ._models_py3 import RunCommandResult -from ._models_py3 import ScaleInPolicy -from ._models_py3 import ScheduledEventsProfile -from ._models_py3 import SecurityPostureReference -from ._models_py3 import SecurityProfile -from ._models_py3 import ServiceArtifactReference -from ._models_py3 import Sku -from ._models_py3 import SpotRestorePolicy -from ._models_py3 import SshConfiguration -from ._models_py3 import SshPublicKey -from ._models_py3 import SshPublicKeyGenerateKeyPairResult -from ._models_py3 import SshPublicKeyResource -from ._models_py3 import SshPublicKeyUpdateResource -from ._models_py3 import SshPublicKeysGroupListResult -from ._models_py3 import StorageProfile -from ._models_py3 import SubResource -from ._models_py3 import SubResourceReadOnly -from ._models_py3 import SubResourceWithColocationStatus -from ._models_py3 import SystemData -from ._models_py3 import TerminateNotificationProfile -from ._models_py3 import ThrottledRequestsInput -from ._models_py3 import UefiSettings -from ._models_py3 import UpdateResource -from ._models_py3 import UpgradeOperationHistoricalStatusInfo -from ._models_py3 import UpgradeOperationHistoricalStatusInfoProperties -from ._models_py3 import UpgradeOperationHistoryStatus -from ._models_py3 import UpgradePolicy -from ._models_py3 import Usage -from ._models_py3 import UsageName -from ._models_py3 import UserAssignedIdentitiesValue -from ._models_py3 import VMDiskSecurityProfile -from ._models_py3 import VMGalleryApplication -from ._models_py3 import VMScaleSetConvertToSinglePlacementGroupInput -from ._models_py3 import VMSizeProperties -from ._models_py3 import VaultCertificate -from ._models_py3 import VaultSecretGroup -from ._models_py3 import VirtualHardDisk -from ._models_py3 import VirtualMachine -from ._models_py3 import VirtualMachineAgentInstanceView -from ._models_py3 import VirtualMachineAssessPatchesResult -from ._models_py3 import VirtualMachineCaptureParameters -from ._models_py3 import VirtualMachineCaptureResult -from ._models_py3 import VirtualMachineExtension -from ._models_py3 import VirtualMachineExtensionHandlerInstanceView -from ._models_py3 import VirtualMachineExtensionImage -from ._models_py3 import VirtualMachineExtensionInstanceView -from ._models_py3 import VirtualMachineExtensionUpdate -from ._models_py3 import VirtualMachineExtensionsListResult -from ._models_py3 import VirtualMachineHealthStatus -from ._models_py3 import VirtualMachineIdentity -from ._models_py3 import VirtualMachineImage -from ._models_py3 import VirtualMachineImageFeature -from ._models_py3 import VirtualMachineImageResource -from ._models_py3 import VirtualMachineInstallPatchesParameters -from ._models_py3 import VirtualMachineInstallPatchesResult -from ._models_py3 import VirtualMachineInstanceView -from ._models_py3 import VirtualMachineIpTag -from ._models_py3 import VirtualMachineListResult -from ._models_py3 import VirtualMachineNetworkInterfaceConfiguration -from ._models_py3 import VirtualMachineNetworkInterfaceDnsSettingsConfiguration -from ._models_py3 import VirtualMachineNetworkInterfaceIPConfiguration -from ._models_py3 import VirtualMachinePatchStatus -from ._models_py3 import VirtualMachinePublicIPAddressConfiguration -from ._models_py3 import VirtualMachinePublicIPAddressDnsSettingsConfiguration -from ._models_py3 import VirtualMachineReimageParameters -from ._models_py3 import VirtualMachineRunCommand -from ._models_py3 import VirtualMachineRunCommandInstanceView -from ._models_py3 import VirtualMachineRunCommandScriptSource -from ._models_py3 import VirtualMachineRunCommandUpdate -from ._models_py3 import VirtualMachineRunCommandsListResult -from ._models_py3 import VirtualMachineScaleSet -from ._models_py3 import VirtualMachineScaleSetDataDisk -from ._models_py3 import VirtualMachineScaleSetExtension -from ._models_py3 import VirtualMachineScaleSetExtensionListResult -from ._models_py3 import VirtualMachineScaleSetExtensionProfile -from ._models_py3 import VirtualMachineScaleSetExtensionUpdate -from ._models_py3 import VirtualMachineScaleSetHardwareProfile -from ._models_py3 import VirtualMachineScaleSetIPConfiguration -from ._models_py3 import VirtualMachineScaleSetIdentity -from ._models_py3 import VirtualMachineScaleSetInstanceView -from ._models_py3 import VirtualMachineScaleSetInstanceViewStatusesSummary -from ._models_py3 import VirtualMachineScaleSetIpTag -from ._models_py3 import VirtualMachineScaleSetListOSUpgradeHistory -from ._models_py3 import VirtualMachineScaleSetListResult -from ._models_py3 import VirtualMachineScaleSetListSkusResult -from ._models_py3 import VirtualMachineScaleSetListWithLinkResult -from ._models_py3 import VirtualMachineScaleSetManagedDiskParameters -from ._models_py3 import VirtualMachineScaleSetNetworkConfiguration -from ._models_py3 import VirtualMachineScaleSetNetworkConfigurationDnsSettings -from ._models_py3 import VirtualMachineScaleSetNetworkProfile -from ._models_py3 import VirtualMachineScaleSetOSDisk -from ._models_py3 import VirtualMachineScaleSetOSProfile -from ._models_py3 import VirtualMachineScaleSetPublicIPAddressConfiguration -from ._models_py3 import VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings -from ._models_py3 import VirtualMachineScaleSetReimageParameters -from ._models_py3 import VirtualMachineScaleSetSku -from ._models_py3 import VirtualMachineScaleSetSkuCapacity -from ._models_py3 import VirtualMachineScaleSetStorageProfile -from ._models_py3 import VirtualMachineScaleSetUpdate -from ._models_py3 import VirtualMachineScaleSetUpdateIPConfiguration -from ._models_py3 import VirtualMachineScaleSetUpdateNetworkConfiguration -from ._models_py3 import VirtualMachineScaleSetUpdateNetworkProfile -from ._models_py3 import VirtualMachineScaleSetUpdateOSDisk -from ._models_py3 import VirtualMachineScaleSetUpdateOSProfile -from ._models_py3 import VirtualMachineScaleSetUpdatePublicIPAddressConfiguration -from ._models_py3 import VirtualMachineScaleSetUpdateStorageProfile -from ._models_py3 import VirtualMachineScaleSetUpdateVMProfile -from ._models_py3 import VirtualMachineScaleSetVM -from ._models_py3 import VirtualMachineScaleSetVMExtension -from ._models_py3 import VirtualMachineScaleSetVMExtensionUpdate -from ._models_py3 import VirtualMachineScaleSetVMExtensionsListResult -from ._models_py3 import VirtualMachineScaleSetVMExtensionsSummary -from ._models_py3 import VirtualMachineScaleSetVMInstanceIDs -from ._models_py3 import VirtualMachineScaleSetVMInstanceRequiredIDs -from ._models_py3 import VirtualMachineScaleSetVMInstanceView -from ._models_py3 import VirtualMachineScaleSetVMListResult -from ._models_py3 import VirtualMachineScaleSetVMNetworkProfileConfiguration -from ._models_py3 import VirtualMachineScaleSetVMProfile -from ._models_py3 import VirtualMachineScaleSetVMProtectionPolicy -from ._models_py3 import VirtualMachineScaleSetVMReimageParameters -from ._models_py3 import VirtualMachineSize -from ._models_py3 import VirtualMachineSizeListResult -from ._models_py3 import VirtualMachineSoftwarePatchProperties -from ._models_py3 import VirtualMachineStatusCodeCount -from ._models_py3 import VirtualMachineUpdate -from ._models_py3 import VmImagesInEdgeZoneListResult -from ._models_py3 import WinRMConfiguration -from ._models_py3 import WinRMListener -from ._models_py3 import WindowsConfiguration -from ._models_py3 import WindowsParameters -from ._models_py3 import WindowsVMGuestPatchAutomaticByPlatformSettings +from typing import TYPE_CHECKING -from ._compute_management_client_enums import AlternativeType -from ._compute_management_client_enums import ArchitectureTypes -from ._compute_management_client_enums import AvailabilitySetSkuTypes -from ._compute_management_client_enums import CachingTypes -from ._compute_management_client_enums import CapacityReservationGroupInstanceViewTypes -from ._compute_management_client_enums import CapacityReservationInstanceViewTypes -from ._compute_management_client_enums import ConsistencyModeTypes -from ._compute_management_client_enums import DedicatedHostLicenseTypes -from ._compute_management_client_enums import DeleteOptions -from ._compute_management_client_enums import DiffDiskOptions -from ._compute_management_client_enums import DiffDiskPlacement -from ._compute_management_client_enums import DiskControllerTypes -from ._compute_management_client_enums import DiskCreateOptionTypes -from ._compute_management_client_enums import DiskDeleteOptionTypes -from ._compute_management_client_enums import DiskDetachOptionTypes -from ._compute_management_client_enums import ExecutionState -from ._compute_management_client_enums import ExpandTypeForListVMs -from ._compute_management_client_enums import ExpandTypesForGetCapacityReservationGroups -from ._compute_management_client_enums import ExpandTypesForGetVMScaleSets -from ._compute_management_client_enums import ExpandTypesForListVMs -from ._compute_management_client_enums import ExtendedLocationTypes -from ._compute_management_client_enums import HyperVGeneration -from ._compute_management_client_enums import HyperVGenerationType -from ._compute_management_client_enums import HyperVGenerationTypes -from ._compute_management_client_enums import IPVersion -from ._compute_management_client_enums import IPVersions -from ._compute_management_client_enums import ImageState -from ._compute_management_client_enums import InstanceViewTypes -from ._compute_management_client_enums import IntervalInMins -from ._compute_management_client_enums import LinuxPatchAssessmentMode -from ._compute_management_client_enums import LinuxVMGuestPatchAutomaticByPlatformRebootSetting -from ._compute_management_client_enums import LinuxVMGuestPatchMode -from ._compute_management_client_enums import MaintenanceOperationResultCodeTypes -from ._compute_management_client_enums import NetworkApiVersion -from ._compute_management_client_enums import OperatingSystemStateTypes -from ._compute_management_client_enums import OperatingSystemType -from ._compute_management_client_enums import OperatingSystemTypes -from ._compute_management_client_enums import OrchestrationMode -from ._compute_management_client_enums import OrchestrationServiceNames -from ._compute_management_client_enums import OrchestrationServiceState -from ._compute_management_client_enums import OrchestrationServiceStateAction -from ._compute_management_client_enums import PatchAssessmentState -from ._compute_management_client_enums import PatchInstallationState -from ._compute_management_client_enums import PatchOperationStatus -from ._compute_management_client_enums import ProtocolTypes -from ._compute_management_client_enums import ProximityPlacementGroupType -from ._compute_management_client_enums import PublicIPAddressSkuName -from ._compute_management_client_enums import PublicIPAddressSkuTier -from ._compute_management_client_enums import PublicIPAllocationMethod -from ._compute_management_client_enums import RepairAction -from ._compute_management_client_enums import ResourceIdentityType -from ._compute_management_client_enums import RestorePointCollectionExpandOptions -from ._compute_management_client_enums import RestorePointEncryptionType -from ._compute_management_client_enums import RestorePointExpandOptions -from ._compute_management_client_enums import RollingUpgradeActionType -from ._compute_management_client_enums import RollingUpgradeStatusCode -from ._compute_management_client_enums import SecurityEncryptionTypes -from ._compute_management_client_enums import SecurityTypes -from ._compute_management_client_enums import SettingNames -from ._compute_management_client_enums import StatusLevelTypes -from ._compute_management_client_enums import StorageAccountTypes -from ._compute_management_client_enums import UpgradeMode -from ._compute_management_client_enums import UpgradeOperationInvoker -from ._compute_management_client_enums import UpgradeState -from ._compute_management_client_enums import VMGuestPatchClassificationLinux -from ._compute_management_client_enums import VMGuestPatchClassificationWindows -from ._compute_management_client_enums import VMGuestPatchRebootBehavior -from ._compute_management_client_enums import VMGuestPatchRebootSetting -from ._compute_management_client_enums import VMGuestPatchRebootStatus -from ._compute_management_client_enums import VirtualMachineEvictionPolicyTypes -from ._compute_management_client_enums import VirtualMachinePriorityTypes -from ._compute_management_client_enums import VirtualMachineScaleSetScaleInRules -from ._compute_management_client_enums import VirtualMachineScaleSetSkuScaleType -from ._compute_management_client_enums import VirtualMachineSizeTypes -from ._compute_management_client_enums import VmDiskTypes -from ._compute_management_client_enums import WindowsPatchAssessmentMode -from ._compute_management_client_enums import WindowsVMGuestPatchAutomaticByPlatformRebootSetting -from ._compute_management_client_enums import WindowsVMGuestPatchMode +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + + +from ._models_py3 import ( # type: ignore + AdditionalCapabilities, + AdditionalUnattendContent, + AlternativeOption, + ApiEntityReference, + ApiError, + ApiErrorBase, + ApplicationProfile, + AutomaticOSUpgradePolicy, + AutomaticOSUpgradeProperties, + AutomaticRepairsPolicy, + AvailabilitySet, + AvailabilitySetListResult, + AvailabilitySetUpdate, + AvailablePatchSummary, + BillingProfile, + BootDiagnostics, + BootDiagnosticsInstanceView, + CapacityReservation, + CapacityReservationGroup, + CapacityReservationGroupInstanceView, + CapacityReservationGroupListResult, + CapacityReservationGroupUpdate, + CapacityReservationInstanceView, + CapacityReservationInstanceViewWithName, + CapacityReservationListResult, + CapacityReservationProfile, + CapacityReservationUpdate, + CapacityReservationUtilization, + ComputeOperationListResult, + ComputeOperationValue, + DataDisk, + DataDiskImage, + DedicatedHost, + DedicatedHostAllocatableVM, + DedicatedHostAvailableCapacity, + DedicatedHostGroup, + DedicatedHostGroupInstanceView, + DedicatedHostGroupListResult, + DedicatedHostGroupPropertiesAdditionalCapabilities, + DedicatedHostGroupUpdate, + DedicatedHostInstanceView, + DedicatedHostInstanceViewWithName, + DedicatedHostListResult, + DedicatedHostSizeListResult, + DedicatedHostUpdate, + DiagnosticsProfile, + DiffDiskSettings, + DisallowedConfiguration, + DiskEncryptionSetParameters, + DiskEncryptionSettings, + DiskInstanceView, + DiskRestorePointAttributes, + DiskRestorePointInstanceView, + DiskRestorePointReplicationStatus, + ExtendedLocation, + HardwareProfile, + Image, + ImageDataDisk, + ImageDeprecationStatus, + ImageDisk, + ImageListResult, + ImageOSDisk, + ImageReference, + ImageStorageProfile, + ImageUpdate, + InnerError, + InstanceViewStatus, + KeyVaultKeyReference, + KeyVaultSecretReference, + LastPatchInstallationSummary, + LinuxConfiguration, + LinuxParameters, + LinuxPatchSettings, + LinuxVMGuestPatchAutomaticByPlatformSettings, + ListUsagesResult, + LogAnalyticsInputBase, + LogAnalyticsOperationResult, + LogAnalyticsOutput, + MaintenanceRedeployStatus, + ManagedDiskParameters, + NetworkInterfaceReference, + NetworkProfile, + OSDisk, + OSDiskImage, + OSImageNotificationProfile, + OSProfile, + OSProfileProvisioningData, + OrchestrationServiceStateInput, + OrchestrationServiceSummary, + PatchInstallationDetail, + PatchSettings, + Plan, + PriorityMixPolicy, + ProximityPlacementGroup, + ProximityPlacementGroupListResult, + ProximityPlacementGroupPropertiesIntent, + ProximityPlacementGroupUpdate, + ProxyResource, + PublicIPAddressSku, + PurchasePlan, + RecoveryWalkResponse, + RequestRateByIntervalInput, + Resource, + ResourceWithOptionalLocation, + RestorePoint, + RestorePointCollection, + RestorePointCollectionListResult, + RestorePointCollectionSourceProperties, + RestorePointCollectionUpdate, + RestorePointEncryption, + RestorePointInstanceView, + RestorePointSourceMetadata, + RestorePointSourceVMDataDisk, + RestorePointSourceVMOSDisk, + RestorePointSourceVMStorageProfile, + RetrieveBootDiagnosticsDataResult, + RollbackStatusInfo, + RollingUpgradePolicy, + RollingUpgradeProgressInfo, + RollingUpgradeRunningStatus, + RollingUpgradeStatusInfo, + RunCommandDocument, + RunCommandDocumentBase, + RunCommandInput, + RunCommandInputParameter, + RunCommandListResult, + RunCommandManagedIdentity, + RunCommandParameterDefinition, + RunCommandResult, + ScaleInPolicy, + ScheduledEventsProfile, + SecurityPostureReference, + SecurityProfile, + ServiceArtifactReference, + Sku, + SpotRestorePolicy, + SshConfiguration, + SshPublicKey, + SshPublicKeyGenerateKeyPairResult, + SshPublicKeyResource, + SshPublicKeyUpdateResource, + SshPublicKeysGroupListResult, + StorageProfile, + SubResource, + SubResourceReadOnly, + SubResourceWithColocationStatus, + SystemData, + TerminateNotificationProfile, + ThrottledRequestsInput, + UefiSettings, + UpdateResource, + UpgradeOperationHistoricalStatusInfo, + UpgradeOperationHistoricalStatusInfoProperties, + UpgradeOperationHistoryStatus, + UpgradePolicy, + Usage, + UsageName, + UserAssignedIdentitiesValue, + VMDiskSecurityProfile, + VMGalleryApplication, + VMScaleSetConvertToSinglePlacementGroupInput, + VMSizeProperties, + VaultCertificate, + VaultSecretGroup, + VirtualHardDisk, + VirtualMachine, + VirtualMachineAgentInstanceView, + VirtualMachineAssessPatchesResult, + VirtualMachineCaptureParameters, + VirtualMachineCaptureResult, + VirtualMachineExtension, + VirtualMachineExtensionHandlerInstanceView, + VirtualMachineExtensionImage, + VirtualMachineExtensionInstanceView, + VirtualMachineExtensionUpdate, + VirtualMachineExtensionsListResult, + VirtualMachineHealthStatus, + VirtualMachineIdentity, + VirtualMachineImage, + VirtualMachineImageFeature, + VirtualMachineImageResource, + VirtualMachineInstallPatchesParameters, + VirtualMachineInstallPatchesResult, + VirtualMachineInstanceView, + VirtualMachineIpTag, + VirtualMachineListResult, + VirtualMachineNetworkInterfaceConfiguration, + VirtualMachineNetworkInterfaceDnsSettingsConfiguration, + VirtualMachineNetworkInterfaceIPConfiguration, + VirtualMachinePatchStatus, + VirtualMachinePublicIPAddressConfiguration, + VirtualMachinePublicIPAddressDnsSettingsConfiguration, + VirtualMachineReimageParameters, + VirtualMachineRunCommand, + VirtualMachineRunCommandInstanceView, + VirtualMachineRunCommandScriptSource, + VirtualMachineRunCommandUpdate, + VirtualMachineRunCommandsListResult, + VirtualMachineScaleSet, + VirtualMachineScaleSetDataDisk, + VirtualMachineScaleSetExtension, + VirtualMachineScaleSetExtensionListResult, + VirtualMachineScaleSetExtensionProfile, + VirtualMachineScaleSetExtensionUpdate, + VirtualMachineScaleSetHardwareProfile, + VirtualMachineScaleSetIPConfiguration, + VirtualMachineScaleSetIdentity, + VirtualMachineScaleSetInstanceView, + VirtualMachineScaleSetInstanceViewStatusesSummary, + VirtualMachineScaleSetIpTag, + VirtualMachineScaleSetListOSUpgradeHistory, + VirtualMachineScaleSetListResult, + VirtualMachineScaleSetListSkusResult, + VirtualMachineScaleSetListWithLinkResult, + VirtualMachineScaleSetManagedDiskParameters, + VirtualMachineScaleSetNetworkConfiguration, + VirtualMachineScaleSetNetworkConfigurationDnsSettings, + VirtualMachineScaleSetNetworkProfile, + VirtualMachineScaleSetOSDisk, + VirtualMachineScaleSetOSProfile, + VirtualMachineScaleSetPublicIPAddressConfiguration, + VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings, + VirtualMachineScaleSetReimageParameters, + VirtualMachineScaleSetSku, + VirtualMachineScaleSetSkuCapacity, + VirtualMachineScaleSetStorageProfile, + VirtualMachineScaleSetUpdate, + VirtualMachineScaleSetUpdateIPConfiguration, + VirtualMachineScaleSetUpdateNetworkConfiguration, + VirtualMachineScaleSetUpdateNetworkProfile, + VirtualMachineScaleSetUpdateOSDisk, + VirtualMachineScaleSetUpdateOSProfile, + VirtualMachineScaleSetUpdatePublicIPAddressConfiguration, + VirtualMachineScaleSetUpdateStorageProfile, + VirtualMachineScaleSetUpdateVMProfile, + VirtualMachineScaleSetVM, + VirtualMachineScaleSetVMExtension, + VirtualMachineScaleSetVMExtensionUpdate, + VirtualMachineScaleSetVMExtensionsListResult, + VirtualMachineScaleSetVMExtensionsSummary, + VirtualMachineScaleSetVMInstanceIDs, + VirtualMachineScaleSetVMInstanceRequiredIDs, + VirtualMachineScaleSetVMInstanceView, + VirtualMachineScaleSetVMListResult, + VirtualMachineScaleSetVMNetworkProfileConfiguration, + VirtualMachineScaleSetVMProfile, + VirtualMachineScaleSetVMProtectionPolicy, + VirtualMachineScaleSetVMReimageParameters, + VirtualMachineSize, + VirtualMachineSizeListResult, + VirtualMachineSoftwarePatchProperties, + VirtualMachineStatusCodeCount, + VirtualMachineUpdate, + VmImagesInEdgeZoneListResult, + WinRMConfiguration, + WinRMListener, + WindowsConfiguration, + WindowsParameters, + WindowsVMGuestPatchAutomaticByPlatformSettings, +) + +from ._compute_management_client_enums import ( # type: ignore + AlternativeType, + ArchitectureTypes, + AvailabilitySetSkuTypes, + CachingTypes, + CapacityReservationGroupInstanceViewTypes, + CapacityReservationInstanceViewTypes, + ConsistencyModeTypes, + DedicatedHostLicenseTypes, + DeleteOptions, + DiffDiskOptions, + DiffDiskPlacement, + DiskControllerTypes, + DiskCreateOptionTypes, + DiskDeleteOptionTypes, + DiskDetachOptionTypes, + ExecutionState, + ExpandTypeForListVMs, + ExpandTypesForGetCapacityReservationGroups, + ExpandTypesForGetVMScaleSets, + ExpandTypesForListVMs, + ExtendedLocationTypes, + HyperVGeneration, + HyperVGenerationType, + HyperVGenerationTypes, + IPVersion, + IPVersions, + ImageState, + InstanceViewTypes, + IntervalInMins, + LinuxPatchAssessmentMode, + LinuxVMGuestPatchAutomaticByPlatformRebootSetting, + LinuxVMGuestPatchMode, + MaintenanceOperationResultCodeTypes, + NetworkApiVersion, + OperatingSystemStateTypes, + OperatingSystemType, + OperatingSystemTypes, + OrchestrationMode, + OrchestrationServiceNames, + OrchestrationServiceState, + OrchestrationServiceStateAction, + PatchAssessmentState, + PatchInstallationState, + PatchOperationStatus, + ProtocolTypes, + ProximityPlacementGroupType, + PublicIPAddressSkuName, + PublicIPAddressSkuTier, + PublicIPAllocationMethod, + RepairAction, + ResourceIdentityType, + RestorePointCollectionExpandOptions, + RestorePointEncryptionType, + RestorePointExpandOptions, + RollingUpgradeActionType, + RollingUpgradeStatusCode, + SecurityEncryptionTypes, + SecurityTypes, + SettingNames, + StatusLevelTypes, + StorageAccountTypes, + UpgradeMode, + UpgradeOperationInvoker, + UpgradeState, + VMGuestPatchClassificationLinux, + VMGuestPatchClassificationWindows, + VMGuestPatchRebootBehavior, + VMGuestPatchRebootSetting, + VMGuestPatchRebootStatus, + VirtualMachineEvictionPolicyTypes, + VirtualMachinePriorityTypes, + VirtualMachineScaleSetScaleInRules, + VirtualMachineScaleSetSkuScaleType, + VirtualMachineSizeTypes, + VmDiskTypes, + WindowsPatchAssessmentMode, + WindowsVMGuestPatchAutomaticByPlatformRebootSetting, + WindowsVMGuestPatchMode, +) 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__ = [ @@ -687,5 +698,5 @@ "WindowsVMGuestPatchAutomaticByPlatformRebootSetting", "WindowsVMGuestPatchMode", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_03_01/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_03_01/models/_models_py3.py index e5b6e018bb964..136105fa89abb 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_03_01/models/_models_py3.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_03_01/models/_models_py3.py @@ -1,5 +1,5 @@ -# 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. @@ -16,10 +16,9 @@ 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 if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object @@ -476,7 +475,7 @@ def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kw self.tags = tags -class AvailabilitySet(Resource): # pylint: disable=too-many-instance-attributes +class AvailabilitySet(Resource): """Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see `Availability sets @@ -889,7 +888,7 @@ def __init__(self, **kwargs: Any) -> None: self.status = None -class CapacityReservation(Resource): # pylint: disable=too-many-instance-attributes +class CapacityReservation(Resource): """Specifies information about the capacity reservation. Variables are only populated by the server, and will be ignored when sending a request. @@ -1527,7 +1526,7 @@ def __init__(self, **kwargs: Any) -> None: self.provider = None -class DataDisk(_serialization.Model): # pylint: disable=too-many-instance-attributes +class DataDisk(_serialization.Model): """Describes a data disk. Variables are only populated by the server, and will be ignored when sending a request. @@ -1728,7 +1727,7 @@ def __init__(self, **kwargs: Any) -> None: self.lun = None -class DedicatedHost(Resource): # pylint: disable=too-many-instance-attributes +class DedicatedHost(Resource): """Specifies information about the Dedicated host. Variables are only populated by the server, and will be ignored when sending a request. @@ -1906,7 +1905,7 @@ def __init__( self.allocatable_v_ms = allocatable_v_ms -class DedicatedHostGroup(Resource): # pylint: disable=too-many-instance-attributes +class DedicatedHostGroup(Resource): """Specifies information about the dedicated host group that the dedicated hosts should be assigned to. Currently, a dedicated host can only be added to a dedicated host group at creation time. An existing dedicated host cannot be added to another dedicated host group. @@ -2340,7 +2339,7 @@ def __init__(self, *, value: Optional[List[str]] = None, **kwargs: Any) -> None: self.value = value -class DedicatedHostUpdate(UpdateResource): # pylint: disable=too-many-instance-attributes +class DedicatedHostUpdate(UpdateResource): """Specifies information about the dedicated host. Only tags, autoReplaceOnFailure and licenseType may be updated. @@ -3796,7 +3795,7 @@ def __init__(self, *, secret_url: str, source_vault: "_models.SubResource", **kw self.source_vault = source_vault -class LastPatchInstallationSummary(_serialization.Model): # pylint: disable=too-many-instance-attributes +class LastPatchInstallationSummary(_serialization.Model): """Describes the properties of the last installed patch summary. Variables are only populated by the server, and will be ignored when sending a request. @@ -4575,7 +4574,7 @@ def __init__(self, **kwargs: Any) -> None: self.service_state = None -class OSDisk(_serialization.Model): # pylint: disable=too-many-instance-attributes +class OSDisk(_serialization.Model): """Specifies information about the operating system disk used by the virtual machine. For more information about disks, see `About disks and VHDs for Azure virtual machines `_. @@ -5262,7 +5261,7 @@ def __init__( self.regular_priority_percentage_above_base = regular_priority_percentage_above_base -class ProximityPlacementGroup(Resource): # pylint: disable=too-many-instance-attributes +class ProximityPlacementGroup(Resource): """Specifies information about the proximity placement group. Variables are only populated by the server, and will be ignored when sending a request. @@ -8158,7 +8157,7 @@ def __init__(self, *, uri: Optional[str] = None, **kwargs: Any) -> None: self.uri = uri -class VirtualMachine(Resource): # pylint: disable=too-many-instance-attributes +class VirtualMachine(Resource): """Describes a Virtual Machine. Variables are only populated by the server, and will be ignored when sending a request. @@ -8727,7 +8726,7 @@ def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylin self.resources = None -class VirtualMachineExtension(ResourceWithOptionalLocation): # pylint: disable=too-many-instance-attributes +class VirtualMachineExtension(ResourceWithOptionalLocation): """Describes a Virtual Machine Extension. Variables are only populated by the server, and will be ignored when sending a request. @@ -9093,7 +9092,7 @@ def __init__(self, *, value: Optional[List["_models.VirtualMachineExtension"]] = self.value = value -class VirtualMachineExtensionUpdate(UpdateResource): # pylint: disable=too-many-instance-attributes +class VirtualMachineExtensionUpdate(UpdateResource): """Describes a Virtual Machine Extension. :ivar tags: Resource tags. @@ -9355,7 +9354,7 @@ def __init__( self.extended_location = extended_location -class VirtualMachineImage(VirtualMachineImageResource): # pylint: disable=too-many-instance-attributes +class VirtualMachineImage(VirtualMachineImageResource): """Describes a Virtual Machine Image. All required parameters must be populated in order to send to server. @@ -9580,7 +9579,7 @@ def __init__( self.linux_parameters = linux_parameters -class VirtualMachineInstallPatchesResult(_serialization.Model): # pylint: disable=too-many-instance-attributes +class VirtualMachineInstallPatchesResult(_serialization.Model): """The result summary of an installation operation. Variables are only populated by the server, and will be ignored when sending a request. @@ -9670,7 +9669,7 @@ def __init__(self, **kwargs: Any) -> None: self.error = None -class VirtualMachineInstanceView(_serialization.Model): # pylint: disable=too-many-instance-attributes +class VirtualMachineInstanceView(_serialization.Model): """The instance view of a virtual machine. Variables are only populated by the server, and will be ignored when sending a request. @@ -9876,9 +9875,7 @@ def __init__( self.next_link = next_link -class VirtualMachineNetworkInterfaceConfiguration( - _serialization.Model -): # pylint: disable=too-many-instance-attributes,name-too-long +class VirtualMachineNetworkInterfaceConfiguration(_serialization.Model): # pylint: disable=name-too-long """Describes a virtual machine network interface configurations. All required parameters must be populated in order to send to server. @@ -10365,7 +10362,7 @@ def __init__( self.os_profile = os_profile -class VirtualMachineRunCommand(Resource): # pylint: disable=too-many-instance-attributes +class VirtualMachineRunCommand(Resource): """Describes a Virtual Machine run command. Variables are only populated by the server, and will be ignored when sending a request. @@ -10740,7 +10737,7 @@ def __init__( self.next_link = next_link -class VirtualMachineRunCommandUpdate(UpdateResource): # pylint: disable=too-many-instance-attributes +class VirtualMachineRunCommandUpdate(UpdateResource): """Describes a Virtual Machine run command. Variables are only populated by the server, and will be ignored when sending a request. @@ -10924,7 +10921,7 @@ def __init__( self.treat_failure_as_deployment_failure = treat_failure_as_deployment_failure -class VirtualMachineScaleSet(Resource): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSet(Resource): """Describes a Virtual Machine Scale Set. Variables are only populated by the server, and will be ignored when sending a request. @@ -11326,7 +11323,7 @@ def __init__( self.delete_option = delete_option -class VirtualMachineScaleSetExtension(SubResourceReadOnly): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetExtension(SubResourceReadOnly): """Describes a Virtual Machine Scale Set Extension. Variables are only populated by the server, and will be ignored when sending a request. @@ -11546,7 +11543,7 @@ def __init__( self.extensions_time_budget = extensions_time_budget -class VirtualMachineScaleSetExtensionUpdate(SubResourceReadOnly): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetExtensionUpdate(SubResourceReadOnly): """Describes a Virtual Machine Scale Set Extension. Variables are only populated by the server, and will be ignored when sending a request. @@ -12379,7 +12376,7 @@ def __init__( self.network_api_version = network_api_version -class VirtualMachineScaleSetOSDisk(_serialization.Model): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetOSDisk(_serialization.Model): """Describes a virtual machine scale set operating system disk. All required parameters must be populated in order to send to server. @@ -13007,7 +13004,7 @@ def __init__( self.disk_controller_type = disk_controller_type -class VirtualMachineScaleSetUpdate(UpdateResource): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetUpdate(UpdateResource): """Describes a Virtual Machine Scale Set. :ivar tags: Resource tags. @@ -13687,7 +13684,7 @@ def __init__( self.disk_controller_type = disk_controller_type -class VirtualMachineScaleSetUpdateVMProfile(_serialization.Model): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetUpdateVMProfile(_serialization.Model): """Describes a virtual machine scale set virtual machine profile. :ivar os_profile: The virtual machine scale set OS profile. @@ -13800,7 +13797,7 @@ def __init__( self.hardware_profile = hardware_profile -class VirtualMachineScaleSetVM(Resource): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetVM(Resource): """Describes a virtual machine scale set virtual machine. Variables are only populated by the server, and will be ignored when sending a request. @@ -14058,7 +14055,7 @@ def __init__( # pylint: disable=too-many-locals self.user_data = user_data -class VirtualMachineScaleSetVMExtension(SubResourceReadOnly): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetVMExtension(SubResourceReadOnly): """Describes a VMSS VM Extension. Variables are only populated by the server, and will be ignored when sending a request. @@ -14270,7 +14267,7 @@ def __init__(self, **kwargs: Any) -> None: self.statuses_summary = None -class VirtualMachineScaleSetVMExtensionUpdate(SubResourceReadOnly): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetVMExtensionUpdate(SubResourceReadOnly): """Describes a VMSS VM Extension. Variables are only populated by the server, and will be ignored when sending a request. @@ -14450,7 +14447,7 @@ def __init__(self, *, instance_ids: List[str], **kwargs: Any) -> None: self.instance_ids = instance_ids -class VirtualMachineScaleSetVMInstanceView(_serialization.Model): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetVMInstanceView(_serialization.Model): """The instance view of a virtual machine scale set VM. Variables are only populated by the server, and will be ignored when sending a request. @@ -14671,7 +14668,7 @@ def __init__( self.network_interface_configurations = network_interface_configurations -class VirtualMachineScaleSetVMProfile(_serialization.Model): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetVMProfile(_serialization.Model): """Describes a virtual machine scale set virtual machine profile. :ivar os_profile: Specifies the operating system settings for the virtual machines in the scale @@ -15110,7 +15107,7 @@ def __init__(self, **kwargs: Any) -> None: self.count = None -class VirtualMachineUpdate(UpdateResource): # pylint: disable=too-many-instance-attributes +class VirtualMachineUpdate(UpdateResource): """Describes a Virtual Machine Update. Variables are only populated by the server, and will be ignored when sending a request. diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_03_01/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_03_01/operations/__init__.py index 3cc8e8e7a73a8..5cc9a11e23416 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_03_01/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_03_01/operations/__init__.py @@ -5,36 +5,42 @@ # Code generated by Microsoft (R) AutoRest 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 UsageOperations -from ._operations import VirtualMachineSizesOperations -from ._operations import VirtualMachineScaleSetsOperations -from ._operations import VirtualMachineScaleSetExtensionsOperations -from ._operations import VirtualMachineScaleSetRollingUpgradesOperations -from ._operations import VirtualMachineScaleSetVMExtensionsOperations -from ._operations import VirtualMachineScaleSetVMsOperations -from ._operations import VirtualMachineExtensionsOperations -from ._operations import VirtualMachinesOperations -from ._operations import VirtualMachineImagesOperations -from ._operations import VirtualMachineImagesEdgeZoneOperations -from ._operations import VirtualMachineExtensionImagesOperations -from ._operations import AvailabilitySetsOperations -from ._operations import ProximityPlacementGroupsOperations -from ._operations import DedicatedHostGroupsOperations -from ._operations import DedicatedHostsOperations -from ._operations import SshPublicKeysOperations -from ._operations import ImagesOperations -from ._operations import RestorePointCollectionsOperations -from ._operations import RestorePointsOperations -from ._operations import CapacityReservationGroupsOperations -from ._operations import CapacityReservationsOperations -from ._operations import LogAnalyticsOperations -from ._operations import VirtualMachineRunCommandsOperations -from ._operations import VirtualMachineScaleSetVMRunCommandsOperations +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 UsageOperations # type: ignore +from ._operations import VirtualMachineSizesOperations # type: ignore +from ._operations import VirtualMachineScaleSetsOperations # type: ignore +from ._operations import VirtualMachineScaleSetExtensionsOperations # type: ignore +from ._operations import VirtualMachineScaleSetRollingUpgradesOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMExtensionsOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMsOperations # type: ignore +from ._operations import VirtualMachineExtensionsOperations # type: ignore +from ._operations import VirtualMachinesOperations # type: ignore +from ._operations import VirtualMachineImagesOperations # type: ignore +from ._operations import VirtualMachineImagesEdgeZoneOperations # type: ignore +from ._operations import VirtualMachineExtensionImagesOperations # type: ignore +from ._operations import AvailabilitySetsOperations # type: ignore +from ._operations import ProximityPlacementGroupsOperations # type: ignore +from ._operations import DedicatedHostGroupsOperations # type: ignore +from ._operations import DedicatedHostsOperations # type: ignore +from ._operations import SshPublicKeysOperations # type: ignore +from ._operations import ImagesOperations # type: ignore +from ._operations import RestorePointCollectionsOperations # type: ignore +from ._operations import RestorePointsOperations # type: ignore +from ._operations import CapacityReservationGroupsOperations # type: ignore +from ._operations import CapacityReservationsOperations # type: ignore +from ._operations import LogAnalyticsOperations # type: ignore +from ._operations import VirtualMachineRunCommandsOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMRunCommandsOperations # 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__ = [ @@ -65,5 +71,5 @@ "VirtualMachineRunCommandsOperations", "VirtualMachineScaleSetVMRunCommandsOperations", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_03_01/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_03_01/operations/_operations.py index 6445169919735..c7ebe9507f0ef 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_03_01/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_03_01/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. @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Iterable, Iterator, List, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Iterable, Iterator, List, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -36,7 +36,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, HttpResponse], T, Dict[str, Any]], Any]] @@ -6051,7 +6051,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.ComputeOperationValue"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.ComputeOperationListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6148,7 +6148,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.Usage"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.ListUsagesResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6247,7 +6247,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.VirtualMachine api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6348,7 +6348,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> Iterable["_models.Vi api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6416,7 +6416,7 @@ def _create_or_update_initial( parameters: Union[_models.VirtualMachineScaleSet, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6608,7 +6608,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineScaleSetUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6797,7 +6797,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, *, force_deletion: Optional[bool] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6926,7 +6926,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_03_01.models.VirtualMachineScaleSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6978,7 +6978,7 @@ def _deallocate_initial( hibernate: Optional[bool] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7193,7 +7193,7 @@ def _delete_instances_initial( force_deletion: Optional[bool] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7401,7 +7401,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2023_03_01.models.VirtualMachineScaleSetInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7461,7 +7461,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Vir api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7540,7 +7540,7 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.VirtualMachineScaleSet"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.VirtualMachineScaleSetListWithLinkResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7623,7 +7623,7 @@ def list_skus( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.VirtualMachineScaleSetListSkusResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7707,7 +7707,7 @@ def get_os_upgrade_history( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.VirtualMachineScaleSetListOSUpgradeHistory] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7778,7 +7778,7 @@ def _power_off_initial( skip_shutdown: bool = False, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7991,7 +7991,7 @@ def _restart_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8180,7 +8180,7 @@ def _start_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8363,7 +8363,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _reapply_initial(self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8476,7 +8476,7 @@ def _redeploy_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8668,7 +8668,7 @@ def _perform_maintenance_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8866,7 +8866,7 @@ def _update_instances_initial( vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9052,7 +9052,7 @@ def _reimage_initial( vm_scale_set_reimage_input: Optional[Union[_models.VirtualMachineScaleSetReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9245,7 +9245,7 @@ def _reimage_all_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9461,7 +9461,7 @@ def force_recovery_service_fabric_platform_update_domain_walk( # pylint: disabl :rtype: ~azure.mgmt.compute.v2023_03_01.models.RecoveryWalkResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9507,7 +9507,7 @@ def force_recovery_service_fabric_platform_update_domain_walk( # pylint: disabl return deserialized # type: ignore @overload - def convert_to_single_placement_group( # pylint: disable=inconsistent-return-statements + def convert_to_single_placement_group( self, resource_group_name: str, vm_scale_set_name: str, @@ -9535,7 +9535,7 @@ def convert_to_single_placement_group( # pylint: disable=inconsistent-return-st """ @overload - def convert_to_single_placement_group( # pylint: disable=inconsistent-return-statements + def convert_to_single_placement_group( self, resource_group_name: str, vm_scale_set_name: str, @@ -9585,7 +9585,7 @@ def convert_to_single_placement_group( # pylint: disable=inconsistent-return-st :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9642,7 +9642,7 @@ def _set_orchestration_service_state_initial( parameters: Union[_models.OrchestrationServiceStateInput, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9850,7 +9850,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtension, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10061,7 +10061,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtensionUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10268,7 +10268,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, vmss_extension_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10398,7 +10398,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_03_01.models.VirtualMachineScaleSetExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10464,7 +10464,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.VirtualMachineScaleSetExtensionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10548,7 +10548,7 @@ def __init__(self, *args, **kwargs): self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") def _cancel_initial(self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10650,7 +10650,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_os_upgrade_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10756,7 +10756,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_extension_upgrade_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10873,7 +10873,7 @@ def get_latest( :rtype: ~azure.mgmt.compute.v2023_03_01.models.RollingUpgradeStatusInfo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10945,7 +10945,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetVMExtension, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11165,7 +11165,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetVMExtensionUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11380,7 +11380,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, vm_extension_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11516,7 +11516,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_03_01.models.VirtualMachineScaleSetVMExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11585,7 +11585,7 @@ def list( :rtype: ~azure.mgmt.compute.v2023_03_01.models.VirtualMachineScaleSetVMExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11662,7 +11662,7 @@ def _reimage_initial( ] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11861,7 +11861,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _reimage_all_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11970,7 +11970,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _deallocate_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12085,7 +12085,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineScaleSetVM, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12295,7 +12295,7 @@ def _delete_initial( force_deletion: Optional[bool] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12437,7 +12437,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_03_01.models.VirtualMachineScaleSetVM :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12497,7 +12497,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2023_03_01.models.VirtualMachineScaleSetVMInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12579,7 +12579,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.VirtualMachineScaleSetVMListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12653,7 +12653,7 @@ def _power_off_initial( skip_shutdown: bool = False, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12775,7 +12775,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _restart_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12883,7 +12883,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12991,7 +12991,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _redeploy_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13124,7 +13124,7 @@ def retrieve_boot_diagnostics_data( :rtype: ~azure.mgmt.compute.v2023_03_01.models.RetrieveBootDiagnosticsDataResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13171,7 +13171,7 @@ def retrieve_boot_diagnostics_data( def _perform_maintenance_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13292,7 +13292,7 @@ def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13339,7 +13339,7 @@ def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13563,7 +13563,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineExtension, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13773,7 +13773,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineExtensionUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13979,7 +13979,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_name: str, vm_extension_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14109,7 +14109,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_03_01.models.VirtualMachineExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14169,7 +14169,7 @@ def list( :rtype: ~azure.mgmt.compute.v2023_03_01.models.VirtualMachineExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14250,7 +14250,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> Iterable["_models.Vi api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14318,7 +14318,7 @@ def _capture_initial( parameters: Union[_models.VirtualMachineCaptureParameters, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14516,7 +14516,7 @@ def _create_or_update_initial( parameters: Union[_models.VirtualMachine, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14708,7 +14708,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14893,7 +14893,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_name: str, *, force_deletion: Optional[bool] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15024,7 +15024,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_03_01.models.VirtualMachine :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15081,7 +15081,7 @@ def instance_view( :rtype: ~azure.mgmt.compute.v2023_03_01.models.VirtualMachineInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15126,7 +15126,7 @@ def instance_view( def _convert_to_managed_disks_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15229,7 +15229,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _deallocate_initial( self, resource_group_name: str, vm_name: str, *, hibernate: Optional[bool] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15355,7 +15355,7 @@ def generalize( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15402,6 +15402,7 @@ def list( expand: Optional[Union[str, _models.ExpandTypeForListVMs]] = None, **kwargs: Any ) -> Iterable["_models.VirtualMachine"]: + # pylint: disable=line-too-long """Lists all of the virtual machines in the specified resource group. Use the nextLink property in the response to get the next page of virtual machines. @@ -15426,7 +15427,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15498,6 +15499,7 @@ def list_all( expand: Optional[Union[str, _models.ExpandTypesForListVMs]] = None, **kwargs: Any ) -> Iterable["_models.VirtualMachine"]: + # pylint: disable=line-too-long """Lists all of the virtual machines in the specified subscription. Use the nextLink property in the response to get the next page of virtual machines. @@ -15523,7 +15525,7 @@ def list_all( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15607,7 +15609,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15672,7 +15674,7 @@ def get_next(next_link=None): def _power_off_initial( self, resource_group_name: str, vm_name: str, *, skip_shutdown: bool = False, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15781,7 +15783,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _reapply_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15881,7 +15883,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _restart_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15981,7 +15983,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _start_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16081,7 +16083,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _redeploy_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16187,7 +16189,7 @@ def _reimage_initial( parameters: Optional[Union[_models.VirtualMachineReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16406,7 +16408,7 @@ def retrieve_boot_diagnostics_data( :rtype: ~azure.mgmt.compute.v2023_03_01.models.RetrieveBootDiagnosticsDataResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16450,7 +16452,7 @@ def retrieve_boot_diagnostics_data( return deserialized # type: ignore def _perform_maintenance_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16563,7 +16565,7 @@ def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16602,7 +16604,7 @@ def simulate_eviction( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore def _assess_patches_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16718,7 +16720,7 @@ def _install_patches_initial( install_patches_input: Union[_models.VirtualMachineInstallPatchesParameters, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16916,7 +16918,7 @@ def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17141,7 +17143,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_03_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17220,7 +17222,7 @@ def list( :rtype: list[~azure.mgmt.compute.v2023_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17281,7 +17283,7 @@ def list_offers( :rtype: list[~azure.mgmt.compute.v2023_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17333,7 +17335,7 @@ def list_publishers(self, location: str, **kwargs: Any) -> List[_models.VirtualM :rtype: list[~azure.mgmt.compute.v2023_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17390,7 +17392,7 @@ def list_skus( :rtype: list[~azure.mgmt.compute.v2023_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17445,7 +17447,7 @@ def list_by_edge_zone(self, location: str, edge_zone: str, **kwargs: Any) -> _mo :rtype: ~azure.mgmt.compute.v2023_03_01.models.VmImagesInEdgeZoneListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17530,7 +17532,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_03_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17615,7 +17617,7 @@ def list( :rtype: list[~azure.mgmt.compute.v2023_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17680,7 +17682,7 @@ def list_offers( :rtype: list[~azure.mgmt.compute.v2023_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17737,7 +17739,7 @@ def list_publishers( :rtype: list[~azure.mgmt.compute.v2023_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17798,7 +17800,7 @@ def list_skus( :rtype: list[~azure.mgmt.compute.v2023_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17881,7 +17883,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_03_01.models.VirtualMachineExtensionImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17939,7 +17941,7 @@ def list_types( :rtype: list[~azure.mgmt.compute.v2023_03_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18011,7 +18013,7 @@ def list_versions( :rtype: list[~azure.mgmt.compute.v2023_03_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18151,7 +18153,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2023_03_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18278,7 +18280,7 @@ def update( :rtype: ~azure.mgmt.compute.v2023_03_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18346,7 +18348,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18396,7 +18398,7 @@ def get(self, resource_group_name: str, availability_set_name: str, **kwargs: An :rtype: ~azure.mgmt.compute.v2023_03_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18457,7 +18459,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18534,7 +18536,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Ava api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18616,7 +18618,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18774,7 +18776,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2023_03_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18904,7 +18906,7 @@ def update( :rtype: ~azure.mgmt.compute.v2023_03_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18972,7 +18974,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19032,7 +19034,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_03_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19091,7 +19093,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.ProximityPlac api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19171,7 +19173,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19332,7 +19334,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2023_03_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19459,7 +19461,7 @@ def update( :rtype: ~azure.mgmt.compute.v2023_03_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19527,7 +19529,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19589,7 +19591,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_03_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19649,7 +19651,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19725,7 +19727,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.DedicatedHost api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19814,7 +19816,7 @@ def _create_or_update_initial( parameters: Union[_models.DedicatedHost, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20015,7 +20017,7 @@ def _update_initial( parameters: Union[_models.DedicatedHostUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20211,7 +20213,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20342,7 +20344,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_03_01.models.DedicatedHost :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20407,7 +20409,7 @@ def list_by_host_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.DedicatedHostListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20472,7 +20474,7 @@ def get_next(next_link=None): def _restart_initial( self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20604,7 +20606,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.DedicatedHostSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20705,7 +20707,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.SshPublicKeyR api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20786,7 +20788,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20920,7 +20922,7 @@ def create( :rtype: ~azure.mgmt.compute.v2023_03_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21048,7 +21050,7 @@ def update( :rtype: ~azure.mgmt.compute.v2023_03_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21116,7 +21118,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21166,7 +21168,7 @@ def get(self, resource_group_name: str, ssh_public_key_name: str, **kwargs: Any) :rtype: ~azure.mgmt.compute.v2023_03_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21224,7 +21226,7 @@ def generate_key_pair( :rtype: ~azure.mgmt.compute.v2023_03_01.models.SshPublicKeyGenerateKeyPairResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21290,7 +21292,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, image_name: str, parameters: Union[_models.Image, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21472,7 +21474,7 @@ def _update_initial( parameters: Union[_models.ImageUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21652,7 +21654,7 @@ def get_long_running_output(pipeline_response): ) def _delete_initial(self, resource_group_name: str, image_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21767,7 +21769,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_03_01.models.Image :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21826,7 +21828,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21902,7 +21904,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Image"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22064,7 +22066,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2023_03_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22194,7 +22196,7 @@ def update( :rtype: ~azure.mgmt.compute.v2023_03_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22251,7 +22253,7 @@ def update( def _delete_initial( self, resource_group_name: str, restore_point_collection_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22377,7 +22379,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_03_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22438,7 +22440,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Res api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.RestorePointCollectionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22517,7 +22519,7 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.RestorePointCollection"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.RestorePointCollectionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22606,7 +22608,7 @@ def _create_initial( parameters: Union[_models.RestorePoint, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22805,7 +22807,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, restore_point_collection_name: str, restore_point_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22935,7 +22937,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_03_01.models.RestorePoint :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23079,7 +23081,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2023_03_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23212,7 +23214,7 @@ def update( :rtype: ~azure.mgmt.compute.v2023_03_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23283,7 +23285,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23347,7 +23349,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_03_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23421,7 +23423,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.CapacityReservationGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23508,7 +23510,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.CapacityReservationGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23598,7 +23600,7 @@ def _create_or_update_initial( parameters: Union[_models.CapacityReservation, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23808,7 +23810,7 @@ def _update_initial( parameters: Union[_models.CapacityReservationUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24011,7 +24013,7 @@ def _delete_initial( capacity_reservation_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24149,7 +24151,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_03_01.models.CapacityReservation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24215,7 +24217,7 @@ def list_by_capacity_reservation_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.CapacityReservationListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24301,7 +24303,7 @@ def __init__(self, *args, **kwargs): def _export_request_rate_by_interval_initial( self, location: str, parameters: Union[_models.RequestRateByIntervalInput, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24478,7 +24480,7 @@ def get_long_running_output(pipeline_response): def _export_throttled_requests_initial( self, location: str, parameters: Union[_models.ThrottledRequestsInput, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24688,7 +24690,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.RunCommandDocu api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.RunCommandListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24761,7 +24763,7 @@ def get(self, location: str, command_id: str, **kwargs: Any) -> _models.RunComma :rtype: ~azure.mgmt.compute.v2023_03_01.models.RunCommandDocument :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24811,7 +24813,7 @@ def _create_or_update_initial( run_command: Union[_models.VirtualMachineRunCommand, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25020,7 +25022,7 @@ def _update_initial( run_command: Union[_models.VirtualMachineRunCommandUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25225,7 +25227,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_name: str, run_command_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25355,7 +25357,7 @@ def get_by_virtual_machine( :rtype: ~azure.mgmt.compute.v2023_03_01.models.VirtualMachineRunCommand :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25423,7 +25425,7 @@ def list_by_virtual_machine( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.VirtualMachineRunCommandsListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25516,7 +25518,7 @@ def _create_or_update_initial( run_command: Union[_models.VirtualMachineRunCommand, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25734,7 +25736,7 @@ def _update_initial( run_command: Union[_models.VirtualMachineRunCommandUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25947,7 +25949,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, run_command_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26083,7 +26085,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_03_01.models.VirtualMachineRunCommand :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26160,7 +26162,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-03-01")) cls: ClsType[_models.VirtualMachineRunCommandsListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_04_02/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_04_02/__init__.py index 3b1b6244b2375..ab7c46e8991db 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_04_02/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_04_02/__init__.py @@ -5,15 +5,21 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._compute_management_client import ComputeManagementClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._compute_management_client import ComputeManagementClient # 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__ = [ "ComputeManagementClient", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_04_02/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_04_02/_compute_management_client.py index 79727e4eb92d0..97c19fdb73514 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_04_02/_compute_management_client.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_04_02/_compute_management_client.py @@ -27,11 +27,10 @@ ) if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class ComputeManagementClient: # pylint: disable=client-accepts-api-version-keyword +class ComputeManagementClient: """Compute Client. :ivar disks: DisksOperations operations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_04_02/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_04_02/_configuration.py index 11e789644ff08..d9bd4f03daa66 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_04_02/_configuration.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_04_02/_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 ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ComputeManagementClient. Note that all parameters used to create this instance are saved as instance diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_04_02/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_04_02/_version.py index d79b2760319c5..e5754a47ce68f 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_04_02/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_04_02/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "33.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_04_02/aio/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_04_02/aio/__init__.py index 0715f50185586..d3fd1ba93379a 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_04_02/aio/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_04_02/aio/__init__.py @@ -5,12 +5,18 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._compute_management_client import ComputeManagementClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._compute_management_client import ComputeManagementClient # 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__ = [ "ComputeManagementClient", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_04_02/aio/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_04_02/aio/_compute_management_client.py index 4a8ebbba99aac..e5da640915244 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_04_02/aio/_compute_management_client.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_04_02/aio/_compute_management_client.py @@ -27,11 +27,10 @@ ) if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class ComputeManagementClient: # pylint: disable=client-accepts-api-version-keyword +class ComputeManagementClient: """Compute Client. :ivar disks: DisksOperations operations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_04_02/aio/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_04_02/aio/_configuration.py index 98854e571a447..cfefafbd316f5 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_04_02/aio/_configuration.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_04_02/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 ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ComputeManagementClient. Note that all parameters used to create this instance are saved as instance diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_04_02/aio/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_04_02/aio/operations/__init__.py index 8ca1cc2598c3b..0e0c2d8aaf8d4 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_04_02/aio/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_04_02/aio/operations/__init__.py @@ -5,15 +5,21 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._operations import DisksOperations -from ._operations import DiskAccessesOperations -from ._operations import DiskEncryptionSetsOperations -from ._operations import DiskRestorePointOperations -from ._operations import SnapshotsOperations +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._operations import DisksOperations # type: ignore +from ._operations import DiskAccessesOperations # type: ignore +from ._operations import DiskEncryptionSetsOperations # type: ignore +from ._operations import DiskRestorePointOperations # type: ignore +from ._operations import SnapshotsOperations # 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__ = [ @@ -23,5 +29,5 @@ "DiskRestorePointOperations", "SnapshotsOperations", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_04_02/aio/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_04_02/aio/operations/_operations.py index 7a986da574cb8..b81daa235b687 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_04_02/aio/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_04_02/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. @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -76,7 +76,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]] @@ -104,7 +104,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.Disk, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -288,7 +288,7 @@ def get_long_running_output(pipeline_response): async def _update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.DiskUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -483,7 +483,7 @@ async def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.compute.v2023_04_02.models.Disk :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -526,7 +526,7 @@ async def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> return deserialized # type: ignore async def _delete_initial(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -643,7 +643,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-04-02")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -718,7 +718,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Disk"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-04-02")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -785,7 +785,7 @@ async def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -980,7 +980,7 @@ def get_long_running_output(pipeline_response): async def _revoke_access_initial( self, resource_group_name: str, disk_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1113,7 +1113,7 @@ async def _create_or_update_initial( disk_access: Union[_models.DiskAccess, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1310,7 +1310,7 @@ async def _update_initial( disk_access: Union[_models.DiskAccessUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1514,7 +1514,7 @@ async def get(self, resource_group_name: str, disk_access_name: str, **kwargs: A :rtype: ~azure.mgmt.compute.v2023_04_02.models.DiskAccess :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1559,7 +1559,7 @@ async def get(self, resource_group_name: str, disk_access_name: str, **kwargs: A async def _delete_initial( self, resource_group_name: str, disk_access_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1679,7 +1679,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-04-02")) cls: ClsType[_models.DiskAccessList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1755,7 +1755,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.DiskAccess"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-04-02")) cls: ClsType[_models.DiskAccessList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1831,7 +1831,7 @@ async def get_private_link_resources( :rtype: ~azure.mgmt.compute.v2023_04_02.models.PrivateLinkResourceListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1881,7 +1881,7 @@ async def _update_a_private_endpoint_connection_initial( # pylint: disable=name private_endpoint_connection: Union[_models.PrivateEndpointConnection, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2109,7 +2109,7 @@ async def get_a_private_endpoint_connection( :rtype: ~azure.mgmt.compute.v2023_04_02.models.PrivateEndpointConnection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2155,7 +2155,7 @@ async def get_a_private_endpoint_connection( async def _delete_a_private_endpoint_connection_initial( # pylint: disable=name-too-long self, resource_group_name: str, disk_access_name: str, private_endpoint_connection_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2286,7 +2286,7 @@ def list_private_endpoint_connections( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-04-02")) cls: ClsType[_models.PrivateEndpointConnectionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2376,7 +2376,7 @@ async def _create_or_update_initial( disk_encryption_set: Union[_models.DiskEncryptionSet, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2577,7 +2577,7 @@ async def _update_initial( disk_encryption_set: Union[_models.DiskEncryptionSetUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2788,7 +2788,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_04_02.models.DiskEncryptionSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2833,7 +2833,7 @@ async def get( async def _delete_initial( self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2955,7 +2955,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-04-02")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3031,7 +3031,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.DiskEncryptionSet"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-04-02")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3113,7 +3113,7 @@ def list_associated_resources( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-04-02")) cls: ClsType[_models.ResourceUriList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3221,7 +3221,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_04_02.models.DiskRestorePoint :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3290,7 +3290,7 @@ def list_by_restore_point( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-04-02")) cls: ClsType[_models.DiskRestorePointList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3362,7 +3362,7 @@ async def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3584,7 +3584,7 @@ async def _revoke_access_initial( disk_restore_point_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3726,7 +3726,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, snapshot_name: str, snapshot: Union[_models.Snapshot, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3917,7 +3917,7 @@ async def _update_initial( snapshot: Union[_models.SnapshotUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4121,7 +4121,7 @@ async def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) :rtype: ~azure.mgmt.compute.v2023_04_02.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4166,7 +4166,7 @@ async def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) async def _delete_initial( self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4284,7 +4284,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-04-02")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4360,7 +4360,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Snapshot"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-04-02")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4427,7 +4427,7 @@ async def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4622,7 +4622,7 @@ def get_long_running_output(pipeline_response): async def _revoke_access_initial( self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_04_02/models/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_04_02/models/__init__.py index da6dfe3cf02d0..79b8cce52e884 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_04_02/models/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_04_02/models/__init__.py @@ -5,82 +5,93 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._models_py3 import AccessUri -from ._models_py3 import ApiError -from ._models_py3 import ApiErrorBase -from ._models_py3 import CopyCompletionError -from ._models_py3 import CreationData -from ._models_py3 import Disk -from ._models_py3 import DiskAccess -from ._models_py3 import DiskAccessList -from ._models_py3 import DiskAccessUpdate -from ._models_py3 import DiskEncryptionSet -from ._models_py3 import DiskEncryptionSetList -from ._models_py3 import DiskEncryptionSetUpdate -from ._models_py3 import DiskList -from ._models_py3 import DiskRestorePoint -from ._models_py3 import DiskRestorePointList -from ._models_py3 import DiskSecurityProfile -from ._models_py3 import DiskSku -from ._models_py3 import DiskUpdate -from ._models_py3 import Encryption -from ._models_py3 import EncryptionSetIdentity -from ._models_py3 import EncryptionSettingsCollection -from ._models_py3 import EncryptionSettingsElement -from ._models_py3 import ExtendedLocation -from ._models_py3 import GrantAccessData -from ._models_py3 import ImageDiskReference -from ._models_py3 import InnerError -from ._models_py3 import KeyForDiskEncryptionSet -from ._models_py3 import KeyVaultAndKeyReference -from ._models_py3 import KeyVaultAndSecretReference -from ._models_py3 import PrivateEndpoint -from ._models_py3 import PrivateEndpointConnection -from ._models_py3 import PrivateEndpointConnectionListResult -from ._models_py3 import PrivateLinkResource -from ._models_py3 import PrivateLinkResourceListResult -from ._models_py3 import PrivateLinkServiceConnectionState -from ._models_py3 import PropertyUpdatesInProgress -from ._models_py3 import ProxyOnlyResource -from ._models_py3 import PurchasePlan -from ._models_py3 import Resource -from ._models_py3 import ResourceUriList -from ._models_py3 import ResourceWithOptionalLocation -from ._models_py3 import ShareInfoElement -from ._models_py3 import Snapshot -from ._models_py3 import SnapshotList -from ._models_py3 import SnapshotSku -from ._models_py3 import SnapshotUpdate -from ._models_py3 import SourceVault -from ._models_py3 import SubResource -from ._models_py3 import SubResourceReadOnly -from ._models_py3 import SupportedCapabilities -from ._models_py3 import SystemData -from ._models_py3 import UserAssignedIdentitiesValue +from typing import TYPE_CHECKING -from ._compute_management_client_enums import AccessLevel -from ._compute_management_client_enums import Architecture -from ._compute_management_client_enums import CopyCompletionErrorReason -from ._compute_management_client_enums import DataAccessAuthMode -from ._compute_management_client_enums import DiskCreateOption -from ._compute_management_client_enums import DiskEncryptionSetIdentityType -from ._compute_management_client_enums import DiskEncryptionSetType -from ._compute_management_client_enums import DiskSecurityTypes -from ._compute_management_client_enums import DiskState -from ._compute_management_client_enums import DiskStorageAccountTypes -from ._compute_management_client_enums import EncryptionType -from ._compute_management_client_enums import ExtendedLocationTypes -from ._compute_management_client_enums import FileFormat -from ._compute_management_client_enums import HyperVGeneration -from ._compute_management_client_enums import NetworkAccessPolicy -from ._compute_management_client_enums import OperatingSystemTypes -from ._compute_management_client_enums import PrivateEndpointConnectionProvisioningState -from ._compute_management_client_enums import PrivateEndpointServiceConnectionStatus -from ._compute_management_client_enums import PublicNetworkAccess -from ._compute_management_client_enums import SnapshotStorageAccountTypes +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + + +from ._models_py3 import ( # type: ignore + AccessUri, + ApiError, + ApiErrorBase, + CopyCompletionError, + CreationData, + Disk, + DiskAccess, + DiskAccessList, + DiskAccessUpdate, + DiskEncryptionSet, + DiskEncryptionSetList, + DiskEncryptionSetUpdate, + DiskList, + DiskRestorePoint, + DiskRestorePointList, + DiskSecurityProfile, + DiskSku, + DiskUpdate, + Encryption, + EncryptionSetIdentity, + EncryptionSettingsCollection, + EncryptionSettingsElement, + ExtendedLocation, + GrantAccessData, + ImageDiskReference, + InnerError, + KeyForDiskEncryptionSet, + KeyVaultAndKeyReference, + KeyVaultAndSecretReference, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateEndpointConnectionListResult, + PrivateLinkResource, + PrivateLinkResourceListResult, + PrivateLinkServiceConnectionState, + PropertyUpdatesInProgress, + ProxyOnlyResource, + PurchasePlan, + Resource, + ResourceUriList, + ResourceWithOptionalLocation, + ShareInfoElement, + Snapshot, + SnapshotList, + SnapshotSku, + SnapshotUpdate, + SourceVault, + SubResource, + SubResourceReadOnly, + SupportedCapabilities, + SystemData, + UserAssignedIdentitiesValue, +) + +from ._compute_management_client_enums import ( # type: ignore + AccessLevel, + Architecture, + CopyCompletionErrorReason, + DataAccessAuthMode, + DiskCreateOption, + DiskEncryptionSetIdentityType, + DiskEncryptionSetType, + DiskSecurityTypes, + DiskState, + DiskStorageAccountTypes, + EncryptionType, + ExtendedLocationTypes, + FileFormat, + HyperVGeneration, + NetworkAccessPolicy, + OperatingSystemTypes, + PrivateEndpointConnectionProvisioningState, + PrivateEndpointServiceConnectionStatus, + PublicNetworkAccess, + SnapshotStorageAccountTypes, +) 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__ = [ @@ -157,5 +168,5 @@ "PublicNetworkAccess", "SnapshotStorageAccountTypes", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_04_02/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_04_02/models/_models_py3.py index 336d7feab3463..fd53eafe1ec6d 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_04_02/models/_models_py3.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_04_02/models/_models_py3.py @@ -1,5 +1,5 @@ -# 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. @@ -12,7 +12,6 @@ from ... import _serialization if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models @@ -171,7 +170,7 @@ def __init__( self.error_message = error_message -class CreationData(_serialization.Model): # pylint: disable=too-many-instance-attributes +class CreationData(_serialization.Model): """Data used when creating a disk. Variables are only populated by the server, and will be ignored when sending a request. @@ -357,7 +356,7 @@ def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kw self.tags = tags -class Disk(Resource): # pylint: disable=too-many-instance-attributes +class Disk(Resource): """Disk resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -859,7 +858,7 @@ def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> N self.tags = tags -class DiskEncryptionSet(Resource): # pylint: disable=too-many-instance-attributes +class DiskEncryptionSet(Resource): """disk encryption set resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -1160,7 +1159,7 @@ def __init__(self, **kwargs: Any) -> None: self.type = None -class DiskRestorePoint(ProxyOnlyResource): # pylint: disable=too-many-instance-attributes +class DiskRestorePoint(ProxyOnlyResource): """Properties of disk restore point. Variables are only populated by the server, and will be ignored when sending a request. @@ -1427,7 +1426,7 @@ def __init__(self, *, name: Optional[Union[str, "_models.DiskStorageAccountTypes self.tier = None -class DiskUpdate(_serialization.Model): # pylint: disable=too-many-instance-attributes +class DiskUpdate(_serialization.Model): """Disk update resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -2551,7 +2550,7 @@ def __init__(self, **kwargs: Any) -> None: self.vm_uri = None -class Snapshot(Resource): # pylint: disable=too-many-instance-attributes +class Snapshot(Resource): """Snapshot resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -2889,7 +2888,7 @@ def __init__( self.tier = None -class SnapshotUpdate(_serialization.Model): # pylint: disable=too-many-instance-attributes +class SnapshotUpdate(_serialization.Model): """Snapshot update resource. :ivar tags: Resource tags. diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_04_02/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_04_02/operations/__init__.py index 8ca1cc2598c3b..0e0c2d8aaf8d4 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_04_02/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_04_02/operations/__init__.py @@ -5,15 +5,21 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._operations import DisksOperations -from ._operations import DiskAccessesOperations -from ._operations import DiskEncryptionSetsOperations -from ._operations import DiskRestorePointOperations -from ._operations import SnapshotsOperations +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._operations import DisksOperations # type: ignore +from ._operations import DiskAccessesOperations # type: ignore +from ._operations import DiskEncryptionSetsOperations # type: ignore +from ._operations import DiskRestorePointOperations # type: ignore +from ._operations import SnapshotsOperations # 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__ = [ @@ -23,5 +29,5 @@ "DiskRestorePointOperations", "SnapshotsOperations", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_04_02/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_04_02/operations/_operations.py index 9a4abb6eaf918..eb8c1b2d46318 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_04_02/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_04_02/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. @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -36,7 +36,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, HttpResponse], T, Dict[str, Any]], Any]] @@ -1280,7 +1280,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.Disk, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1464,7 +1464,7 @@ def get_long_running_output(pipeline_response): def _update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.DiskUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1659,7 +1659,7 @@ def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> _model :rtype: ~azure.mgmt.compute.v2023_04_02.models.Disk :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1702,7 +1702,7 @@ def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> _model return deserialized # type: ignore def _delete_initial(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1819,7 +1819,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-04-02")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1894,7 +1894,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Disk"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-04-02")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1961,7 +1961,7 @@ def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2151,7 +2151,7 @@ def get_long_running_output(pipeline_response): ) def _revoke_access_initial(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2282,7 +2282,7 @@ def _create_or_update_initial( disk_access: Union[_models.DiskAccess, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2476,7 +2476,7 @@ def _update_initial( disk_access: Union[_models.DiskAccessUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2677,7 +2677,7 @@ def get(self, resource_group_name: str, disk_access_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.compute.v2023_04_02.models.DiskAccess :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2720,7 +2720,7 @@ def get(self, resource_group_name: str, disk_access_name: str, **kwargs: Any) -> return deserialized # type: ignore def _delete_initial(self, resource_group_name: str, disk_access_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2837,7 +2837,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-04-02")) cls: ClsType[_models.DiskAccessList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2912,7 +2912,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.DiskAccess"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-04-02")) cls: ClsType[_models.DiskAccessList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2988,7 +2988,7 @@ def get_private_link_resources( :rtype: ~azure.mgmt.compute.v2023_04_02.models.PrivateLinkResourceListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3038,7 +3038,7 @@ def _update_a_private_endpoint_connection_initial( # pylint: disable=name-too-l private_endpoint_connection: Union[_models.PrivateEndpointConnection, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3266,7 +3266,7 @@ def get_a_private_endpoint_connection( :rtype: ~azure.mgmt.compute.v2023_04_02.models.PrivateEndpointConnection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3312,7 +3312,7 @@ def get_a_private_endpoint_connection( def _delete_a_private_endpoint_connection_initial( # pylint: disable=name-too-long self, resource_group_name: str, disk_access_name: str, private_endpoint_connection_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3443,7 +3443,7 @@ def list_private_endpoint_connections( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-04-02")) cls: ClsType[_models.PrivateEndpointConnectionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3533,7 +3533,7 @@ def _create_or_update_initial( disk_encryption_set: Union[_models.DiskEncryptionSet, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3731,7 +3731,7 @@ def _update_initial( disk_encryption_set: Union[_models.DiskEncryptionSetUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3937,7 +3937,7 @@ def get(self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: :rtype: ~azure.mgmt.compute.v2023_04_02.models.DiskEncryptionSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3982,7 +3982,7 @@ def get(self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: def _delete_initial( self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4099,7 +4099,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-04-02")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4174,7 +4174,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.DiskEncryptionSet"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-04-02")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4256,7 +4256,7 @@ def list_associated_resources( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-04-02")) cls: ClsType[_models.ResourceUriList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4364,7 +4364,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_04_02.models.DiskRestorePoint :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4432,7 +4432,7 @@ def list_by_restore_point( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-04-02")) cls: ClsType[_models.DiskRestorePointList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4504,7 +4504,7 @@ def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4723,7 +4723,7 @@ def _revoke_access_initial( disk_restore_point_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4865,7 +4865,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, snapshot_name: str, snapshot: Union[_models.Snapshot, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5053,7 +5053,7 @@ def _update_initial( snapshot: Union[_models.SnapshotUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5254,7 +5254,7 @@ def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> _m :rtype: ~azure.mgmt.compute.v2023_04_02.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5297,7 +5297,7 @@ def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> _m return deserialized # type: ignore def _delete_initial(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5414,7 +5414,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-04-02")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5489,7 +5489,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Snapshot"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-04-02")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5556,7 +5556,7 @@ def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5746,7 +5746,7 @@ def get_long_running_output(pipeline_response): ) def _revoke_access_initial(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_01/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_01/__init__.py index 3b1b6244b2375..ab7c46e8991db 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_01/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_01/__init__.py @@ -5,15 +5,21 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._compute_management_client import ComputeManagementClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._compute_management_client import ComputeManagementClient # 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__ = [ "ComputeManagementClient", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_01/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_01/_compute_management_client.py index b2fa56f282054..7900c540d3d41 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_01/_compute_management_client.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_01/_compute_management_client.py @@ -48,11 +48,10 @@ ) if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class ComputeManagementClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes +class ComputeManagementClient: # pylint: disable=too-many-instance-attributes """Compute Client. :ivar operations: Operations operations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_01/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_01/_configuration.py index 89dca8241ecc3..d35709c6b289c 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_01/_configuration.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_01/_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 ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ComputeManagementClient. Note that all parameters used to create this instance are saved as instance diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_01/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_01/_version.py index d79b2760319c5..e5754a47ce68f 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_01/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "33.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_01/aio/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_01/aio/__init__.py index 0715f50185586..d3fd1ba93379a 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_01/aio/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_01/aio/__init__.py @@ -5,12 +5,18 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._compute_management_client import ComputeManagementClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._compute_management_client import ComputeManagementClient # 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__ = [ "ComputeManagementClient", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_01/aio/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_01/aio/_compute_management_client.py index 13f5bbe58e9a7..2484a6c7b1747 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_01/aio/_compute_management_client.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_01/aio/_compute_management_client.py @@ -48,11 +48,10 @@ ) if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class ComputeManagementClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes +class ComputeManagementClient: # pylint: disable=too-many-instance-attributes """Compute Client. :ivar operations: Operations operations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_01/aio/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_01/aio/_configuration.py index 45ed7936baa41..a21c9a06f58ce 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_01/aio/_configuration.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_01/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 ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ComputeManagementClient. Note that all parameters used to create this instance are saved as instance diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_01/aio/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_01/aio/operations/__init__.py index 3cc8e8e7a73a8..5cc9a11e23416 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_01/aio/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_01/aio/operations/__init__.py @@ -5,36 +5,42 @@ # Code generated by Microsoft (R) AutoRest 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 UsageOperations -from ._operations import VirtualMachineSizesOperations -from ._operations import VirtualMachineScaleSetsOperations -from ._operations import VirtualMachineScaleSetExtensionsOperations -from ._operations import VirtualMachineScaleSetRollingUpgradesOperations -from ._operations import VirtualMachineScaleSetVMExtensionsOperations -from ._operations import VirtualMachineScaleSetVMsOperations -from ._operations import VirtualMachineExtensionsOperations -from ._operations import VirtualMachinesOperations -from ._operations import VirtualMachineImagesOperations -from ._operations import VirtualMachineImagesEdgeZoneOperations -from ._operations import VirtualMachineExtensionImagesOperations -from ._operations import AvailabilitySetsOperations -from ._operations import ProximityPlacementGroupsOperations -from ._operations import DedicatedHostGroupsOperations -from ._operations import DedicatedHostsOperations -from ._operations import SshPublicKeysOperations -from ._operations import ImagesOperations -from ._operations import RestorePointCollectionsOperations -from ._operations import RestorePointsOperations -from ._operations import CapacityReservationGroupsOperations -from ._operations import CapacityReservationsOperations -from ._operations import LogAnalyticsOperations -from ._operations import VirtualMachineRunCommandsOperations -from ._operations import VirtualMachineScaleSetVMRunCommandsOperations +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 UsageOperations # type: ignore +from ._operations import VirtualMachineSizesOperations # type: ignore +from ._operations import VirtualMachineScaleSetsOperations # type: ignore +from ._operations import VirtualMachineScaleSetExtensionsOperations # type: ignore +from ._operations import VirtualMachineScaleSetRollingUpgradesOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMExtensionsOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMsOperations # type: ignore +from ._operations import VirtualMachineExtensionsOperations # type: ignore +from ._operations import VirtualMachinesOperations # type: ignore +from ._operations import VirtualMachineImagesOperations # type: ignore +from ._operations import VirtualMachineImagesEdgeZoneOperations # type: ignore +from ._operations import VirtualMachineExtensionImagesOperations # type: ignore +from ._operations import AvailabilitySetsOperations # type: ignore +from ._operations import ProximityPlacementGroupsOperations # type: ignore +from ._operations import DedicatedHostGroupsOperations # type: ignore +from ._operations import DedicatedHostsOperations # type: ignore +from ._operations import SshPublicKeysOperations # type: ignore +from ._operations import ImagesOperations # type: ignore +from ._operations import RestorePointCollectionsOperations # type: ignore +from ._operations import RestorePointsOperations # type: ignore +from ._operations import CapacityReservationGroupsOperations # type: ignore +from ._operations import CapacityReservationsOperations # type: ignore +from ._operations import LogAnalyticsOperations # type: ignore +from ._operations import VirtualMachineRunCommandsOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMRunCommandsOperations # 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__ = [ @@ -65,5 +71,5 @@ "VirtualMachineRunCommandsOperations", "VirtualMachineScaleSetVMRunCommandsOperations", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_01/aio/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_01/aio/operations/_operations.py index 0caa3d4b00364..65ec64d86558a 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_01/aio/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_01/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. @@ -8,21 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import ( - Any, - AsyncIterable, - AsyncIterator, - Callable, - Dict, - IO, - List, - Optional, - Type, - TypeVar, - Union, - cast, - overload, -) +from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, List, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -226,7 +212,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]] @@ -267,7 +253,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.ComputeOperationValue"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.ComputeOperationListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -364,7 +350,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.Usage"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.ListUsagesResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -464,7 +450,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.VirtualMa api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -565,7 +551,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> AsyncIterable["_mode api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -633,7 +619,7 @@ async def _create_or_update_initial( parameters: Union[_models.VirtualMachineScaleSet, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -825,7 +811,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineScaleSetUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1014,7 +1000,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, *, force_deletion: Optional[bool] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1143,7 +1129,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_07_01.models.VirtualMachineScaleSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1195,7 +1181,7 @@ async def _deallocate_initial( hibernate: Optional[bool] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1410,7 +1396,7 @@ async def _delete_instances_initial( force_deletion: Optional[bool] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1618,7 +1604,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2023_07_01.models.VirtualMachineScaleSetInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1678,7 +1664,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1757,7 +1743,7 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.VirtualMachineScaleS api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.VirtualMachineScaleSetListWithLinkResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1840,7 +1826,7 @@ def list_skus( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.VirtualMachineScaleSetListSkusResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1906,6 +1892,7 @@ async def get_next(next_link=None): def get_os_upgrade_history( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> AsyncIterable["_models.UpgradeOperationHistoricalStatusInfo"]: + # pylint: disable=line-too-long """Gets list of OS upgrades on a VM scale set instance. :param resource_group_name: The name of the resource group. Required. @@ -1924,7 +1911,7 @@ def get_os_upgrade_history( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.VirtualMachineScaleSetListOSUpgradeHistory] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1995,7 +1982,7 @@ async def _power_off_initial( skip_shutdown: bool = False, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2208,7 +2195,7 @@ async def _restart_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2397,7 +2384,7 @@ async def _start_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2582,7 +2569,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _reapply_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2697,7 +2684,7 @@ async def _redeploy_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2889,7 +2876,7 @@ async def _perform_maintenance_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3087,7 +3074,7 @@ async def _update_instances_initial( vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3273,7 +3260,7 @@ async def _reimage_initial( vm_scale_set_reimage_input: Optional[Union[_models.VirtualMachineScaleSetReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3466,7 +3453,7 @@ async def _reimage_all_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3682,7 +3669,7 @@ async def force_recovery_service_fabric_platform_update_domain_walk( # pylint: :rtype: ~azure.mgmt.compute.v2023_07_01.models.RecoveryWalkResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3728,7 +3715,7 @@ async def force_recovery_service_fabric_platform_update_domain_walk( # pylint: return deserialized # type: ignore @overload - async def convert_to_single_placement_group( # pylint: disable=inconsistent-return-statements + async def convert_to_single_placement_group( self, resource_group_name: str, vm_scale_set_name: str, @@ -3756,7 +3743,7 @@ async def convert_to_single_placement_group( # pylint: disable=inconsistent-ret """ @overload - async def convert_to_single_placement_group( # pylint: disable=inconsistent-return-statements + async def convert_to_single_placement_group( self, resource_group_name: str, vm_scale_set_name: str, @@ -3783,7 +3770,7 @@ async def convert_to_single_placement_group( # pylint: disable=inconsistent-ret """ @distributed_trace_async - async def convert_to_single_placement_group( # pylint: disable=inconsistent-return-statements + async def convert_to_single_placement_group( self, resource_group_name: str, vm_scale_set_name: str, @@ -3806,7 +3793,7 @@ async def convert_to_single_placement_group( # pylint: disable=inconsistent-ret :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3863,7 +3850,7 @@ async def _set_orchestration_service_state_initial( parameters: Union[_models.OrchestrationServiceStateInput, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4071,7 +4058,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtension, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4282,7 +4269,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtensionUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4489,7 +4476,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, vmss_extension_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4619,7 +4606,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_07_01.models.VirtualMachineScaleSetExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4685,7 +4672,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.VirtualMachineScaleSetExtensionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4771,7 +4758,7 @@ def __init__(self, *args, **kwargs) -> None: async def _cancel_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4875,7 +4862,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_os_upgrade_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4981,7 +4968,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_extension_upgrade_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5098,7 +5085,7 @@ async def get_latest( :rtype: ~azure.mgmt.compute.v2023_07_01.models.RollingUpgradeStatusInfo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5170,7 +5157,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetVMExtension, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5390,7 +5377,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetVMExtensionUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5605,7 +5592,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, vm_extension_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5741,7 +5728,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_07_01.models.VirtualMachineScaleSetVMExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5810,7 +5797,7 @@ async def list( :rtype: ~azure.mgmt.compute.v2023_07_01.models.VirtualMachineScaleSetVMExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5887,7 +5874,7 @@ async def _reimage_initial( ] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6086,7 +6073,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _reimage_all_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6195,7 +6182,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _deallocate_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6310,7 +6297,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineScaleSetVM, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6520,7 +6507,7 @@ async def _delete_initial( force_deletion: Optional[bool] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6662,7 +6649,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_07_01.models.VirtualMachineScaleSetVM :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6722,7 +6709,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2023_07_01.models.VirtualMachineScaleSetVMInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6804,7 +6791,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.VirtualMachineScaleSetVMListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6878,7 +6865,7 @@ async def _power_off_initial( skip_shutdown: bool = False, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7000,7 +6987,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _restart_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7108,7 +7095,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7216,7 +7203,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _redeploy_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7349,7 +7336,7 @@ async def retrieve_boot_diagnostics_data( :rtype: ~azure.mgmt.compute.v2023_07_01.models.RetrieveBootDiagnosticsDataResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7396,7 +7383,7 @@ async def retrieve_boot_diagnostics_data( async def _perform_maintenance_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7502,7 +7489,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace_async - async def simulate_eviction( # pylint: disable=inconsistent-return-statements + async def simulate_eviction( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: """The operation to simulate the eviction of spot virtual machine in a VM scale set. @@ -7517,7 +7504,7 @@ async def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7564,7 +7551,7 @@ async def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7791,7 +7778,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineExtension, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8001,7 +7988,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineExtensionUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8207,7 +8194,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_name: str, vm_extension_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8337,7 +8324,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_07_01.models.VirtualMachineExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8397,7 +8384,7 @@ async def list( :rtype: ~azure.mgmt.compute.v2023_07_01.models.VirtualMachineExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8479,7 +8466,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> AsyncIterable["_mode api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8547,7 +8534,7 @@ async def _capture_initial( parameters: Union[_models.VirtualMachineCaptureParameters, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8745,7 +8732,7 @@ async def _create_or_update_initial( parameters: Union[_models.VirtualMachine, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8940,7 +8927,7 @@ async def _update_initial( parameters: Union[_models.VirtualMachineUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9128,7 +9115,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_name: str, *, force_deletion: Optional[bool] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9259,7 +9246,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_07_01.models.VirtualMachine :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9316,7 +9303,7 @@ async def instance_view( :rtype: ~azure.mgmt.compute.v2023_07_01.models.VirtualMachineInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9361,7 +9348,7 @@ async def instance_view( async def _convert_to_managed_disks_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9466,7 +9453,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _deallocate_initial( self, resource_group_name: str, vm_name: str, *, hibernate: Optional[bool] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9574,9 +9561,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace_async - async def generalize( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, vm_name: str, **kwargs: Any - ) -> None: + async def generalize(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> None: """Sets the OS state of the virtual machine to generalized. It is recommended to sysprep the virtual machine before performing this operation. For Windows, please refer to `Create a managed image of a generalized VM in Azure @@ -9592,7 +9577,7 @@ async def generalize( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9639,6 +9624,7 @@ def list( expand: Optional[Union[str, _models.ExpandTypeForListVMs]] = None, **kwargs: Any ) -> AsyncIterable["_models.VirtualMachine"]: + # pylint: disable=line-too-long """Lists all of the virtual machines in the specified resource group. Use the nextLink property in the response to get the next page of virtual machines. @@ -9664,7 +9650,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9736,6 +9722,7 @@ def list_all( expand: Optional[Union[str, _models.ExpandTypesForListVMs]] = None, **kwargs: Any ) -> AsyncIterable["_models.VirtualMachine"]: + # pylint: disable=line-too-long """Lists all of the virtual machines in the specified subscription. Use the nextLink property in the response to get the next page of virtual machines. @@ -9762,7 +9749,7 @@ def list_all( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9847,7 +9834,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9912,7 +9899,7 @@ async def get_next(next_link=None): async def _power_off_initial( self, resource_group_name: str, vm_name: str, *, skip_shutdown: bool = False, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10021,7 +10008,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _reapply_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10121,7 +10108,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _restart_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10221,7 +10208,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _start_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10321,7 +10308,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _redeploy_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10427,7 +10414,7 @@ async def _reimage_initial( parameters: Optional[Union[_models.VirtualMachineReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10646,7 +10633,7 @@ async def retrieve_boot_diagnostics_data( :rtype: ~azure.mgmt.compute.v2023_07_01.models.RetrieveBootDiagnosticsDataResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10692,7 +10679,7 @@ async def retrieve_boot_diagnostics_data( async def _perform_maintenance_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10794,9 +10781,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace_async - async def simulate_eviction( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, vm_name: str, **kwargs: Any - ) -> None: + async def simulate_eviction(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> None: """The operation to simulate the eviction of spot virtual machine. :param resource_group_name: The name of the resource group. Required. @@ -10807,7 +10792,7 @@ async def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10848,7 +10833,7 @@ async def simulate_eviction( # pylint: disable=inconsistent-return-statements async def _assess_patches_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10964,7 +10949,7 @@ async def _install_patches_initial( install_patches_input: Union[_models.VirtualMachineInstallPatchesParameters, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11162,7 +11147,7 @@ async def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11390,7 +11375,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_07_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11469,7 +11454,7 @@ async def list( :rtype: list[~azure.mgmt.compute.v2023_07_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11530,7 +11515,7 @@ async def list_offers( :rtype: list[~azure.mgmt.compute.v2023_07_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11582,7 +11567,7 @@ async def list_publishers(self, location: str, **kwargs: Any) -> List[_models.Vi :rtype: list[~azure.mgmt.compute.v2023_07_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11639,7 +11624,7 @@ async def list_skus( :rtype: list[~azure.mgmt.compute.v2023_07_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11696,7 +11681,7 @@ async def list_by_edge_zone( :rtype: ~azure.mgmt.compute.v2023_07_01.models.VmImagesInEdgeZoneListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11781,7 +11766,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_07_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11866,7 +11851,7 @@ async def list( :rtype: list[~azure.mgmt.compute.v2023_07_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11931,7 +11916,7 @@ async def list_offers( :rtype: list[~azure.mgmt.compute.v2023_07_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11988,7 +11973,7 @@ async def list_publishers( :rtype: list[~azure.mgmt.compute.v2023_07_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12049,7 +12034,7 @@ async def list_skus( :rtype: list[~azure.mgmt.compute.v2023_07_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12132,7 +12117,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_07_01.models.VirtualMachineExtensionImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12190,7 +12175,7 @@ async def list_types( :rtype: list[~azure.mgmt.compute.v2023_07_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12262,7 +12247,7 @@ async def list_versions( :rtype: list[~azure.mgmt.compute.v2023_07_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12402,7 +12387,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2023_07_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12529,7 +12514,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2023_07_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12584,9 +12569,7 @@ async def update( return deserialized # type: ignore @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, availability_set_name: str, **kwargs: Any - ) -> None: + async def delete(self, resource_group_name: str, availability_set_name: str, **kwargs: Any) -> None: """Delete an availability set. :param resource_group_name: The name of the resource group. Required. @@ -12597,7 +12580,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12647,7 +12630,7 @@ async def get(self, resource_group_name: str, availability_set_name: str, **kwar :rtype: ~azure.mgmt.compute.v2023_07_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12709,7 +12692,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12787,7 +12770,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12870,7 +12853,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13028,7 +13011,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2023_07_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13158,7 +13141,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2023_07_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13213,9 +13196,7 @@ async def update( return deserialized # type: ignore @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, proximity_placement_group_name: str, **kwargs: Any - ) -> None: + async def delete(self, resource_group_name: str, proximity_placement_group_name: str, **kwargs: Any) -> None: """Delete a proximity placement group. :param resource_group_name: The name of the resource group. Required. @@ -13226,7 +13207,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13286,7 +13267,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_07_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13345,7 +13326,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Proximit api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13425,7 +13406,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13586,7 +13567,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2023_07_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13713,7 +13694,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2023_07_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13768,9 +13749,7 @@ async def update( return deserialized # type: ignore @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, host_group_name: str, **kwargs: Any - ) -> None: + async def delete(self, resource_group_name: str, host_group_name: str, **kwargs: Any) -> None: """Delete a dedicated host group. :param resource_group_name: The name of the resource group. Required. @@ -13781,7 +13760,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13843,7 +13822,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_07_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13906,7 +13885,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13983,7 +13962,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Dedicate api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14072,7 +14051,7 @@ async def _create_or_update_initial( parameters: Union[_models.DedicatedHost, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14276,7 +14255,7 @@ async def _update_initial( parameters: Union[_models.DedicatedHostUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14475,7 +14454,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14606,7 +14585,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_07_01.models.DedicatedHost :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14672,7 +14651,7 @@ def list_by_host_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.DedicatedHostListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14737,7 +14716,7 @@ async def get_next(next_link=None): async def _restart_initial( self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14869,7 +14848,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.DedicatedHostSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14970,7 +14949,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.SshPubli api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15051,7 +15030,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15185,7 +15164,7 @@ async def create( :rtype: ~azure.mgmt.compute.v2023_07_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15313,7 +15292,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2023_07_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15368,9 +15347,7 @@ async def update( return deserialized # type: ignore @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, ssh_public_key_name: str, **kwargs: Any - ) -> None: + async def delete(self, resource_group_name: str, ssh_public_key_name: str, **kwargs: Any) -> None: """Delete an SSH public key. :param resource_group_name: The name of the resource group. Required. @@ -15381,7 +15358,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15433,7 +15410,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_07_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15491,7 +15468,7 @@ async def generate_key_pair( :rtype: ~azure.mgmt.compute.v2023_07_01.models.SshPublicKeyGenerateKeyPairResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15557,7 +15534,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, image_name: str, parameters: Union[_models.Image, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15739,7 +15716,7 @@ async def _update_initial( parameters: Union[_models.ImageUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15919,7 +15896,7 @@ def get_long_running_output(pipeline_response): ) async def _delete_initial(self, resource_group_name: str, image_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16034,7 +16011,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_07_01.models.Image :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16094,7 +16071,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16170,7 +16147,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Image"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16332,7 +16309,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2023_07_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16462,7 +16439,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2023_07_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16519,7 +16496,7 @@ async def update( async def _delete_initial( self, resource_group_name: str, restore_point_collection_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16645,7 +16622,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_07_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16706,7 +16683,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.RestorePointCollectionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16785,7 +16762,7 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.RestorePointCollecti api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.RestorePointCollectionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16874,7 +16851,7 @@ async def _create_initial( parameters: Union[_models.RestorePoint, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17073,7 +17050,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, restore_point_collection_name: str, restore_point_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17203,7 +17180,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_07_01.models.RestorePoint :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17347,7 +17324,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2023_07_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17480,7 +17457,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2023_07_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17535,9 +17512,7 @@ async def update( return deserialized # type: ignore @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, capacity_reservation_group_name: str, **kwargs: Any - ) -> None: + async def delete(self, resource_group_name: str, capacity_reservation_group_name: str, **kwargs: Any) -> None: """The operation to delete a capacity reservation group. This operation is allowed only if all the associated resources are disassociated from the reservation group and all capacity reservations under the reservation group have also been deleted. Please refer to @@ -17551,7 +17526,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17615,7 +17590,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_07_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17689,7 +17664,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.CapacityReservationGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17776,7 +17751,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.CapacityReservationGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17866,7 +17841,7 @@ async def _create_or_update_initial( parameters: Union[_models.CapacityReservation, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18076,7 +18051,7 @@ async def _update_initial( parameters: Union[_models.CapacityReservationUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18279,7 +18254,7 @@ async def _delete_initial( capacity_reservation_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18417,7 +18392,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_07_01.models.CapacityReservation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18483,7 +18458,7 @@ def list_by_capacity_reservation_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.CapacityReservationListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18569,7 +18544,7 @@ def __init__(self, *args, **kwargs) -> None: async def _export_request_rate_by_interval_initial( self, location: str, parameters: Union[_models.RequestRateByIntervalInput, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18747,7 +18722,7 @@ def get_long_running_output(pipeline_response): async def _export_throttled_requests_initial( self, location: str, parameters: Union[_models.ThrottledRequestsInput, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18958,7 +18933,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.RunComman api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.RunCommandListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19031,7 +19006,7 @@ async def get(self, location: str, command_id: str, **kwargs: Any) -> _models.Ru :rtype: ~azure.mgmt.compute.v2023_07_01.models.RunCommandDocument :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19081,7 +19056,7 @@ async def _create_or_update_initial( run_command: Union[_models.VirtualMachineRunCommand, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19290,7 +19265,7 @@ async def _update_initial( run_command: Union[_models.VirtualMachineRunCommandUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19495,7 +19470,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_name: str, run_command_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19625,7 +19600,7 @@ async def get_by_virtual_machine( :rtype: ~azure.mgmt.compute.v2023_07_01.models.VirtualMachineRunCommand :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19693,7 +19668,7 @@ def list_by_virtual_machine( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.VirtualMachineRunCommandsListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19786,7 +19761,7 @@ async def _create_or_update_initial( run_command: Union[_models.VirtualMachineRunCommand, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20004,7 +19979,7 @@ async def _update_initial( run_command: Union[_models.VirtualMachineRunCommandUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20217,7 +20192,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, run_command_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20353,7 +20328,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_07_01.models.VirtualMachineRunCommand :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20430,7 +20405,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.VirtualMachineRunCommandsListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_01/models/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_01/models/__init__.py index 15e443e4ca269..43dc1ec3365f4 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_01/models/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_01/models/__init__.py @@ -5,350 +5,361 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._models_py3 import AdditionalCapabilities -from ._models_py3 import AdditionalUnattendContent -from ._models_py3 import AlternativeOption -from ._models_py3 import ApiEntityReference -from ._models_py3 import ApiError -from ._models_py3 import ApiErrorBase -from ._models_py3 import ApplicationProfile -from ._models_py3 import AutomaticOSUpgradePolicy -from ._models_py3 import AutomaticOSUpgradeProperties -from ._models_py3 import AutomaticRepairsPolicy -from ._models_py3 import AvailabilitySet -from ._models_py3 import AvailabilitySetListResult -from ._models_py3 import AvailabilitySetUpdate -from ._models_py3 import AvailablePatchSummary -from ._models_py3 import BillingProfile -from ._models_py3 import BootDiagnostics -from ._models_py3 import BootDiagnosticsInstanceView -from ._models_py3 import CapacityReservation -from ._models_py3 import CapacityReservationGroup -from ._models_py3 import CapacityReservationGroupInstanceView -from ._models_py3 import CapacityReservationGroupListResult -from ._models_py3 import CapacityReservationGroupUpdate -from ._models_py3 import CapacityReservationInstanceView -from ._models_py3 import CapacityReservationInstanceViewWithName -from ._models_py3 import CapacityReservationListResult -from ._models_py3 import CapacityReservationProfile -from ._models_py3 import CapacityReservationUpdate -from ._models_py3 import CapacityReservationUtilization -from ._models_py3 import ComputeOperationListResult -from ._models_py3 import ComputeOperationValue -from ._models_py3 import DataDisk -from ._models_py3 import DataDiskImage -from ._models_py3 import DedicatedHost -from ._models_py3 import DedicatedHostAllocatableVM -from ._models_py3 import DedicatedHostAvailableCapacity -from ._models_py3 import DedicatedHostGroup -from ._models_py3 import DedicatedHostGroupInstanceView -from ._models_py3 import DedicatedHostGroupListResult -from ._models_py3 import DedicatedHostGroupPropertiesAdditionalCapabilities -from ._models_py3 import DedicatedHostGroupUpdate -from ._models_py3 import DedicatedHostInstanceView -from ._models_py3 import DedicatedHostInstanceViewWithName -from ._models_py3 import DedicatedHostListResult -from ._models_py3 import DedicatedHostSizeListResult -from ._models_py3 import DedicatedHostUpdate -from ._models_py3 import DiagnosticsProfile -from ._models_py3 import DiffDiskSettings -from ._models_py3 import DisallowedConfiguration -from ._models_py3 import DiskEncryptionSetParameters -from ._models_py3 import DiskEncryptionSettings -from ._models_py3 import DiskInstanceView -from ._models_py3 import DiskRestorePointAttributes -from ._models_py3 import DiskRestorePointInstanceView -from ._models_py3 import DiskRestorePointReplicationStatus -from ._models_py3 import ExtendedLocation -from ._models_py3 import HardwareProfile -from ._models_py3 import Image -from ._models_py3 import ImageDataDisk -from ._models_py3 import ImageDeprecationStatus -from ._models_py3 import ImageDisk -from ._models_py3 import ImageListResult -from ._models_py3 import ImageOSDisk -from ._models_py3 import ImageReference -from ._models_py3 import ImageStorageProfile -from ._models_py3 import ImageUpdate -from ._models_py3 import InnerError -from ._models_py3 import InstanceViewStatus -from ._models_py3 import KeyVaultKeyReference -from ._models_py3 import KeyVaultSecretReference -from ._models_py3 import LastPatchInstallationSummary -from ._models_py3 import LinuxConfiguration -from ._models_py3 import LinuxParameters -from ._models_py3 import LinuxPatchSettings -from ._models_py3 import LinuxVMGuestPatchAutomaticByPlatformSettings -from ._models_py3 import ListUsagesResult -from ._models_py3 import LogAnalyticsInputBase -from ._models_py3 import LogAnalyticsOperationResult -from ._models_py3 import LogAnalyticsOutput -from ._models_py3 import MaintenanceRedeployStatus -from ._models_py3 import ManagedDiskParameters -from ._models_py3 import NetworkInterfaceReference -from ._models_py3 import NetworkProfile -from ._models_py3 import OSDisk -from ._models_py3 import OSDiskImage -from ._models_py3 import OSImageNotificationProfile -from ._models_py3 import OSProfile -from ._models_py3 import OSProfileProvisioningData -from ._models_py3 import OrchestrationServiceStateInput -from ._models_py3 import OrchestrationServiceSummary -from ._models_py3 import PatchInstallationDetail -from ._models_py3 import PatchSettings -from ._models_py3 import Plan -from ._models_py3 import PriorityMixPolicy -from ._models_py3 import ProximityPlacementGroup -from ._models_py3 import ProximityPlacementGroupListResult -from ._models_py3 import ProximityPlacementGroupPropertiesIntent -from ._models_py3 import ProximityPlacementGroupUpdate -from ._models_py3 import ProxyResource -from ._models_py3 import PublicIPAddressSku -from ._models_py3 import PurchasePlan -from ._models_py3 import RecoveryWalkResponse -from ._models_py3 import RequestRateByIntervalInput -from ._models_py3 import Resource -from ._models_py3 import ResourceWithOptionalLocation -from ._models_py3 import RestorePoint -from ._models_py3 import RestorePointCollection -from ._models_py3 import RestorePointCollectionListResult -from ._models_py3 import RestorePointCollectionSourceProperties -from ._models_py3 import RestorePointCollectionUpdate -from ._models_py3 import RestorePointEncryption -from ._models_py3 import RestorePointInstanceView -from ._models_py3 import RestorePointSourceMetadata -from ._models_py3 import RestorePointSourceVMDataDisk -from ._models_py3 import RestorePointSourceVMOSDisk -from ._models_py3 import RestorePointSourceVMStorageProfile -from ._models_py3 import RetrieveBootDiagnosticsDataResult -from ._models_py3 import RollbackStatusInfo -from ._models_py3 import RollingUpgradePolicy -from ._models_py3 import RollingUpgradeProgressInfo -from ._models_py3 import RollingUpgradeRunningStatus -from ._models_py3 import RollingUpgradeStatusInfo -from ._models_py3 import RunCommandDocument -from ._models_py3 import RunCommandDocumentBase -from ._models_py3 import RunCommandInput -from ._models_py3 import RunCommandInputParameter -from ._models_py3 import RunCommandListResult -from ._models_py3 import RunCommandManagedIdentity -from ._models_py3 import RunCommandParameterDefinition -from ._models_py3 import RunCommandResult -from ._models_py3 import ScaleInPolicy -from ._models_py3 import ScheduledEventsProfile -from ._models_py3 import SecurityPostureReference -from ._models_py3 import SecurityProfile -from ._models_py3 import ServiceArtifactReference -from ._models_py3 import Sku -from ._models_py3 import SpotRestorePolicy -from ._models_py3 import SshConfiguration -from ._models_py3 import SshPublicKey -from ._models_py3 import SshPublicKeyGenerateKeyPairResult -from ._models_py3 import SshPublicKeyResource -from ._models_py3 import SshPublicKeyUpdateResource -from ._models_py3 import SshPublicKeysGroupListResult -from ._models_py3 import StorageProfile -from ._models_py3 import SubResource -from ._models_py3 import SubResourceReadOnly -from ._models_py3 import SubResourceWithColocationStatus -from ._models_py3 import SystemData -from ._models_py3 import TerminateNotificationProfile -from ._models_py3 import ThrottledRequestsInput -from ._models_py3 import UefiSettings -from ._models_py3 import UpdateResource -from ._models_py3 import UpgradeOperationHistoricalStatusInfo -from ._models_py3 import UpgradeOperationHistoricalStatusInfoProperties -from ._models_py3 import UpgradeOperationHistoryStatus -from ._models_py3 import UpgradePolicy -from ._models_py3 import Usage -from ._models_py3 import UsageName -from ._models_py3 import UserAssignedIdentitiesValue -from ._models_py3 import VMDiskSecurityProfile -from ._models_py3 import VMGalleryApplication -from ._models_py3 import VMScaleSetConvertToSinglePlacementGroupInput -from ._models_py3 import VMSizeProperties -from ._models_py3 import VaultCertificate -from ._models_py3 import VaultSecretGroup -from ._models_py3 import VirtualHardDisk -from ._models_py3 import VirtualMachine -from ._models_py3 import VirtualMachineAgentInstanceView -from ._models_py3 import VirtualMachineAssessPatchesResult -from ._models_py3 import VirtualMachineCaptureParameters -from ._models_py3 import VirtualMachineCaptureResult -from ._models_py3 import VirtualMachineExtension -from ._models_py3 import VirtualMachineExtensionHandlerInstanceView -from ._models_py3 import VirtualMachineExtensionImage -from ._models_py3 import VirtualMachineExtensionInstanceView -from ._models_py3 import VirtualMachineExtensionUpdate -from ._models_py3 import VirtualMachineExtensionsListResult -from ._models_py3 import VirtualMachineHealthStatus -from ._models_py3 import VirtualMachineIdentity -from ._models_py3 import VirtualMachineImage -from ._models_py3 import VirtualMachineImageFeature -from ._models_py3 import VirtualMachineImageResource -from ._models_py3 import VirtualMachineInstallPatchesParameters -from ._models_py3 import VirtualMachineInstallPatchesResult -from ._models_py3 import VirtualMachineInstanceView -from ._models_py3 import VirtualMachineIpTag -from ._models_py3 import VirtualMachineListResult -from ._models_py3 import VirtualMachineNetworkInterfaceConfiguration -from ._models_py3 import VirtualMachineNetworkInterfaceDnsSettingsConfiguration -from ._models_py3 import VirtualMachineNetworkInterfaceIPConfiguration -from ._models_py3 import VirtualMachinePatchStatus -from ._models_py3 import VirtualMachinePublicIPAddressConfiguration -from ._models_py3 import VirtualMachinePublicIPAddressDnsSettingsConfiguration -from ._models_py3 import VirtualMachineReimageParameters -from ._models_py3 import VirtualMachineRunCommand -from ._models_py3 import VirtualMachineRunCommandInstanceView -from ._models_py3 import VirtualMachineRunCommandScriptSource -from ._models_py3 import VirtualMachineRunCommandUpdate -from ._models_py3 import VirtualMachineRunCommandsListResult -from ._models_py3 import VirtualMachineScaleSet -from ._models_py3 import VirtualMachineScaleSetDataDisk -from ._models_py3 import VirtualMachineScaleSetExtension -from ._models_py3 import VirtualMachineScaleSetExtensionListResult -from ._models_py3 import VirtualMachineScaleSetExtensionProfile -from ._models_py3 import VirtualMachineScaleSetExtensionUpdate -from ._models_py3 import VirtualMachineScaleSetHardwareProfile -from ._models_py3 import VirtualMachineScaleSetIPConfiguration -from ._models_py3 import VirtualMachineScaleSetIdentity -from ._models_py3 import VirtualMachineScaleSetInstanceView -from ._models_py3 import VirtualMachineScaleSetInstanceViewStatusesSummary -from ._models_py3 import VirtualMachineScaleSetIpTag -from ._models_py3 import VirtualMachineScaleSetListOSUpgradeHistory -from ._models_py3 import VirtualMachineScaleSetListResult -from ._models_py3 import VirtualMachineScaleSetListSkusResult -from ._models_py3 import VirtualMachineScaleSetListWithLinkResult -from ._models_py3 import VirtualMachineScaleSetManagedDiskParameters -from ._models_py3 import VirtualMachineScaleSetNetworkConfiguration -from ._models_py3 import VirtualMachineScaleSetNetworkConfigurationDnsSettings -from ._models_py3 import VirtualMachineScaleSetNetworkProfile -from ._models_py3 import VirtualMachineScaleSetOSDisk -from ._models_py3 import VirtualMachineScaleSetOSProfile -from ._models_py3 import VirtualMachineScaleSetPublicIPAddressConfiguration -from ._models_py3 import VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings -from ._models_py3 import VirtualMachineScaleSetReimageParameters -from ._models_py3 import VirtualMachineScaleSetSku -from ._models_py3 import VirtualMachineScaleSetSkuCapacity -from ._models_py3 import VirtualMachineScaleSetStorageProfile -from ._models_py3 import VirtualMachineScaleSetUpdate -from ._models_py3 import VirtualMachineScaleSetUpdateIPConfiguration -from ._models_py3 import VirtualMachineScaleSetUpdateNetworkConfiguration -from ._models_py3 import VirtualMachineScaleSetUpdateNetworkProfile -from ._models_py3 import VirtualMachineScaleSetUpdateOSDisk -from ._models_py3 import VirtualMachineScaleSetUpdateOSProfile -from ._models_py3 import VirtualMachineScaleSetUpdatePublicIPAddressConfiguration -from ._models_py3 import VirtualMachineScaleSetUpdateStorageProfile -from ._models_py3 import VirtualMachineScaleSetUpdateVMProfile -from ._models_py3 import VirtualMachineScaleSetVM -from ._models_py3 import VirtualMachineScaleSetVMExtension -from ._models_py3 import VirtualMachineScaleSetVMExtensionUpdate -from ._models_py3 import VirtualMachineScaleSetVMExtensionsListResult -from ._models_py3 import VirtualMachineScaleSetVMExtensionsSummary -from ._models_py3 import VirtualMachineScaleSetVMInstanceIDs -from ._models_py3 import VirtualMachineScaleSetVMInstanceRequiredIDs -from ._models_py3 import VirtualMachineScaleSetVMInstanceView -from ._models_py3 import VirtualMachineScaleSetVMListResult -from ._models_py3 import VirtualMachineScaleSetVMNetworkProfileConfiguration -from ._models_py3 import VirtualMachineScaleSetVMProfile -from ._models_py3 import VirtualMachineScaleSetVMProtectionPolicy -from ._models_py3 import VirtualMachineScaleSetVMReimageParameters -from ._models_py3 import VirtualMachineSize -from ._models_py3 import VirtualMachineSizeListResult -from ._models_py3 import VirtualMachineSoftwarePatchProperties -from ._models_py3 import VirtualMachineStatusCodeCount -from ._models_py3 import VirtualMachineUpdate -from ._models_py3 import VmImagesInEdgeZoneListResult -from ._models_py3 import WinRMConfiguration -from ._models_py3 import WinRMListener -from ._models_py3 import WindowsConfiguration -from ._models_py3 import WindowsParameters -from ._models_py3 import WindowsVMGuestPatchAutomaticByPlatformSettings +from typing import TYPE_CHECKING -from ._compute_management_client_enums import AlternativeType -from ._compute_management_client_enums import ArchitectureTypes -from ._compute_management_client_enums import AvailabilitySetSkuTypes -from ._compute_management_client_enums import CachingTypes -from ._compute_management_client_enums import CapacityReservationGroupInstanceViewTypes -from ._compute_management_client_enums import CapacityReservationInstanceViewTypes -from ._compute_management_client_enums import ConsistencyModeTypes -from ._compute_management_client_enums import DedicatedHostLicenseTypes -from ._compute_management_client_enums import DeleteOptions -from ._compute_management_client_enums import DiffDiskOptions -from ._compute_management_client_enums import DiffDiskPlacement -from ._compute_management_client_enums import DiskControllerTypes -from ._compute_management_client_enums import DiskCreateOptionTypes -from ._compute_management_client_enums import DiskDeleteOptionTypes -from ._compute_management_client_enums import DiskDetachOptionTypes -from ._compute_management_client_enums import DomainNameLabelScopeTypes -from ._compute_management_client_enums import ExecutionState -from ._compute_management_client_enums import ExpandTypeForListVMs -from ._compute_management_client_enums import ExpandTypesForGetCapacityReservationGroups -from ._compute_management_client_enums import ExpandTypesForGetVMScaleSets -from ._compute_management_client_enums import ExpandTypesForListVMs -from ._compute_management_client_enums import ExtendedLocationTypes -from ._compute_management_client_enums import HyperVGeneration -from ._compute_management_client_enums import HyperVGenerationType -from ._compute_management_client_enums import HyperVGenerationTypes -from ._compute_management_client_enums import IPVersion -from ._compute_management_client_enums import IPVersions -from ._compute_management_client_enums import ImageState -from ._compute_management_client_enums import InstanceViewTypes -from ._compute_management_client_enums import IntervalInMins -from ._compute_management_client_enums import LinuxPatchAssessmentMode -from ._compute_management_client_enums import LinuxVMGuestPatchAutomaticByPlatformRebootSetting -from ._compute_management_client_enums import LinuxVMGuestPatchMode -from ._compute_management_client_enums import MaintenanceOperationResultCodeTypes -from ._compute_management_client_enums import NetworkApiVersion -from ._compute_management_client_enums import NetworkInterfaceAuxiliaryMode -from ._compute_management_client_enums import NetworkInterfaceAuxiliarySku -from ._compute_management_client_enums import OperatingSystemStateTypes -from ._compute_management_client_enums import OperatingSystemType -from ._compute_management_client_enums import OperatingSystemTypes -from ._compute_management_client_enums import OrchestrationMode -from ._compute_management_client_enums import OrchestrationServiceNames -from ._compute_management_client_enums import OrchestrationServiceState -from ._compute_management_client_enums import OrchestrationServiceStateAction -from ._compute_management_client_enums import PatchAssessmentState -from ._compute_management_client_enums import PatchInstallationState -from ._compute_management_client_enums import PatchOperationStatus -from ._compute_management_client_enums import ProtocolTypes -from ._compute_management_client_enums import ProximityPlacementGroupType -from ._compute_management_client_enums import PublicIPAddressSkuName -from ._compute_management_client_enums import PublicIPAddressSkuTier -from ._compute_management_client_enums import PublicIPAllocationMethod -from ._compute_management_client_enums import RepairAction -from ._compute_management_client_enums import ResourceIdentityType -from ._compute_management_client_enums import RestorePointCollectionExpandOptions -from ._compute_management_client_enums import RestorePointEncryptionType -from ._compute_management_client_enums import RestorePointExpandOptions -from ._compute_management_client_enums import RollingUpgradeActionType -from ._compute_management_client_enums import RollingUpgradeStatusCode -from ._compute_management_client_enums import SecurityEncryptionTypes -from ._compute_management_client_enums import SecurityTypes -from ._compute_management_client_enums import SettingNames -from ._compute_management_client_enums import StatusLevelTypes -from ._compute_management_client_enums import StorageAccountTypes -from ._compute_management_client_enums import UpgradeMode -from ._compute_management_client_enums import UpgradeOperationInvoker -from ._compute_management_client_enums import UpgradeState -from ._compute_management_client_enums import VMGuestPatchClassificationLinux -from ._compute_management_client_enums import VMGuestPatchClassificationWindows -from ._compute_management_client_enums import VMGuestPatchRebootBehavior -from ._compute_management_client_enums import VMGuestPatchRebootSetting -from ._compute_management_client_enums import VMGuestPatchRebootStatus -from ._compute_management_client_enums import VirtualMachineEvictionPolicyTypes -from ._compute_management_client_enums import VirtualMachinePriorityTypes -from ._compute_management_client_enums import VirtualMachineScaleSetScaleInRules -from ._compute_management_client_enums import VirtualMachineScaleSetSkuScaleType -from ._compute_management_client_enums import VirtualMachineSizeTypes -from ._compute_management_client_enums import VmDiskTypes -from ._compute_management_client_enums import WindowsPatchAssessmentMode -from ._compute_management_client_enums import WindowsVMGuestPatchAutomaticByPlatformRebootSetting -from ._compute_management_client_enums import WindowsVMGuestPatchMode +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + + +from ._models_py3 import ( # type: ignore + AdditionalCapabilities, + AdditionalUnattendContent, + AlternativeOption, + ApiEntityReference, + ApiError, + ApiErrorBase, + ApplicationProfile, + AutomaticOSUpgradePolicy, + AutomaticOSUpgradeProperties, + AutomaticRepairsPolicy, + AvailabilitySet, + AvailabilitySetListResult, + AvailabilitySetUpdate, + AvailablePatchSummary, + BillingProfile, + BootDiagnostics, + BootDiagnosticsInstanceView, + CapacityReservation, + CapacityReservationGroup, + CapacityReservationGroupInstanceView, + CapacityReservationGroupListResult, + CapacityReservationGroupUpdate, + CapacityReservationInstanceView, + CapacityReservationInstanceViewWithName, + CapacityReservationListResult, + CapacityReservationProfile, + CapacityReservationUpdate, + CapacityReservationUtilization, + ComputeOperationListResult, + ComputeOperationValue, + DataDisk, + DataDiskImage, + DedicatedHost, + DedicatedHostAllocatableVM, + DedicatedHostAvailableCapacity, + DedicatedHostGroup, + DedicatedHostGroupInstanceView, + DedicatedHostGroupListResult, + DedicatedHostGroupPropertiesAdditionalCapabilities, + DedicatedHostGroupUpdate, + DedicatedHostInstanceView, + DedicatedHostInstanceViewWithName, + DedicatedHostListResult, + DedicatedHostSizeListResult, + DedicatedHostUpdate, + DiagnosticsProfile, + DiffDiskSettings, + DisallowedConfiguration, + DiskEncryptionSetParameters, + DiskEncryptionSettings, + DiskInstanceView, + DiskRestorePointAttributes, + DiskRestorePointInstanceView, + DiskRestorePointReplicationStatus, + ExtendedLocation, + HardwareProfile, + Image, + ImageDataDisk, + ImageDeprecationStatus, + ImageDisk, + ImageListResult, + ImageOSDisk, + ImageReference, + ImageStorageProfile, + ImageUpdate, + InnerError, + InstanceViewStatus, + KeyVaultKeyReference, + KeyVaultSecretReference, + LastPatchInstallationSummary, + LinuxConfiguration, + LinuxParameters, + LinuxPatchSettings, + LinuxVMGuestPatchAutomaticByPlatformSettings, + ListUsagesResult, + LogAnalyticsInputBase, + LogAnalyticsOperationResult, + LogAnalyticsOutput, + MaintenanceRedeployStatus, + ManagedDiskParameters, + NetworkInterfaceReference, + NetworkProfile, + OSDisk, + OSDiskImage, + OSImageNotificationProfile, + OSProfile, + OSProfileProvisioningData, + OrchestrationServiceStateInput, + OrchestrationServiceSummary, + PatchInstallationDetail, + PatchSettings, + Plan, + PriorityMixPolicy, + ProximityPlacementGroup, + ProximityPlacementGroupListResult, + ProximityPlacementGroupPropertiesIntent, + ProximityPlacementGroupUpdate, + ProxyResource, + PublicIPAddressSku, + PurchasePlan, + RecoveryWalkResponse, + RequestRateByIntervalInput, + Resource, + ResourceWithOptionalLocation, + RestorePoint, + RestorePointCollection, + RestorePointCollectionListResult, + RestorePointCollectionSourceProperties, + RestorePointCollectionUpdate, + RestorePointEncryption, + RestorePointInstanceView, + RestorePointSourceMetadata, + RestorePointSourceVMDataDisk, + RestorePointSourceVMOSDisk, + RestorePointSourceVMStorageProfile, + RetrieveBootDiagnosticsDataResult, + RollbackStatusInfo, + RollingUpgradePolicy, + RollingUpgradeProgressInfo, + RollingUpgradeRunningStatus, + RollingUpgradeStatusInfo, + RunCommandDocument, + RunCommandDocumentBase, + RunCommandInput, + RunCommandInputParameter, + RunCommandListResult, + RunCommandManagedIdentity, + RunCommandParameterDefinition, + RunCommandResult, + ScaleInPolicy, + ScheduledEventsProfile, + SecurityPostureReference, + SecurityProfile, + ServiceArtifactReference, + Sku, + SpotRestorePolicy, + SshConfiguration, + SshPublicKey, + SshPublicKeyGenerateKeyPairResult, + SshPublicKeyResource, + SshPublicKeyUpdateResource, + SshPublicKeysGroupListResult, + StorageProfile, + SubResource, + SubResourceReadOnly, + SubResourceWithColocationStatus, + SystemData, + TerminateNotificationProfile, + ThrottledRequestsInput, + UefiSettings, + UpdateResource, + UpgradeOperationHistoricalStatusInfo, + UpgradeOperationHistoricalStatusInfoProperties, + UpgradeOperationHistoryStatus, + UpgradePolicy, + Usage, + UsageName, + UserAssignedIdentitiesValue, + VMDiskSecurityProfile, + VMGalleryApplication, + VMScaleSetConvertToSinglePlacementGroupInput, + VMSizeProperties, + VaultCertificate, + VaultSecretGroup, + VirtualHardDisk, + VirtualMachine, + VirtualMachineAgentInstanceView, + VirtualMachineAssessPatchesResult, + VirtualMachineCaptureParameters, + VirtualMachineCaptureResult, + VirtualMachineExtension, + VirtualMachineExtensionHandlerInstanceView, + VirtualMachineExtensionImage, + VirtualMachineExtensionInstanceView, + VirtualMachineExtensionUpdate, + VirtualMachineExtensionsListResult, + VirtualMachineHealthStatus, + VirtualMachineIdentity, + VirtualMachineImage, + VirtualMachineImageFeature, + VirtualMachineImageResource, + VirtualMachineInstallPatchesParameters, + VirtualMachineInstallPatchesResult, + VirtualMachineInstanceView, + VirtualMachineIpTag, + VirtualMachineListResult, + VirtualMachineNetworkInterfaceConfiguration, + VirtualMachineNetworkInterfaceDnsSettingsConfiguration, + VirtualMachineNetworkInterfaceIPConfiguration, + VirtualMachinePatchStatus, + VirtualMachinePublicIPAddressConfiguration, + VirtualMachinePublicIPAddressDnsSettingsConfiguration, + VirtualMachineReimageParameters, + VirtualMachineRunCommand, + VirtualMachineRunCommandInstanceView, + VirtualMachineRunCommandScriptSource, + VirtualMachineRunCommandUpdate, + VirtualMachineRunCommandsListResult, + VirtualMachineScaleSet, + VirtualMachineScaleSetDataDisk, + VirtualMachineScaleSetExtension, + VirtualMachineScaleSetExtensionListResult, + VirtualMachineScaleSetExtensionProfile, + VirtualMachineScaleSetExtensionUpdate, + VirtualMachineScaleSetHardwareProfile, + VirtualMachineScaleSetIPConfiguration, + VirtualMachineScaleSetIdentity, + VirtualMachineScaleSetInstanceView, + VirtualMachineScaleSetInstanceViewStatusesSummary, + VirtualMachineScaleSetIpTag, + VirtualMachineScaleSetListOSUpgradeHistory, + VirtualMachineScaleSetListResult, + VirtualMachineScaleSetListSkusResult, + VirtualMachineScaleSetListWithLinkResult, + VirtualMachineScaleSetManagedDiskParameters, + VirtualMachineScaleSetNetworkConfiguration, + VirtualMachineScaleSetNetworkConfigurationDnsSettings, + VirtualMachineScaleSetNetworkProfile, + VirtualMachineScaleSetOSDisk, + VirtualMachineScaleSetOSProfile, + VirtualMachineScaleSetPublicIPAddressConfiguration, + VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings, + VirtualMachineScaleSetReimageParameters, + VirtualMachineScaleSetSku, + VirtualMachineScaleSetSkuCapacity, + VirtualMachineScaleSetStorageProfile, + VirtualMachineScaleSetUpdate, + VirtualMachineScaleSetUpdateIPConfiguration, + VirtualMachineScaleSetUpdateNetworkConfiguration, + VirtualMachineScaleSetUpdateNetworkProfile, + VirtualMachineScaleSetUpdateOSDisk, + VirtualMachineScaleSetUpdateOSProfile, + VirtualMachineScaleSetUpdatePublicIPAddressConfiguration, + VirtualMachineScaleSetUpdateStorageProfile, + VirtualMachineScaleSetUpdateVMProfile, + VirtualMachineScaleSetVM, + VirtualMachineScaleSetVMExtension, + VirtualMachineScaleSetVMExtensionUpdate, + VirtualMachineScaleSetVMExtensionsListResult, + VirtualMachineScaleSetVMExtensionsSummary, + VirtualMachineScaleSetVMInstanceIDs, + VirtualMachineScaleSetVMInstanceRequiredIDs, + VirtualMachineScaleSetVMInstanceView, + VirtualMachineScaleSetVMListResult, + VirtualMachineScaleSetVMNetworkProfileConfiguration, + VirtualMachineScaleSetVMProfile, + VirtualMachineScaleSetVMProtectionPolicy, + VirtualMachineScaleSetVMReimageParameters, + VirtualMachineSize, + VirtualMachineSizeListResult, + VirtualMachineSoftwarePatchProperties, + VirtualMachineStatusCodeCount, + VirtualMachineUpdate, + VmImagesInEdgeZoneListResult, + WinRMConfiguration, + WinRMListener, + WindowsConfiguration, + WindowsParameters, + WindowsVMGuestPatchAutomaticByPlatformSettings, +) + +from ._compute_management_client_enums import ( # type: ignore + AlternativeType, + ArchitectureTypes, + AvailabilitySetSkuTypes, + CachingTypes, + CapacityReservationGroupInstanceViewTypes, + CapacityReservationInstanceViewTypes, + ConsistencyModeTypes, + DedicatedHostLicenseTypes, + DeleteOptions, + DiffDiskOptions, + DiffDiskPlacement, + DiskControllerTypes, + DiskCreateOptionTypes, + DiskDeleteOptionTypes, + DiskDetachOptionTypes, + DomainNameLabelScopeTypes, + ExecutionState, + ExpandTypeForListVMs, + ExpandTypesForGetCapacityReservationGroups, + ExpandTypesForGetVMScaleSets, + ExpandTypesForListVMs, + ExtendedLocationTypes, + HyperVGeneration, + HyperVGenerationType, + HyperVGenerationTypes, + IPVersion, + IPVersions, + ImageState, + InstanceViewTypes, + IntervalInMins, + LinuxPatchAssessmentMode, + LinuxVMGuestPatchAutomaticByPlatformRebootSetting, + LinuxVMGuestPatchMode, + MaintenanceOperationResultCodeTypes, + NetworkApiVersion, + NetworkInterfaceAuxiliaryMode, + NetworkInterfaceAuxiliarySku, + OperatingSystemStateTypes, + OperatingSystemType, + OperatingSystemTypes, + OrchestrationMode, + OrchestrationServiceNames, + OrchestrationServiceState, + OrchestrationServiceStateAction, + PatchAssessmentState, + PatchInstallationState, + PatchOperationStatus, + ProtocolTypes, + ProximityPlacementGroupType, + PublicIPAddressSkuName, + PublicIPAddressSkuTier, + PublicIPAllocationMethod, + RepairAction, + ResourceIdentityType, + RestorePointCollectionExpandOptions, + RestorePointEncryptionType, + RestorePointExpandOptions, + RollingUpgradeActionType, + RollingUpgradeStatusCode, + SecurityEncryptionTypes, + SecurityTypes, + SettingNames, + StatusLevelTypes, + StorageAccountTypes, + UpgradeMode, + UpgradeOperationInvoker, + UpgradeState, + VMGuestPatchClassificationLinux, + VMGuestPatchClassificationWindows, + VMGuestPatchRebootBehavior, + VMGuestPatchRebootSetting, + VMGuestPatchRebootStatus, + VirtualMachineEvictionPolicyTypes, + VirtualMachinePriorityTypes, + VirtualMachineScaleSetScaleInRules, + VirtualMachineScaleSetSkuScaleType, + VirtualMachineSizeTypes, + VmDiskTypes, + WindowsPatchAssessmentMode, + WindowsVMGuestPatchAutomaticByPlatformRebootSetting, + WindowsVMGuestPatchMode, +) 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__ = [ @@ -693,5 +704,5 @@ "WindowsVMGuestPatchAutomaticByPlatformRebootSetting", "WindowsVMGuestPatchMode", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_01/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_01/models/_models_py3.py index 7e0add83c3d03..619e90e55a989 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_01/models/_models_py3.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_01/models/_models_py3.py @@ -1,5 +1,5 @@ -# 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. @@ -16,10 +16,9 @@ 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 if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object @@ -476,7 +475,7 @@ def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kw self.tags = tags -class AvailabilitySet(Resource): # pylint: disable=too-many-instance-attributes +class AvailabilitySet(Resource): """Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see `Availability sets @@ -889,7 +888,7 @@ def __init__(self, **kwargs: Any) -> None: self.status = None -class CapacityReservation(Resource): # pylint: disable=too-many-instance-attributes +class CapacityReservation(Resource): """Specifies information about the capacity reservation. Variables are only populated by the server, and will be ignored when sending a request. @@ -1527,7 +1526,7 @@ def __init__(self, **kwargs: Any) -> None: self.provider = None -class DataDisk(_serialization.Model): # pylint: disable=too-many-instance-attributes +class DataDisk(_serialization.Model): """Describes a data disk. Variables are only populated by the server, and will be ignored when sending a request. @@ -1728,7 +1727,7 @@ def __init__(self, **kwargs: Any) -> None: self.lun = None -class DedicatedHost(Resource): # pylint: disable=too-many-instance-attributes +class DedicatedHost(Resource): """Specifies information about the Dedicated host. Variables are only populated by the server, and will be ignored when sending a request. @@ -1906,7 +1905,7 @@ def __init__( self.allocatable_v_ms = allocatable_v_ms -class DedicatedHostGroup(Resource): # pylint: disable=too-many-instance-attributes +class DedicatedHostGroup(Resource): """Specifies information about the dedicated host group that the dedicated hosts should be assigned to. Currently, a dedicated host can only be added to a dedicated host group at creation time. An existing dedicated host cannot be added to another dedicated host group. @@ -2340,7 +2339,7 @@ def __init__(self, *, value: Optional[List[str]] = None, **kwargs: Any) -> None: self.value = value -class DedicatedHostUpdate(UpdateResource): # pylint: disable=too-many-instance-attributes +class DedicatedHostUpdate(UpdateResource): """Specifies information about the dedicated host. Only tags, autoReplaceOnFailure and licenseType may be updated. @@ -3796,7 +3795,7 @@ def __init__(self, *, secret_url: str, source_vault: "_models.SubResource", **kw self.source_vault = source_vault -class LastPatchInstallationSummary(_serialization.Model): # pylint: disable=too-many-instance-attributes +class LastPatchInstallationSummary(_serialization.Model): """Describes the properties of the last installed patch summary. Variables are only populated by the server, and will be ignored when sending a request. @@ -4575,7 +4574,7 @@ def __init__(self, **kwargs: Any) -> None: self.service_state = None -class OSDisk(_serialization.Model): # pylint: disable=too-many-instance-attributes +class OSDisk(_serialization.Model): """Specifies information about the operating system disk used by the virtual machine. For more information about disks, see `About disks and VHDs for Azure virtual machines `_. @@ -5262,7 +5261,7 @@ def __init__( self.regular_priority_percentage_above_base = regular_priority_percentage_above_base -class ProximityPlacementGroup(Resource): # pylint: disable=too-many-instance-attributes +class ProximityPlacementGroup(Resource): """Specifies information about the proximity placement group. Variables are only populated by the server, and will be ignored when sending a request. @@ -8158,7 +8157,7 @@ def __init__(self, *, uri: Optional[str] = None, **kwargs: Any) -> None: self.uri = uri -class VirtualMachine(Resource): # pylint: disable=too-many-instance-attributes +class VirtualMachine(Resource): """Describes a Virtual Machine. Variables are only populated by the server, and will be ignored when sending a request. @@ -8727,7 +8726,7 @@ def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylin self.resources = None -class VirtualMachineExtension(ResourceWithOptionalLocation): # pylint: disable=too-many-instance-attributes +class VirtualMachineExtension(ResourceWithOptionalLocation): """Describes a Virtual Machine Extension. Variables are only populated by the server, and will be ignored when sending a request. @@ -9093,7 +9092,7 @@ def __init__(self, *, value: Optional[List["_models.VirtualMachineExtension"]] = self.value = value -class VirtualMachineExtensionUpdate(UpdateResource): # pylint: disable=too-many-instance-attributes +class VirtualMachineExtensionUpdate(UpdateResource): """Describes a Virtual Machine Extension. :ivar tags: Resource tags. @@ -9355,7 +9354,7 @@ def __init__( self.extended_location = extended_location -class VirtualMachineImage(VirtualMachineImageResource): # pylint: disable=too-many-instance-attributes +class VirtualMachineImage(VirtualMachineImageResource): """Describes a Virtual Machine Image. All required parameters must be populated in order to send to server. @@ -9580,7 +9579,7 @@ def __init__( self.linux_parameters = linux_parameters -class VirtualMachineInstallPatchesResult(_serialization.Model): # pylint: disable=too-many-instance-attributes +class VirtualMachineInstallPatchesResult(_serialization.Model): """The result summary of an installation operation. Variables are only populated by the server, and will be ignored when sending a request. @@ -9670,7 +9669,7 @@ def __init__(self, **kwargs: Any) -> None: self.error = None -class VirtualMachineInstanceView(_serialization.Model): # pylint: disable=too-many-instance-attributes +class VirtualMachineInstanceView(_serialization.Model): """The instance view of a virtual machine. Variables are only populated by the server, and will be ignored when sending a request. @@ -9876,9 +9875,7 @@ def __init__( self.next_link = next_link -class VirtualMachineNetworkInterfaceConfiguration( - _serialization.Model -): # pylint: disable=too-many-instance-attributes,name-too-long +class VirtualMachineNetworkInterfaceConfiguration(_serialization.Model): # pylint: disable=name-too-long """Describes a virtual machine network interface configurations. All required parameters must be populated in order to send to server. @@ -10407,7 +10404,7 @@ def __init__( self.os_profile = os_profile -class VirtualMachineRunCommand(Resource): # pylint: disable=too-many-instance-attributes +class VirtualMachineRunCommand(Resource): """Describes a Virtual Machine run command. Variables are only populated by the server, and will be ignored when sending a request. @@ -10782,7 +10779,7 @@ def __init__( self.next_link = next_link -class VirtualMachineRunCommandUpdate(UpdateResource): # pylint: disable=too-many-instance-attributes +class VirtualMachineRunCommandUpdate(UpdateResource): """Describes a Virtual Machine run command. Variables are only populated by the server, and will be ignored when sending a request. @@ -10966,7 +10963,7 @@ def __init__( self.treat_failure_as_deployment_failure = treat_failure_as_deployment_failure -class VirtualMachineScaleSet(Resource): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSet(Resource): """Describes a Virtual Machine Scale Set. Variables are only populated by the server, and will be ignored when sending a request. @@ -11368,7 +11365,7 @@ def __init__( self.delete_option = delete_option -class VirtualMachineScaleSetExtension(SubResourceReadOnly): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetExtension(SubResourceReadOnly): """Describes a Virtual Machine Scale Set Extension. Variables are only populated by the server, and will be ignored when sending a request. @@ -11588,7 +11585,7 @@ def __init__( self.extensions_time_budget = extensions_time_budget -class VirtualMachineScaleSetExtensionUpdate(SubResourceReadOnly): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetExtensionUpdate(SubResourceReadOnly): """Describes a Virtual Machine Scale Set Extension. Variables are only populated by the server, and will be ignored when sending a request. @@ -12240,9 +12237,7 @@ def __init__( self.security_profile = security_profile -class VirtualMachineScaleSetNetworkConfiguration( - _serialization.Model -): # pylint: disable=too-many-instance-attributes,name-too-long +class VirtualMachineScaleSetNetworkConfiguration(_serialization.Model): # pylint: disable=name-too-long """Describes a virtual machine scale set network profile's network configurations. All required parameters must be populated in order to send to server. @@ -12445,7 +12440,7 @@ def __init__( self.network_api_version = network_api_version -class VirtualMachineScaleSetOSDisk(_serialization.Model): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetOSDisk(_serialization.Model): """Describes a virtual machine scale set operating system disk. All required parameters must be populated in order to send to server. @@ -13093,7 +13088,7 @@ def __init__( self.disk_controller_type = disk_controller_type -class VirtualMachineScaleSetUpdate(UpdateResource): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetUpdate(UpdateResource): """Describes a Virtual Machine Scale Set. :ivar tags: Resource tags. @@ -13365,9 +13360,7 @@ def __init__( self.load_balancer_inbound_nat_pools = load_balancer_inbound_nat_pools -class VirtualMachineScaleSetUpdateNetworkConfiguration( - _serialization.Model -): # pylint: disable=too-many-instance-attributes,name-too-long +class VirtualMachineScaleSetUpdateNetworkConfiguration(_serialization.Model): # pylint: disable=name-too-long """Describes a virtual machine scale set network profile's network configurations. :ivar name: The network configuration name. @@ -13797,7 +13790,7 @@ def __init__( self.disk_controller_type = disk_controller_type -class VirtualMachineScaleSetUpdateVMProfile(_serialization.Model): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetUpdateVMProfile(_serialization.Model): """Describes a virtual machine scale set virtual machine profile. :ivar os_profile: The virtual machine scale set OS profile. @@ -13910,7 +13903,7 @@ def __init__( self.hardware_profile = hardware_profile -class VirtualMachineScaleSetVM(Resource): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetVM(Resource): """Describes a virtual machine scale set virtual machine. Variables are only populated by the server, and will be ignored when sending a request. @@ -14174,7 +14167,7 @@ def __init__( # pylint: disable=too-many-locals self.time_created = None -class VirtualMachineScaleSetVMExtension(SubResourceReadOnly): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetVMExtension(SubResourceReadOnly): """Describes a VMSS VM Extension. Variables are only populated by the server, and will be ignored when sending a request. @@ -14386,7 +14379,7 @@ def __init__(self, **kwargs: Any) -> None: self.statuses_summary = None -class VirtualMachineScaleSetVMExtensionUpdate(SubResourceReadOnly): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetVMExtensionUpdate(SubResourceReadOnly): """Describes a VMSS VM Extension. Variables are only populated by the server, and will be ignored when sending a request. @@ -14566,7 +14559,7 @@ def __init__(self, *, instance_ids: List[str], **kwargs: Any) -> None: self.instance_ids = instance_ids -class VirtualMachineScaleSetVMInstanceView(_serialization.Model): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetVMInstanceView(_serialization.Model): """The instance view of a virtual machine scale set VM. Variables are only populated by the server, and will be ignored when sending a request. @@ -14787,7 +14780,7 @@ def __init__( self.network_interface_configurations = network_interface_configurations -class VirtualMachineScaleSetVMProfile(_serialization.Model): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetVMProfile(_serialization.Model): """Describes a virtual machine scale set virtual machine profile. :ivar os_profile: Specifies the operating system settings for the virtual machines in the scale @@ -15226,7 +15219,7 @@ def __init__(self, **kwargs: Any) -> None: self.count = None -class VirtualMachineUpdate(UpdateResource): # pylint: disable=too-many-instance-attributes +class VirtualMachineUpdate(UpdateResource): """Describes a Virtual Machine Update. Variables are only populated by the server, and will be ignored when sending a request. diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_01/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_01/operations/__init__.py index 3cc8e8e7a73a8..5cc9a11e23416 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_01/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_01/operations/__init__.py @@ -5,36 +5,42 @@ # Code generated by Microsoft (R) AutoRest 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 UsageOperations -from ._operations import VirtualMachineSizesOperations -from ._operations import VirtualMachineScaleSetsOperations -from ._operations import VirtualMachineScaleSetExtensionsOperations -from ._operations import VirtualMachineScaleSetRollingUpgradesOperations -from ._operations import VirtualMachineScaleSetVMExtensionsOperations -from ._operations import VirtualMachineScaleSetVMsOperations -from ._operations import VirtualMachineExtensionsOperations -from ._operations import VirtualMachinesOperations -from ._operations import VirtualMachineImagesOperations -from ._operations import VirtualMachineImagesEdgeZoneOperations -from ._operations import VirtualMachineExtensionImagesOperations -from ._operations import AvailabilitySetsOperations -from ._operations import ProximityPlacementGroupsOperations -from ._operations import DedicatedHostGroupsOperations -from ._operations import DedicatedHostsOperations -from ._operations import SshPublicKeysOperations -from ._operations import ImagesOperations -from ._operations import RestorePointCollectionsOperations -from ._operations import RestorePointsOperations -from ._operations import CapacityReservationGroupsOperations -from ._operations import CapacityReservationsOperations -from ._operations import LogAnalyticsOperations -from ._operations import VirtualMachineRunCommandsOperations -from ._operations import VirtualMachineScaleSetVMRunCommandsOperations +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 UsageOperations # type: ignore +from ._operations import VirtualMachineSizesOperations # type: ignore +from ._operations import VirtualMachineScaleSetsOperations # type: ignore +from ._operations import VirtualMachineScaleSetExtensionsOperations # type: ignore +from ._operations import VirtualMachineScaleSetRollingUpgradesOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMExtensionsOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMsOperations # type: ignore +from ._operations import VirtualMachineExtensionsOperations # type: ignore +from ._operations import VirtualMachinesOperations # type: ignore +from ._operations import VirtualMachineImagesOperations # type: ignore +from ._operations import VirtualMachineImagesEdgeZoneOperations # type: ignore +from ._operations import VirtualMachineExtensionImagesOperations # type: ignore +from ._operations import AvailabilitySetsOperations # type: ignore +from ._operations import ProximityPlacementGroupsOperations # type: ignore +from ._operations import DedicatedHostGroupsOperations # type: ignore +from ._operations import DedicatedHostsOperations # type: ignore +from ._operations import SshPublicKeysOperations # type: ignore +from ._operations import ImagesOperations # type: ignore +from ._operations import RestorePointCollectionsOperations # type: ignore +from ._operations import RestorePointsOperations # type: ignore +from ._operations import CapacityReservationGroupsOperations # type: ignore +from ._operations import CapacityReservationsOperations # type: ignore +from ._operations import LogAnalyticsOperations # type: ignore +from ._operations import VirtualMachineRunCommandsOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMRunCommandsOperations # 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__ = [ @@ -65,5 +71,5 @@ "VirtualMachineRunCommandsOperations", "VirtualMachineScaleSetVMRunCommandsOperations", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_01/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_01/operations/_operations.py index de24b0fc55f5d..36c7ca84254a1 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_01/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_01/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. @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Iterable, Iterator, List, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Iterable, Iterator, List, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -36,7 +36,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, HttpResponse], T, Dict[str, Any]], Any]] @@ -6051,7 +6051,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.ComputeOperationValue"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.ComputeOperationListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6148,7 +6148,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.Usage"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.ListUsagesResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6247,7 +6247,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.VirtualMachine api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6348,7 +6348,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> Iterable["_models.Vi api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6416,7 +6416,7 @@ def _create_or_update_initial( parameters: Union[_models.VirtualMachineScaleSet, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6608,7 +6608,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineScaleSetUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6797,7 +6797,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, *, force_deletion: Optional[bool] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6926,7 +6926,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_07_01.models.VirtualMachineScaleSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6978,7 +6978,7 @@ def _deallocate_initial( hibernate: Optional[bool] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7193,7 +7193,7 @@ def _delete_instances_initial( force_deletion: Optional[bool] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7401,7 +7401,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2023_07_01.models.VirtualMachineScaleSetInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7461,7 +7461,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Vir api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7540,7 +7540,7 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.VirtualMachineScaleSet"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.VirtualMachineScaleSetListWithLinkResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7623,7 +7623,7 @@ def list_skus( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.VirtualMachineScaleSetListSkusResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7707,7 +7707,7 @@ def get_os_upgrade_history( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.VirtualMachineScaleSetListOSUpgradeHistory] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7778,7 +7778,7 @@ def _power_off_initial( skip_shutdown: bool = False, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7991,7 +7991,7 @@ def _restart_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8180,7 +8180,7 @@ def _start_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8363,7 +8363,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _reapply_initial(self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8476,7 +8476,7 @@ def _redeploy_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8668,7 +8668,7 @@ def _perform_maintenance_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8866,7 +8866,7 @@ def _update_instances_initial( vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9052,7 +9052,7 @@ def _reimage_initial( vm_scale_set_reimage_input: Optional[Union[_models.VirtualMachineScaleSetReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9245,7 +9245,7 @@ def _reimage_all_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9461,7 +9461,7 @@ def force_recovery_service_fabric_platform_update_domain_walk( # pylint: disabl :rtype: ~azure.mgmt.compute.v2023_07_01.models.RecoveryWalkResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9507,7 +9507,7 @@ def force_recovery_service_fabric_platform_update_domain_walk( # pylint: disabl return deserialized # type: ignore @overload - def convert_to_single_placement_group( # pylint: disable=inconsistent-return-statements + def convert_to_single_placement_group( self, resource_group_name: str, vm_scale_set_name: str, @@ -9535,7 +9535,7 @@ def convert_to_single_placement_group( # pylint: disable=inconsistent-return-st """ @overload - def convert_to_single_placement_group( # pylint: disable=inconsistent-return-statements + def convert_to_single_placement_group( self, resource_group_name: str, vm_scale_set_name: str, @@ -9585,7 +9585,7 @@ def convert_to_single_placement_group( # pylint: disable=inconsistent-return-st :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9642,7 +9642,7 @@ def _set_orchestration_service_state_initial( parameters: Union[_models.OrchestrationServiceStateInput, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9850,7 +9850,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtension, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10061,7 +10061,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtensionUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10268,7 +10268,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, vmss_extension_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10398,7 +10398,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_07_01.models.VirtualMachineScaleSetExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10464,7 +10464,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.VirtualMachineScaleSetExtensionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10548,7 +10548,7 @@ def __init__(self, *args, **kwargs): self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") def _cancel_initial(self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10650,7 +10650,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_os_upgrade_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10756,7 +10756,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_extension_upgrade_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10873,7 +10873,7 @@ def get_latest( :rtype: ~azure.mgmt.compute.v2023_07_01.models.RollingUpgradeStatusInfo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10945,7 +10945,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetVMExtension, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11165,7 +11165,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetVMExtensionUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11380,7 +11380,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, vm_extension_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11516,7 +11516,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_07_01.models.VirtualMachineScaleSetVMExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11585,7 +11585,7 @@ def list( :rtype: ~azure.mgmt.compute.v2023_07_01.models.VirtualMachineScaleSetVMExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11662,7 +11662,7 @@ def _reimage_initial( ] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11861,7 +11861,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _reimage_all_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11970,7 +11970,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _deallocate_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12085,7 +12085,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineScaleSetVM, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12295,7 +12295,7 @@ def _delete_initial( force_deletion: Optional[bool] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12437,7 +12437,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_07_01.models.VirtualMachineScaleSetVM :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12497,7 +12497,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2023_07_01.models.VirtualMachineScaleSetVMInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12579,7 +12579,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.VirtualMachineScaleSetVMListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12653,7 +12653,7 @@ def _power_off_initial( skip_shutdown: bool = False, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12775,7 +12775,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _restart_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12883,7 +12883,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12991,7 +12991,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _redeploy_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13124,7 +13124,7 @@ def retrieve_boot_diagnostics_data( :rtype: ~azure.mgmt.compute.v2023_07_01.models.RetrieveBootDiagnosticsDataResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13171,7 +13171,7 @@ def retrieve_boot_diagnostics_data( def _perform_maintenance_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13292,7 +13292,7 @@ def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13339,7 +13339,7 @@ def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13563,7 +13563,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineExtension, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13773,7 +13773,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineExtensionUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13979,7 +13979,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_name: str, vm_extension_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14109,7 +14109,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_07_01.models.VirtualMachineExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14169,7 +14169,7 @@ def list( :rtype: ~azure.mgmt.compute.v2023_07_01.models.VirtualMachineExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14250,7 +14250,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> Iterable["_models.Vi api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14318,7 +14318,7 @@ def _capture_initial( parameters: Union[_models.VirtualMachineCaptureParameters, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14516,7 +14516,7 @@ def _create_or_update_initial( parameters: Union[_models.VirtualMachine, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14708,7 +14708,7 @@ def _update_initial( parameters: Union[_models.VirtualMachineUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14893,7 +14893,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_name: str, *, force_deletion: Optional[bool] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15024,7 +15024,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_07_01.models.VirtualMachine :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15081,7 +15081,7 @@ def instance_view( :rtype: ~azure.mgmt.compute.v2023_07_01.models.VirtualMachineInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15126,7 +15126,7 @@ def instance_view( def _convert_to_managed_disks_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15229,7 +15229,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _deallocate_initial( self, resource_group_name: str, vm_name: str, *, hibernate: Optional[bool] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15355,7 +15355,7 @@ def generalize( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15402,6 +15402,7 @@ def list( expand: Optional[Union[str, _models.ExpandTypeForListVMs]] = None, **kwargs: Any ) -> Iterable["_models.VirtualMachine"]: + # pylint: disable=line-too-long """Lists all of the virtual machines in the specified resource group. Use the nextLink property in the response to get the next page of virtual machines. @@ -15426,7 +15427,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15498,6 +15499,7 @@ def list_all( expand: Optional[Union[str, _models.ExpandTypesForListVMs]] = None, **kwargs: Any ) -> Iterable["_models.VirtualMachine"]: + # pylint: disable=line-too-long """Lists all of the virtual machines in the specified subscription. Use the nextLink property in the response to get the next page of virtual machines. @@ -15523,7 +15525,7 @@ def list_all( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15607,7 +15609,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15672,7 +15674,7 @@ def get_next(next_link=None): def _power_off_initial( self, resource_group_name: str, vm_name: str, *, skip_shutdown: bool = False, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15781,7 +15783,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _reapply_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15881,7 +15883,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _restart_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15981,7 +15983,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _start_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16081,7 +16083,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _redeploy_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16187,7 +16189,7 @@ def _reimage_initial( parameters: Optional[Union[_models.VirtualMachineReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16406,7 +16408,7 @@ def retrieve_boot_diagnostics_data( :rtype: ~azure.mgmt.compute.v2023_07_01.models.RetrieveBootDiagnosticsDataResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16450,7 +16452,7 @@ def retrieve_boot_diagnostics_data( return deserialized # type: ignore def _perform_maintenance_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16563,7 +16565,7 @@ def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16602,7 +16604,7 @@ def simulate_eviction( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore def _assess_patches_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16718,7 +16720,7 @@ def _install_patches_initial( install_patches_input: Union[_models.VirtualMachineInstallPatchesParameters, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16916,7 +16918,7 @@ def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17141,7 +17143,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_07_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17220,7 +17222,7 @@ def list( :rtype: list[~azure.mgmt.compute.v2023_07_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17281,7 +17283,7 @@ def list_offers( :rtype: list[~azure.mgmt.compute.v2023_07_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17333,7 +17335,7 @@ def list_publishers(self, location: str, **kwargs: Any) -> List[_models.VirtualM :rtype: list[~azure.mgmt.compute.v2023_07_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17390,7 +17392,7 @@ def list_skus( :rtype: list[~azure.mgmt.compute.v2023_07_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17445,7 +17447,7 @@ def list_by_edge_zone(self, location: str, edge_zone: str, **kwargs: Any) -> _mo :rtype: ~azure.mgmt.compute.v2023_07_01.models.VmImagesInEdgeZoneListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17530,7 +17532,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_07_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17615,7 +17617,7 @@ def list( :rtype: list[~azure.mgmt.compute.v2023_07_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17680,7 +17682,7 @@ def list_offers( :rtype: list[~azure.mgmt.compute.v2023_07_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17737,7 +17739,7 @@ def list_publishers( :rtype: list[~azure.mgmt.compute.v2023_07_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17798,7 +17800,7 @@ def list_skus( :rtype: list[~azure.mgmt.compute.v2023_07_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17881,7 +17883,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_07_01.models.VirtualMachineExtensionImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17939,7 +17941,7 @@ def list_types( :rtype: list[~azure.mgmt.compute.v2023_07_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18011,7 +18013,7 @@ def list_versions( :rtype: list[~azure.mgmt.compute.v2023_07_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18151,7 +18153,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2023_07_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18278,7 +18280,7 @@ def update( :rtype: ~azure.mgmt.compute.v2023_07_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18346,7 +18348,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18396,7 +18398,7 @@ def get(self, resource_group_name: str, availability_set_name: str, **kwargs: An :rtype: ~azure.mgmt.compute.v2023_07_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18457,7 +18459,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18534,7 +18536,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Ava api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18616,7 +18618,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18774,7 +18776,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2023_07_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18904,7 +18906,7 @@ def update( :rtype: ~azure.mgmt.compute.v2023_07_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18972,7 +18974,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19032,7 +19034,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_07_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19091,7 +19093,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.ProximityPlac api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19171,7 +19173,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19332,7 +19334,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2023_07_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19459,7 +19461,7 @@ def update( :rtype: ~azure.mgmt.compute.v2023_07_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19527,7 +19529,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19589,7 +19591,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_07_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19649,7 +19651,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19725,7 +19727,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.DedicatedHost api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19814,7 +19816,7 @@ def _create_or_update_initial( parameters: Union[_models.DedicatedHost, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20015,7 +20017,7 @@ def _update_initial( parameters: Union[_models.DedicatedHostUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20211,7 +20213,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20342,7 +20344,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_07_01.models.DedicatedHost :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20407,7 +20409,7 @@ def list_by_host_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.DedicatedHostListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20472,7 +20474,7 @@ def get_next(next_link=None): def _restart_initial( self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20604,7 +20606,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.DedicatedHostSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20705,7 +20707,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.SshPublicKeyR api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20786,7 +20788,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20920,7 +20922,7 @@ def create( :rtype: ~azure.mgmt.compute.v2023_07_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21048,7 +21050,7 @@ def update( :rtype: ~azure.mgmt.compute.v2023_07_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21116,7 +21118,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21166,7 +21168,7 @@ def get(self, resource_group_name: str, ssh_public_key_name: str, **kwargs: Any) :rtype: ~azure.mgmt.compute.v2023_07_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21224,7 +21226,7 @@ def generate_key_pair( :rtype: ~azure.mgmt.compute.v2023_07_01.models.SshPublicKeyGenerateKeyPairResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21290,7 +21292,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, image_name: str, parameters: Union[_models.Image, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21472,7 +21474,7 @@ def _update_initial( parameters: Union[_models.ImageUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21652,7 +21654,7 @@ def get_long_running_output(pipeline_response): ) def _delete_initial(self, resource_group_name: str, image_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21767,7 +21769,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_07_01.models.Image :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21827,7 +21829,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21903,7 +21905,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Image"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22065,7 +22067,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2023_07_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22195,7 +22197,7 @@ def update( :rtype: ~azure.mgmt.compute.v2023_07_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22252,7 +22254,7 @@ def update( def _delete_initial( self, resource_group_name: str, restore_point_collection_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22378,7 +22380,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_07_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22439,7 +22441,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Res api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.RestorePointCollectionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22518,7 +22520,7 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.RestorePointCollection"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.RestorePointCollectionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22607,7 +22609,7 @@ def _create_initial( parameters: Union[_models.RestorePoint, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22806,7 +22808,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, restore_point_collection_name: str, restore_point_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22936,7 +22938,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_07_01.models.RestorePoint :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23080,7 +23082,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2023_07_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23213,7 +23215,7 @@ def update( :rtype: ~azure.mgmt.compute.v2023_07_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23284,7 +23286,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23348,7 +23350,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_07_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23422,7 +23424,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.CapacityReservationGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23509,7 +23511,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.CapacityReservationGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23599,7 +23601,7 @@ def _create_or_update_initial( parameters: Union[_models.CapacityReservation, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23809,7 +23811,7 @@ def _update_initial( parameters: Union[_models.CapacityReservationUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24012,7 +24014,7 @@ def _delete_initial( capacity_reservation_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24150,7 +24152,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_07_01.models.CapacityReservation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24216,7 +24218,7 @@ def list_by_capacity_reservation_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.CapacityReservationListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24302,7 +24304,7 @@ def __init__(self, *args, **kwargs): def _export_request_rate_by_interval_initial( self, location: str, parameters: Union[_models.RequestRateByIntervalInput, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24479,7 +24481,7 @@ def get_long_running_output(pipeline_response): def _export_throttled_requests_initial( self, location: str, parameters: Union[_models.ThrottledRequestsInput, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24689,7 +24691,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.RunCommandDocu api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.RunCommandListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24762,7 +24764,7 @@ def get(self, location: str, command_id: str, **kwargs: Any) -> _models.RunComma :rtype: ~azure.mgmt.compute.v2023_07_01.models.RunCommandDocument :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24812,7 +24814,7 @@ def _create_or_update_initial( run_command: Union[_models.VirtualMachineRunCommand, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25021,7 +25023,7 @@ def _update_initial( run_command: Union[_models.VirtualMachineRunCommandUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25226,7 +25228,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_name: str, run_command_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25356,7 +25358,7 @@ def get_by_virtual_machine( :rtype: ~azure.mgmt.compute.v2023_07_01.models.VirtualMachineRunCommand :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25424,7 +25426,7 @@ def list_by_virtual_machine( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.VirtualMachineRunCommandsListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25517,7 +25519,7 @@ def _create_or_update_initial( run_command: Union[_models.VirtualMachineRunCommand, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25735,7 +25737,7 @@ def _update_initial( run_command: Union[_models.VirtualMachineRunCommandUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25948,7 +25950,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, run_command_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26084,7 +26086,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_07_01.models.VirtualMachineRunCommand :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26161,7 +26163,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-01")) cls: ClsType[_models.VirtualMachineRunCommandsListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_03/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_03/__init__.py index 3b1b6244b2375..ab7c46e8991db 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_03/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_03/__init__.py @@ -5,15 +5,21 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._compute_management_client import ComputeManagementClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._compute_management_client import ComputeManagementClient # 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__ = [ "ComputeManagementClient", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_03/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_03/_compute_management_client.py index 1d50c54e32235..719ce120eb3f4 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_03/_compute_management_client.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_03/_compute_management_client.py @@ -34,11 +34,10 @@ ) if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class ComputeManagementClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes +class ComputeManagementClient: # pylint: disable=too-many-instance-attributes """Compute Client. :ivar galleries: GalleriesOperations operations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_03/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_03/_configuration.py index b7651da109e15..943bc0daf2a2f 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_03/_configuration.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_03/_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 ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ComputeManagementClient. Note that all parameters used to create this instance are saved as instance diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_03/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_03/_version.py index d79b2760319c5..e5754a47ce68f 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_03/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_03/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "33.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_03/aio/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_03/aio/__init__.py index 0715f50185586..d3fd1ba93379a 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_03/aio/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_03/aio/__init__.py @@ -5,12 +5,18 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._compute_management_client import ComputeManagementClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._compute_management_client import ComputeManagementClient # 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__ = [ "ComputeManagementClient", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_03/aio/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_03/aio/_compute_management_client.py index da8887c1193db..4e35f9b730584 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_03/aio/_compute_management_client.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_03/aio/_compute_management_client.py @@ -34,11 +34,10 @@ ) if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class ComputeManagementClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes +class ComputeManagementClient: # pylint: disable=too-many-instance-attributes """Compute Client. :ivar galleries: GalleriesOperations operations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_03/aio/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_03/aio/_configuration.py index 51366c97105b8..1a32627175450 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_03/aio/_configuration.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_03/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 ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ComputeManagementClient. Note that all parameters used to create this instance are saved as instance diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_03/aio/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_03/aio/operations/__init__.py index 322500f753256..139d983a58402 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_03/aio/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_03/aio/operations/__init__.py @@ -5,22 +5,28 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._operations import GalleriesOperations -from ._operations import GalleryImagesOperations -from ._operations import GalleryImageVersionsOperations -from ._operations import GalleryApplicationsOperations -from ._operations import GalleryApplicationVersionsOperations -from ._operations import GallerySharingProfileOperations -from ._operations import SharedGalleriesOperations -from ._operations import SharedGalleryImagesOperations -from ._operations import SharedGalleryImageVersionsOperations -from ._operations import CommunityGalleriesOperations -from ._operations import CommunityGalleryImagesOperations -from ._operations import CommunityGalleryImageVersionsOperations +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._operations import GalleriesOperations # type: ignore +from ._operations import GalleryImagesOperations # type: ignore +from ._operations import GalleryImageVersionsOperations # type: ignore +from ._operations import GalleryApplicationsOperations # type: ignore +from ._operations import GalleryApplicationVersionsOperations # type: ignore +from ._operations import GallerySharingProfileOperations # type: ignore +from ._operations import SharedGalleriesOperations # type: ignore +from ._operations import SharedGalleryImagesOperations # type: ignore +from ._operations import SharedGalleryImageVersionsOperations # type: ignore +from ._operations import CommunityGalleriesOperations # type: ignore +from ._operations import CommunityGalleryImagesOperations # type: ignore +from ._operations import CommunityGalleryImageVersionsOperations # 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__ = [ @@ -37,5 +43,5 @@ "CommunityGalleryImagesOperations", "CommunityGalleryImageVersionsOperations", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_03/aio/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_03/aio/operations/_operations.py index 61cda5a23e8ec..9b1a3315b97be 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_03/aio/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_03/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. @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -76,7 +76,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]] @@ -104,7 +104,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, gallery_name: str, gallery: Union[_models.Gallery, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -297,7 +297,7 @@ async def _update_initial( gallery: Union[_models.GalleryUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -511,7 +511,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_07_03.models.Gallery :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -556,7 +556,7 @@ async def get( return deserialized # type: ignore async def _delete_initial(self, resource_group_name: str, gallery_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -671,7 +671,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-03")) cls: ClsType[_models.GalleryList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -746,7 +746,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Gallery"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-03")) cls: ClsType[_models.GalleryList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -835,7 +835,7 @@ async def _create_or_update_initial( gallery_image: Union[_models.GalleryImage, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1047,7 +1047,7 @@ async def _update_initial( gallery_image: Union[_models.GalleryImageUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1266,7 +1266,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_07_03.models.GalleryImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1312,7 +1312,7 @@ async def get( async def _delete_initial( self, resource_group_name: str, gallery_name: str, gallery_image_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1440,7 +1440,7 @@ def list_by_gallery( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-03")) cls: ClsType[_models.GalleryImageList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1532,7 +1532,7 @@ async def _create_or_update_initial( gallery_image_version: Union[_models.GalleryImageVersion, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1766,7 +1766,7 @@ async def _update_initial( gallery_image_version: Union[_models.GalleryImageVersionUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2022,7 +2022,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_07_03.models.GalleryImageVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2075,7 +2075,7 @@ async def _delete_initial( gallery_image_version_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2217,7 +2217,7 @@ def list_by_gallery_image( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-03")) cls: ClsType[_models.GalleryImageVersionList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2309,7 +2309,7 @@ async def _create_or_update_initial( gallery_application: Union[_models.GalleryApplication, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2525,7 +2525,7 @@ async def _update_initial( gallery_application: Union[_models.GalleryApplicationUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2751,7 +2751,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_07_03.models.GalleryApplication :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2797,7 +2797,7 @@ async def get( async def _delete_initial( self, resource_group_name: str, gallery_name: str, gallery_application_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2926,7 +2926,7 @@ def list_by_gallery( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-03")) cls: ClsType[_models.GalleryApplicationList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3018,7 +3018,7 @@ async def _create_or_update_initial( gallery_application_version: Union[_models.GalleryApplicationVersion, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3254,7 +3254,7 @@ async def _update_initial( gallery_application_version: Union[_models.GalleryApplicationVersionUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3512,7 +3512,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_07_03.models.GalleryApplicationVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3565,7 +3565,7 @@ async def _delete_initial( gallery_application_version_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3708,7 +3708,7 @@ def list_by_gallery_application( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-03")) cls: ClsType[_models.GalleryApplicationVersionList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3799,7 +3799,7 @@ async def _update_initial( sharing_update: Union[_models.SharingUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4027,7 +4027,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-03")) cls: ClsType[_models.SharedGalleryList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4101,7 +4101,7 @@ async def get(self, location: str, gallery_unique_name: str, **kwargs: Any) -> _ :rtype: ~azure.mgmt.compute.v2023_07_03.models.SharedGallery :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4193,7 +4193,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-03")) cls: ClsType[_models.SharedGalleryImageList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4273,7 +4273,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_07_03.models.SharedGalleryImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4371,7 +4371,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-03")) cls: ClsType[_models.SharedGalleryImageVersionList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4462,7 +4462,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_07_03.models.SharedGalleryImageVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4539,7 +4539,7 @@ async def get(self, location: str, public_gallery_name: str, **kwargs: Any) -> _ :rtype: ~azure.mgmt.compute.v2023_07_03.models.CommunityGallery :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4618,7 +4618,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_07_03.models.CommunityGalleryImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4683,7 +4683,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-03")) cls: ClsType[_models.CommunityGalleryImageList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4792,7 +4792,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_07_03.models.CommunityGalleryImageVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4860,7 +4860,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-03")) cls: ClsType[_models.CommunityGalleryImageVersionList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_03/models/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_03/models/__init__.py index 515d7cc6390ff..e97c8bf11e641 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_03/models/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_03/models/__init__.py @@ -5,133 +5,144 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._models_py3 import ApiError -from ._models_py3 import ApiErrorBase -from ._models_py3 import CommunityGallery -from ._models_py3 import CommunityGalleryImage -from ._models_py3 import CommunityGalleryImageIdentifier -from ._models_py3 import CommunityGalleryImageList -from ._models_py3 import CommunityGalleryImageVersion -from ._models_py3 import CommunityGalleryImageVersionList -from ._models_py3 import CommunityGalleryInfo -from ._models_py3 import CommunityGalleryMetadata -from ._models_py3 import DataDiskImageEncryption -from ._models_py3 import Disallowed -from ._models_py3 import DiskImageEncryption -from ._models_py3 import EncryptionImages -from ._models_py3 import ExtendedLocation -from ._models_py3 import Gallery -from ._models_py3 import GalleryApplication -from ._models_py3 import GalleryApplicationCustomAction -from ._models_py3 import GalleryApplicationCustomActionParameter -from ._models_py3 import GalleryApplicationList -from ._models_py3 import GalleryApplicationUpdate -from ._models_py3 import GalleryApplicationVersion -from ._models_py3 import GalleryApplicationVersionList -from ._models_py3 import GalleryApplicationVersionPublishingProfile -from ._models_py3 import GalleryApplicationVersionSafetyProfile -from ._models_py3 import GalleryApplicationVersionUpdate -from ._models_py3 import GalleryArtifactPublishingProfileBase -from ._models_py3 import GalleryArtifactSafetyProfileBase -from ._models_py3 import GalleryArtifactSource -from ._models_py3 import GalleryArtifactVersionFullSource -from ._models_py3 import GalleryArtifactVersionSource -from ._models_py3 import GalleryDataDiskImage -from ._models_py3 import GalleryDiskImage -from ._models_py3 import GalleryDiskImageSource -from ._models_py3 import GalleryExtendedLocation -from ._models_py3 import GalleryIdentifier -from ._models_py3 import GalleryImage -from ._models_py3 import GalleryImageFeature -from ._models_py3 import GalleryImageIdentifier -from ._models_py3 import GalleryImageList -from ._models_py3 import GalleryImageUpdate -from ._models_py3 import GalleryImageVersion -from ._models_py3 import GalleryImageVersionList -from ._models_py3 import GalleryImageVersionPublishingProfile -from ._models_py3 import GalleryImageVersionSafetyProfile -from ._models_py3 import GalleryImageVersionStorageProfile -from ._models_py3 import GalleryImageVersionUefiSettings -from ._models_py3 import GalleryImageVersionUpdate -from ._models_py3 import GalleryList -from ._models_py3 import GalleryOSDiskImage -from ._models_py3 import GalleryTargetExtendedLocation -from ._models_py3 import GalleryUpdate -from ._models_py3 import ImagePurchasePlan -from ._models_py3 import ImageVersionSecurityProfile -from ._models_py3 import InnerError -from ._models_py3 import LatestGalleryImageVersion -from ._models_py3 import ManagedArtifact -from ._models_py3 import OSDiskImageEncryption -from ._models_py3 import OSDiskImageSecurityProfile -from ._models_py3 import PirCommunityGalleryResource -from ._models_py3 import PirResource -from ._models_py3 import PirSharedGalleryResource -from ._models_py3 import PolicyViolation -from ._models_py3 import RecommendedMachineConfiguration -from ._models_py3 import RegionalReplicationStatus -from ._models_py3 import RegionalSharingStatus -from ._models_py3 import ReplicationStatus -from ._models_py3 import Resource -from ._models_py3 import ResourceRange -from ._models_py3 import ResourceWithOptionalLocation -from ._models_py3 import SharedGallery -from ._models_py3 import SharedGalleryDataDiskImage -from ._models_py3 import SharedGalleryDiskImage -from ._models_py3 import SharedGalleryImage -from ._models_py3 import SharedGalleryImageList -from ._models_py3 import SharedGalleryImageVersion -from ._models_py3 import SharedGalleryImageVersionList -from ._models_py3 import SharedGalleryImageVersionStorageProfile -from ._models_py3 import SharedGalleryList -from ._models_py3 import SharedGalleryOSDiskImage -from ._models_py3 import SharingProfile -from ._models_py3 import SharingProfileGroup -from ._models_py3 import SharingStatus -from ._models_py3 import SharingUpdate -from ._models_py3 import SoftDeletePolicy -from ._models_py3 import SubResource -from ._models_py3 import SubResourceReadOnly -from ._models_py3 import SystemData -from ._models_py3 import TargetRegion -from ._models_py3 import UefiKey -from ._models_py3 import UefiKeySignatures -from ._models_py3 import UpdateResourceDefinition -from ._models_py3 import UserArtifactManage -from ._models_py3 import UserArtifactSettings -from ._models_py3 import UserArtifactSource -from ._models_py3 import UserAssignedIdentitiesValue +from typing import TYPE_CHECKING -from ._compute_management_client_enums import AggregatedReplicationState -from ._compute_management_client_enums import Architecture -from ._compute_management_client_enums import ConfidentialVMEncryptionType -from ._compute_management_client_enums import EdgeZoneStorageAccountType -from ._compute_management_client_enums import ExtendedLocationTypes -from ._compute_management_client_enums import GalleryApplicationCustomActionParameterType -from ._compute_management_client_enums import GalleryExpandParams -from ._compute_management_client_enums import GalleryExtendedLocationType -from ._compute_management_client_enums import GalleryProvisioningState -from ._compute_management_client_enums import GallerySharingPermissionTypes -from ._compute_management_client_enums import HostCaching -from ._compute_management_client_enums import HyperVGeneration -from ._compute_management_client_enums import OperatingSystemStateTypes -from ._compute_management_client_enums import OperatingSystemTypes -from ._compute_management_client_enums import PolicyViolationCategory -from ._compute_management_client_enums import ReplicationMode -from ._compute_management_client_enums import ReplicationState -from ._compute_management_client_enums import ReplicationStatusTypes -from ._compute_management_client_enums import SelectPermissions -from ._compute_management_client_enums import SharedGalleryHostCaching -from ._compute_management_client_enums import SharedToValues -from ._compute_management_client_enums import SharingProfileGroupTypes -from ._compute_management_client_enums import SharingState -from ._compute_management_client_enums import SharingUpdateOperationTypes -from ._compute_management_client_enums import StorageAccountType -from ._compute_management_client_enums import UefiKeyType -from ._compute_management_client_enums import UefiSignatureTemplateName +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + + +from ._models_py3 import ( # type: ignore + ApiError, + ApiErrorBase, + CommunityGallery, + CommunityGalleryImage, + CommunityGalleryImageIdentifier, + CommunityGalleryImageList, + CommunityGalleryImageVersion, + CommunityGalleryImageVersionList, + CommunityGalleryInfo, + CommunityGalleryMetadata, + DataDiskImageEncryption, + Disallowed, + DiskImageEncryption, + EncryptionImages, + ExtendedLocation, + Gallery, + GalleryApplication, + GalleryApplicationCustomAction, + GalleryApplicationCustomActionParameter, + GalleryApplicationList, + GalleryApplicationUpdate, + GalleryApplicationVersion, + GalleryApplicationVersionList, + GalleryApplicationVersionPublishingProfile, + GalleryApplicationVersionSafetyProfile, + GalleryApplicationVersionUpdate, + GalleryArtifactPublishingProfileBase, + GalleryArtifactSafetyProfileBase, + GalleryArtifactSource, + GalleryArtifactVersionFullSource, + GalleryArtifactVersionSource, + GalleryDataDiskImage, + GalleryDiskImage, + GalleryDiskImageSource, + GalleryExtendedLocation, + GalleryIdentifier, + GalleryImage, + GalleryImageFeature, + GalleryImageIdentifier, + GalleryImageList, + GalleryImageUpdate, + GalleryImageVersion, + GalleryImageVersionList, + GalleryImageVersionPublishingProfile, + GalleryImageVersionSafetyProfile, + GalleryImageVersionStorageProfile, + GalleryImageVersionUefiSettings, + GalleryImageVersionUpdate, + GalleryList, + GalleryOSDiskImage, + GalleryTargetExtendedLocation, + GalleryUpdate, + ImagePurchasePlan, + ImageVersionSecurityProfile, + InnerError, + LatestGalleryImageVersion, + ManagedArtifact, + OSDiskImageEncryption, + OSDiskImageSecurityProfile, + PirCommunityGalleryResource, + PirResource, + PirSharedGalleryResource, + PolicyViolation, + RecommendedMachineConfiguration, + RegionalReplicationStatus, + RegionalSharingStatus, + ReplicationStatus, + Resource, + ResourceRange, + ResourceWithOptionalLocation, + SharedGallery, + SharedGalleryDataDiskImage, + SharedGalleryDiskImage, + SharedGalleryImage, + SharedGalleryImageList, + SharedGalleryImageVersion, + SharedGalleryImageVersionList, + SharedGalleryImageVersionStorageProfile, + SharedGalleryList, + SharedGalleryOSDiskImage, + SharingProfile, + SharingProfileGroup, + SharingStatus, + SharingUpdate, + SoftDeletePolicy, + SubResource, + SubResourceReadOnly, + SystemData, + TargetRegion, + UefiKey, + UefiKeySignatures, + UpdateResourceDefinition, + UserArtifactManage, + UserArtifactSettings, + UserArtifactSource, + UserAssignedIdentitiesValue, +) + +from ._compute_management_client_enums import ( # type: ignore + AggregatedReplicationState, + Architecture, + ConfidentialVMEncryptionType, + EdgeZoneStorageAccountType, + ExtendedLocationTypes, + GalleryApplicationCustomActionParameterType, + GalleryExpandParams, + GalleryExtendedLocationType, + GalleryProvisioningState, + GallerySharingPermissionTypes, + HostCaching, + HyperVGeneration, + OperatingSystemStateTypes, + OperatingSystemTypes, + PolicyViolationCategory, + ReplicationMode, + ReplicationState, + ReplicationStatusTypes, + SelectPermissions, + SharedGalleryHostCaching, + SharedToValues, + SharingProfileGroupTypes, + SharingState, + SharingUpdateOperationTypes, + StorageAccountType, + UefiKeyType, + UefiSignatureTemplateName, +) 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__ = [ @@ -259,5 +270,5 @@ "UefiKeyType", "UefiSignatureTemplateName", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_03/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_03/models/_models_py3.py index aac7e05b77c38..aea884089634f 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_03/models/_models_py3.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_03/models/_models_py3.py @@ -1,5 +1,5 @@ -# 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. @@ -13,7 +13,6 @@ from ... import _serialization if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models @@ -206,7 +205,7 @@ def __init__( self.community_metadata = community_metadata -class CommunityGalleryImage(PirCommunityGalleryResource): # pylint: disable=too-many-instance-attributes +class CommunityGalleryImage(PirCommunityGalleryResource): """Specifies information about the gallery image definition that you want to create or update. Variables are only populated by the server, and will be ignored when sending a request. @@ -882,7 +881,7 @@ def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kw self.tags = tags -class Gallery(Resource): # pylint: disable=too-many-instance-attributes +class Gallery(Resource): """Specifies information about the Shared Image Gallery that you want to create or update. Variables are only populated by the server, and will be ignored when sending a request. @@ -975,7 +974,7 @@ def __init__( self.sharing_status = None -class GalleryApplication(Resource): # pylint: disable=too-many-instance-attributes +class GalleryApplication(Resource): """Specifies information about the gallery Application Definition that you want to create or update. @@ -1291,7 +1290,7 @@ def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> N self.tags = tags -class GalleryApplicationUpdate(UpdateResourceDefinition): # pylint: disable=too-many-instance-attributes +class GalleryApplicationUpdate(UpdateResourceDefinition): """Specifies information about the gallery Application Definition that you want to update. Variables are only populated by the server, and will be ignored when sending a request. @@ -1611,9 +1610,7 @@ def __init__( self.target_extended_locations = target_extended_locations -class GalleryApplicationVersionPublishingProfile( - GalleryArtifactPublishingProfileBase -): # pylint: disable=too-many-instance-attributes,name-too-long +class GalleryApplicationVersionPublishingProfile(GalleryArtifactPublishingProfileBase): # pylint: disable=name-too-long """The publishing profile of a gallery image version. Variables are only populated by the server, and will be ignored when sending a request. @@ -2156,7 +2153,7 @@ def __init__(self, **kwargs: Any) -> None: self.unique_name = None -class GalleryImage(Resource): # pylint: disable=too-many-instance-attributes +class GalleryImage(Resource): """Specifies information about the gallery image definition that you want to create or update. Variables are only populated by the server, and will be ignored when sending a request. @@ -2431,7 +2428,7 @@ def __init__(self, *, value: List["_models.GalleryImage"], next_link: Optional[s self.next_link = next_link -class GalleryImageUpdate(UpdateResourceDefinition): # pylint: disable=too-many-instance-attributes +class GalleryImageUpdate(UpdateResourceDefinition): """Specifies information about the gallery image definition that you want to update. Variables are only populated by the server, and will be ignored when sending a request. @@ -2597,7 +2594,7 @@ def __init__( self.architecture = architecture -class GalleryImageVersion(Resource): # pylint: disable=too-many-instance-attributes +class GalleryImageVersion(Resource): """Specifies information about the gallery image version that you want to create or update. Variables are only populated by the server, and will be ignored when sending a request. @@ -3804,7 +3801,7 @@ def __init__( self.lun = lun -class SharedGalleryImage(PirSharedGalleryResource): # pylint: disable=too-many-instance-attributes +class SharedGalleryImage(PirSharedGalleryResource): """Specifies information about the gallery image definition that you want to create or update. Variables are only populated by the server, and will be ignored when sending a request. diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_03/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_03/operations/__init__.py index 322500f753256..139d983a58402 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_03/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_03/operations/__init__.py @@ -5,22 +5,28 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._operations import GalleriesOperations -from ._operations import GalleryImagesOperations -from ._operations import GalleryImageVersionsOperations -from ._operations import GalleryApplicationsOperations -from ._operations import GalleryApplicationVersionsOperations -from ._operations import GallerySharingProfileOperations -from ._operations import SharedGalleriesOperations -from ._operations import SharedGalleryImagesOperations -from ._operations import SharedGalleryImageVersionsOperations -from ._operations import CommunityGalleriesOperations -from ._operations import CommunityGalleryImagesOperations -from ._operations import CommunityGalleryImageVersionsOperations +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._operations import GalleriesOperations # type: ignore +from ._operations import GalleryImagesOperations # type: ignore +from ._operations import GalleryImageVersionsOperations # type: ignore +from ._operations import GalleryApplicationsOperations # type: ignore +from ._operations import GalleryApplicationVersionsOperations # type: ignore +from ._operations import GallerySharingProfileOperations # type: ignore +from ._operations import SharedGalleriesOperations # type: ignore +from ._operations import SharedGalleryImagesOperations # type: ignore +from ._operations import SharedGalleryImageVersionsOperations # type: ignore +from ._operations import CommunityGalleriesOperations # type: ignore +from ._operations import CommunityGalleryImagesOperations # type: ignore +from ._operations import CommunityGalleryImageVersionsOperations # 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__ = [ @@ -37,5 +43,5 @@ "CommunityGalleryImagesOperations", "CommunityGalleryImageVersionsOperations", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_03/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_03/operations/_operations.py index da71f8c87c708..fced276a85dd5 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_03/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_07_03/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. @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -36,7 +36,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, HttpResponse], T, Dict[str, Any]], Any]] @@ -1400,7 +1400,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, gallery_name: str, gallery: Union[_models.Gallery, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1590,7 +1590,7 @@ def _update_initial( gallery: Union[_models.GalleryUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1801,7 +1801,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_07_03.models.Gallery :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1846,7 +1846,7 @@ def get( return deserialized # type: ignore def _delete_initial(self, resource_group_name: str, gallery_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1961,7 +1961,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-03")) cls: ClsType[_models.GalleryList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2036,7 +2036,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Gallery"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-03")) cls: ClsType[_models.GalleryList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2125,7 +2125,7 @@ def _create_or_update_initial( gallery_image: Union[_models.GalleryImage, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2337,7 +2337,7 @@ def _update_initial( gallery_image: Union[_models.GalleryImageUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2556,7 +2556,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_07_03.models.GalleryImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2602,7 +2602,7 @@ def get( def _delete_initial( self, resource_group_name: str, gallery_name: str, gallery_image_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2729,7 +2729,7 @@ def list_by_gallery( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-03")) cls: ClsType[_models.GalleryImageList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2821,7 +2821,7 @@ def _create_or_update_initial( gallery_image_version: Union[_models.GalleryImageVersion, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3055,7 +3055,7 @@ def _update_initial( gallery_image_version: Union[_models.GalleryImageVersionUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3311,7 +3311,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_07_03.models.GalleryImageVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3364,7 +3364,7 @@ def _delete_initial( gallery_image_version_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3506,7 +3506,7 @@ def list_by_gallery_image( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-03")) cls: ClsType[_models.GalleryImageVersionList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3598,7 +3598,7 @@ def _create_or_update_initial( gallery_application: Union[_models.GalleryApplication, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3814,7 +3814,7 @@ def _update_initial( gallery_application: Union[_models.GalleryApplicationUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4040,7 +4040,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_07_03.models.GalleryApplication :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4086,7 +4086,7 @@ def get( def _delete_initial( self, resource_group_name: str, gallery_name: str, gallery_application_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4214,7 +4214,7 @@ def list_by_gallery( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-03")) cls: ClsType[_models.GalleryApplicationList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4306,7 +4306,7 @@ def _create_or_update_initial( gallery_application_version: Union[_models.GalleryApplicationVersion, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4542,7 +4542,7 @@ def _update_initial( gallery_application_version: Union[_models.GalleryApplicationVersionUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4800,7 +4800,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_07_03.models.GalleryApplicationVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4853,7 +4853,7 @@ def _delete_initial( gallery_application_version_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4996,7 +4996,7 @@ def list_by_gallery_application( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-03")) cls: ClsType[_models.GalleryApplicationVersionList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5087,7 +5087,7 @@ def _update_initial( sharing_update: Union[_models.SharingUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5311,7 +5311,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-03")) cls: ClsType[_models.SharedGalleryList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5385,7 +5385,7 @@ def get(self, location: str, gallery_unique_name: str, **kwargs: Any) -> _models :rtype: ~azure.mgmt.compute.v2023_07_03.models.SharedGallery :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5476,7 +5476,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-03")) cls: ClsType[_models.SharedGalleryImageList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5556,7 +5556,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_07_03.models.SharedGalleryImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5654,7 +5654,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-03")) cls: ClsType[_models.SharedGalleryImageVersionList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5745,7 +5745,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_07_03.models.SharedGalleryImageVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5822,7 +5822,7 @@ def get(self, location: str, public_gallery_name: str, **kwargs: Any) -> _models :rtype: ~azure.mgmt.compute.v2023_07_03.models.CommunityGallery :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5901,7 +5901,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_07_03.models.CommunityGalleryImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5964,7 +5964,7 @@ def list(self, location: str, public_gallery_name: str, **kwargs: Any) -> Iterab api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-03")) cls: ClsType[_models.CommunityGalleryImageList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6073,7 +6073,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_07_03.models.CommunityGalleryImageVersion :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6141,7 +6141,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-07-03")) cls: ClsType[_models.CommunityGalleryImageVersionList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_09_01/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_09_01/__init__.py index 3b1b6244b2375..ab7c46e8991db 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_09_01/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_09_01/__init__.py @@ -5,15 +5,21 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._compute_management_client import ComputeManagementClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._compute_management_client import ComputeManagementClient # 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__ = [ "ComputeManagementClient", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_09_01/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_09_01/_compute_management_client.py index 60c3a5bb751e9..d901b405f9f6e 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_09_01/_compute_management_client.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_09_01/_compute_management_client.py @@ -48,11 +48,10 @@ ) if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class ComputeManagementClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes +class ComputeManagementClient: # pylint: disable=too-many-instance-attributes """Compute Client. :ivar operations: Operations operations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_09_01/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_09_01/_configuration.py index 09a8bcc5b8867..9fc56cd994490 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_09_01/_configuration.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_09_01/_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 ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ComputeManagementClient. Note that all parameters used to create this instance are saved as instance diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_09_01/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_09_01/_version.py index d79b2760319c5..e5754a47ce68f 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_09_01/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_09_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "33.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_09_01/aio/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_09_01/aio/__init__.py index 0715f50185586..d3fd1ba93379a 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_09_01/aio/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_09_01/aio/__init__.py @@ -5,12 +5,18 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._compute_management_client import ComputeManagementClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._compute_management_client import ComputeManagementClient # 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__ = [ "ComputeManagementClient", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_09_01/aio/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_09_01/aio/_compute_management_client.py index 0015efb9e4d76..2e541f1564476 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_09_01/aio/_compute_management_client.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_09_01/aio/_compute_management_client.py @@ -48,11 +48,10 @@ ) if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class ComputeManagementClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes +class ComputeManagementClient: # pylint: disable=too-many-instance-attributes """Compute Client. :ivar operations: Operations operations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_09_01/aio/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_09_01/aio/_configuration.py index 95ade37ac946f..cee0619b5c169 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_09_01/aio/_configuration.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_09_01/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 ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ComputeManagementClient. Note that all parameters used to create this instance are saved as instance diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_09_01/aio/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_09_01/aio/operations/__init__.py index 3cc8e8e7a73a8..5cc9a11e23416 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_09_01/aio/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_09_01/aio/operations/__init__.py @@ -5,36 +5,42 @@ # Code generated by Microsoft (R) AutoRest 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 UsageOperations -from ._operations import VirtualMachineSizesOperations -from ._operations import VirtualMachineScaleSetsOperations -from ._operations import VirtualMachineScaleSetExtensionsOperations -from ._operations import VirtualMachineScaleSetRollingUpgradesOperations -from ._operations import VirtualMachineScaleSetVMExtensionsOperations -from ._operations import VirtualMachineScaleSetVMsOperations -from ._operations import VirtualMachineExtensionsOperations -from ._operations import VirtualMachinesOperations -from ._operations import VirtualMachineImagesOperations -from ._operations import VirtualMachineImagesEdgeZoneOperations -from ._operations import VirtualMachineExtensionImagesOperations -from ._operations import AvailabilitySetsOperations -from ._operations import ProximityPlacementGroupsOperations -from ._operations import DedicatedHostGroupsOperations -from ._operations import DedicatedHostsOperations -from ._operations import SshPublicKeysOperations -from ._operations import ImagesOperations -from ._operations import RestorePointCollectionsOperations -from ._operations import RestorePointsOperations -from ._operations import CapacityReservationGroupsOperations -from ._operations import CapacityReservationsOperations -from ._operations import LogAnalyticsOperations -from ._operations import VirtualMachineRunCommandsOperations -from ._operations import VirtualMachineScaleSetVMRunCommandsOperations +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 UsageOperations # type: ignore +from ._operations import VirtualMachineSizesOperations # type: ignore +from ._operations import VirtualMachineScaleSetsOperations # type: ignore +from ._operations import VirtualMachineScaleSetExtensionsOperations # type: ignore +from ._operations import VirtualMachineScaleSetRollingUpgradesOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMExtensionsOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMsOperations # type: ignore +from ._operations import VirtualMachineExtensionsOperations # type: ignore +from ._operations import VirtualMachinesOperations # type: ignore +from ._operations import VirtualMachineImagesOperations # type: ignore +from ._operations import VirtualMachineImagesEdgeZoneOperations # type: ignore +from ._operations import VirtualMachineExtensionImagesOperations # type: ignore +from ._operations import AvailabilitySetsOperations # type: ignore +from ._operations import ProximityPlacementGroupsOperations # type: ignore +from ._operations import DedicatedHostGroupsOperations # type: ignore +from ._operations import DedicatedHostsOperations # type: ignore +from ._operations import SshPublicKeysOperations # type: ignore +from ._operations import ImagesOperations # type: ignore +from ._operations import RestorePointCollectionsOperations # type: ignore +from ._operations import RestorePointsOperations # type: ignore +from ._operations import CapacityReservationGroupsOperations # type: ignore +from ._operations import CapacityReservationsOperations # type: ignore +from ._operations import LogAnalyticsOperations # type: ignore +from ._operations import VirtualMachineRunCommandsOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMRunCommandsOperations # 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__ = [ @@ -65,5 +71,5 @@ "VirtualMachineRunCommandsOperations", "VirtualMachineScaleSetVMRunCommandsOperations", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_09_01/aio/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_09_01/aio/operations/_operations.py index 3ea6d32a7f1ea..37c0c733805d0 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_09_01/aio/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_09_01/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. @@ -8,21 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import ( - Any, - AsyncIterable, - AsyncIterator, - Callable, - Dict, - IO, - List, - Optional, - Type, - TypeVar, - Union, - cast, - overload, -) +from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, List, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -231,7 +217,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]] @@ -272,7 +258,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.ComputeOperationValue"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.ComputeOperationListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -369,7 +355,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.Usage"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.ListUsagesResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -469,7 +455,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.VirtualMa api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -570,7 +556,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> AsyncIterable["_mode api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -641,7 +627,7 @@ async def _create_or_update_initial( if_none_match: Optional[str] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -871,7 +857,7 @@ async def _update_initial( if_none_match: Optional[str] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1095,7 +1081,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, *, force_deletion: Optional[bool] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1224,7 +1210,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_09_01.models.VirtualMachineScaleSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1276,7 +1262,7 @@ async def _deallocate_initial( hibernate: Optional[bool] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1491,7 +1477,7 @@ async def _delete_instances_initial( force_deletion: Optional[bool] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1699,7 +1685,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2023_09_01.models.VirtualMachineScaleSetInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1759,7 +1745,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1838,7 +1824,7 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.VirtualMachineScaleS api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.VirtualMachineScaleSetListWithLinkResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1921,7 +1907,7 @@ def list_skus( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.VirtualMachineScaleSetListSkusResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1987,6 +1973,7 @@ async def get_next(next_link=None): def get_os_upgrade_history( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> AsyncIterable["_models.UpgradeOperationHistoricalStatusInfo"]: + # pylint: disable=line-too-long """Gets list of OS upgrades on a VM scale set instance. :param resource_group_name: The name of the resource group. Required. @@ -2005,7 +1992,7 @@ def get_os_upgrade_history( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.VirtualMachineScaleSetListOSUpgradeHistory] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2076,7 +2063,7 @@ async def _power_off_initial( skip_shutdown: bool = False, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2289,7 +2276,7 @@ async def _restart_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2478,7 +2465,7 @@ async def _start_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2663,7 +2650,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _reapply_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2778,7 +2765,7 @@ async def _redeploy_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2970,7 +2957,7 @@ async def _perform_maintenance_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3168,7 +3155,7 @@ async def _update_instances_initial( vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3354,7 +3341,7 @@ async def _reimage_initial( vm_scale_set_reimage_input: Optional[Union[_models.VirtualMachineScaleSetReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3547,7 +3534,7 @@ async def _reimage_all_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3739,7 +3726,7 @@ async def _approve_rolling_upgrade_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3958,7 +3945,7 @@ async def force_recovery_service_fabric_platform_update_domain_walk( # pylint: :rtype: ~azure.mgmt.compute.v2023_09_01.models.RecoveryWalkResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4004,7 +3991,7 @@ async def force_recovery_service_fabric_platform_update_domain_walk( # pylint: return deserialized # type: ignore @overload - async def convert_to_single_placement_group( # pylint: disable=inconsistent-return-statements + async def convert_to_single_placement_group( self, resource_group_name: str, vm_scale_set_name: str, @@ -4032,7 +4019,7 @@ async def convert_to_single_placement_group( # pylint: disable=inconsistent-ret """ @overload - async def convert_to_single_placement_group( # pylint: disable=inconsistent-return-statements + async def convert_to_single_placement_group( self, resource_group_name: str, vm_scale_set_name: str, @@ -4059,7 +4046,7 @@ async def convert_to_single_placement_group( # pylint: disable=inconsistent-ret """ @distributed_trace_async - async def convert_to_single_placement_group( # pylint: disable=inconsistent-return-statements + async def convert_to_single_placement_group( self, resource_group_name: str, vm_scale_set_name: str, @@ -4082,7 +4069,7 @@ async def convert_to_single_placement_group( # pylint: disable=inconsistent-ret :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4139,7 +4126,7 @@ async def _set_orchestration_service_state_initial( parameters: Union[_models.OrchestrationServiceStateInput, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4347,7 +4334,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtension, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4558,7 +4545,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtensionUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4765,7 +4752,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, vmss_extension_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4895,7 +4882,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_09_01.models.VirtualMachineScaleSetExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4961,7 +4948,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.VirtualMachineScaleSetExtensionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5047,7 +5034,7 @@ def __init__(self, *args, **kwargs) -> None: async def _cancel_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5151,7 +5138,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_os_upgrade_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5257,7 +5244,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_extension_upgrade_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5374,7 +5361,7 @@ async def get_latest( :rtype: ~azure.mgmt.compute.v2023_09_01.models.RollingUpgradeStatusInfo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5446,7 +5433,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetVMExtension, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5666,7 +5653,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetVMExtensionUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5881,7 +5868,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, vm_extension_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6017,7 +6004,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_09_01.models.VirtualMachineScaleSetVMExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6086,7 +6073,7 @@ async def list( :rtype: ~azure.mgmt.compute.v2023_09_01.models.VirtualMachineScaleSetVMExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6163,7 +6150,7 @@ async def _reimage_initial( ] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6362,7 +6349,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _reimage_all_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6471,7 +6458,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _approve_rolling_upgrade_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6582,7 +6569,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _deallocate_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6700,7 +6687,7 @@ async def _update_initial( if_none_match: Optional[str] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6945,7 +6932,7 @@ async def _delete_initial( force_deletion: Optional[bool] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7087,7 +7074,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_09_01.models.VirtualMachineScaleSetVM :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7147,7 +7134,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2023_09_01.models.VirtualMachineScaleSetVMInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7229,7 +7216,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.VirtualMachineScaleSetVMListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7303,7 +7290,7 @@ async def _power_off_initial( skip_shutdown: bool = False, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7425,7 +7412,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _restart_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7533,7 +7520,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7641,7 +7628,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _redeploy_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7774,7 +7761,7 @@ async def retrieve_boot_diagnostics_data( :rtype: ~azure.mgmt.compute.v2023_09_01.models.RetrieveBootDiagnosticsDataResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7821,7 +7808,7 @@ async def retrieve_boot_diagnostics_data( async def _perform_maintenance_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7927,7 +7914,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace_async - async def simulate_eviction( # pylint: disable=inconsistent-return-statements + async def simulate_eviction( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: """The operation to simulate the eviction of spot virtual machine in a VM scale set. @@ -7942,7 +7929,7 @@ async def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7989,7 +7976,7 @@ async def _attach_detach_data_disks_initial( parameters: Union[_models.AttachDetachDataDisksRequest, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8203,7 +8190,7 @@ async def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8430,7 +8417,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineExtension, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8640,7 +8627,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineExtensionUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8846,7 +8833,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_name: str, vm_extension_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8976,7 +8963,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_09_01.models.VirtualMachineExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9036,7 +9023,7 @@ async def list( :rtype: ~azure.mgmt.compute.v2023_09_01.models.VirtualMachineExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9118,7 +9105,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> AsyncIterable["_mode api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9186,7 +9173,7 @@ async def _capture_initial( parameters: Union[_models.VirtualMachineCaptureParameters, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9387,7 +9374,7 @@ async def _create_or_update_initial( if_none_match: Optional[str] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9620,7 +9607,7 @@ async def _update_initial( if_none_match: Optional[str] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9843,7 +9830,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_name: str, *, force_deletion: Optional[bool] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9974,7 +9961,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_09_01.models.VirtualMachine :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10031,7 +10018,7 @@ async def instance_view( :rtype: ~azure.mgmt.compute.v2023_09_01.models.VirtualMachineInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10076,7 +10063,7 @@ async def instance_view( async def _convert_to_managed_disks_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10181,7 +10168,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _deallocate_initial( self, resource_group_name: str, vm_name: str, *, hibernate: Optional[bool] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10289,9 +10276,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace_async - async def generalize( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, vm_name: str, **kwargs: Any - ) -> None: + async def generalize(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> None: """Sets the OS state of the virtual machine to generalized. It is recommended to sysprep the virtual machine before performing this operation. For Windows, please refer to `Create a managed image of a generalized VM in Azure @@ -10307,7 +10292,7 @@ async def generalize( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10354,6 +10339,7 @@ def list( expand: Optional[Union[str, _models.ExpandTypeForListVMs]] = None, **kwargs: Any ) -> AsyncIterable["_models.VirtualMachine"]: + # pylint: disable=line-too-long """Lists all of the virtual machines in the specified resource group. Use the nextLink property in the response to get the next page of virtual machines. @@ -10379,7 +10365,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10451,6 +10437,7 @@ def list_all( expand: Optional[Union[str, _models.ExpandTypesForListVMs]] = None, **kwargs: Any ) -> AsyncIterable["_models.VirtualMachine"]: + # pylint: disable=line-too-long """Lists all of the virtual machines in the specified subscription. Use the nextLink property in the response to get the next page of virtual machines. @@ -10477,7 +10464,7 @@ def list_all( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10562,7 +10549,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10627,7 +10614,7 @@ async def get_next(next_link=None): async def _power_off_initial( self, resource_group_name: str, vm_name: str, *, skip_shutdown: bool = False, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10736,7 +10723,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _reapply_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10836,7 +10823,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _restart_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10936,7 +10923,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _start_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11036,7 +11023,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _redeploy_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11142,7 +11129,7 @@ async def _reimage_initial( parameters: Optional[Union[_models.VirtualMachineReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11361,7 +11348,7 @@ async def retrieve_boot_diagnostics_data( :rtype: ~azure.mgmt.compute.v2023_09_01.models.RetrieveBootDiagnosticsDataResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11407,7 +11394,7 @@ async def retrieve_boot_diagnostics_data( async def _perform_maintenance_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11509,9 +11496,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace_async - async def simulate_eviction( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, vm_name: str, **kwargs: Any - ) -> None: + async def simulate_eviction(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> None: """The operation to simulate the eviction of spot virtual machine. :param resource_group_name: The name of the resource group. Required. @@ -11522,7 +11507,7 @@ async def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11563,7 +11548,7 @@ async def simulate_eviction( # pylint: disable=inconsistent-return-statements async def _assess_patches_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11679,7 +11664,7 @@ async def _install_patches_initial( install_patches_input: Union[_models.VirtualMachineInstallPatchesParameters, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11877,7 +11862,7 @@ async def _attach_detach_data_disks_initial( parameters: Union[_models.AttachDetachDataDisksRequest, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12078,7 +12063,7 @@ async def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12306,7 +12291,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_09_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12385,7 +12370,7 @@ async def list( :rtype: list[~azure.mgmt.compute.v2023_09_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12446,7 +12431,7 @@ async def list_offers( :rtype: list[~azure.mgmt.compute.v2023_09_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12498,7 +12483,7 @@ async def list_publishers(self, location: str, **kwargs: Any) -> List[_models.Vi :rtype: list[~azure.mgmt.compute.v2023_09_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12555,7 +12540,7 @@ async def list_skus( :rtype: list[~azure.mgmt.compute.v2023_09_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12612,7 +12597,7 @@ async def list_by_edge_zone( :rtype: ~azure.mgmt.compute.v2023_09_01.models.VmImagesInEdgeZoneListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12697,7 +12682,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_09_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12782,7 +12767,7 @@ async def list( :rtype: list[~azure.mgmt.compute.v2023_09_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12847,7 +12832,7 @@ async def list_offers( :rtype: list[~azure.mgmt.compute.v2023_09_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12904,7 +12889,7 @@ async def list_publishers( :rtype: list[~azure.mgmt.compute.v2023_09_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12965,7 +12950,7 @@ async def list_skus( :rtype: list[~azure.mgmt.compute.v2023_09_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13048,7 +13033,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_09_01.models.VirtualMachineExtensionImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13106,7 +13091,7 @@ async def list_types( :rtype: list[~azure.mgmt.compute.v2023_09_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13178,7 +13163,7 @@ async def list_versions( :rtype: list[~azure.mgmt.compute.v2023_09_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13318,7 +13303,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2023_09_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13445,7 +13430,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2023_09_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13500,9 +13485,7 @@ async def update( return deserialized # type: ignore @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, availability_set_name: str, **kwargs: Any - ) -> None: + async def delete(self, resource_group_name: str, availability_set_name: str, **kwargs: Any) -> None: """Delete an availability set. :param resource_group_name: The name of the resource group. Required. @@ -13513,7 +13496,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13563,7 +13546,7 @@ async def get(self, resource_group_name: str, availability_set_name: str, **kwar :rtype: ~azure.mgmt.compute.v2023_09_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13625,7 +13608,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13703,7 +13686,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13786,7 +13769,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13944,7 +13927,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2023_09_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14074,7 +14057,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2023_09_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14129,9 +14112,7 @@ async def update( return deserialized # type: ignore @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, proximity_placement_group_name: str, **kwargs: Any - ) -> None: + async def delete(self, resource_group_name: str, proximity_placement_group_name: str, **kwargs: Any) -> None: """Delete a proximity placement group. :param resource_group_name: The name of the resource group. Required. @@ -14142,7 +14123,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14202,7 +14183,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_09_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14261,7 +14242,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Proximit api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14341,7 +14322,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14502,7 +14483,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2023_09_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14629,7 +14610,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2023_09_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14684,9 +14665,7 @@ async def update( return deserialized # type: ignore @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, host_group_name: str, **kwargs: Any - ) -> None: + async def delete(self, resource_group_name: str, host_group_name: str, **kwargs: Any) -> None: """Delete a dedicated host group. :param resource_group_name: The name of the resource group. Required. @@ -14697,7 +14676,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14759,7 +14738,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_09_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14822,7 +14801,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14899,7 +14878,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Dedicate api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14988,7 +14967,7 @@ async def _create_or_update_initial( parameters: Union[_models.DedicatedHost, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15192,7 +15171,7 @@ async def _update_initial( parameters: Union[_models.DedicatedHostUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15391,7 +15370,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15522,7 +15501,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_09_01.models.DedicatedHost :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15588,7 +15567,7 @@ def list_by_host_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.DedicatedHostListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15653,7 +15632,7 @@ async def get_next(next_link=None): async def _restart_initial( self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15764,7 +15743,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _redeploy_initial( self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15900,7 +15879,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.DedicatedHostSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16001,7 +15980,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.SshPubli api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16082,7 +16061,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16216,7 +16195,7 @@ async def create( :rtype: ~azure.mgmt.compute.v2023_09_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16344,7 +16323,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2023_09_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16399,9 +16378,7 @@ async def update( return deserialized # type: ignore @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, ssh_public_key_name: str, **kwargs: Any - ) -> None: + async def delete(self, resource_group_name: str, ssh_public_key_name: str, **kwargs: Any) -> None: """Delete an SSH public key. :param resource_group_name: The name of the resource group. Required. @@ -16412,7 +16389,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16464,7 +16441,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_09_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16586,7 +16563,7 @@ async def generate_key_pair( :rtype: ~azure.mgmt.compute.v2023_09_01.models.SshPublicKeyGenerateKeyPairResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16667,7 +16644,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, image_name: str, parameters: Union[_models.Image, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16849,7 +16826,7 @@ async def _update_initial( parameters: Union[_models.ImageUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17029,7 +17006,7 @@ def get_long_running_output(pipeline_response): ) async def _delete_initial(self, resource_group_name: str, image_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17144,7 +17121,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_09_01.models.Image :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17204,7 +17181,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17280,7 +17257,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Image"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17442,7 +17419,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2023_09_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17572,7 +17549,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2023_09_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17629,7 +17606,7 @@ async def update( async def _delete_initial( self, resource_group_name: str, restore_point_collection_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17755,7 +17732,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_09_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17816,7 +17793,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.RestorePointCollectionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17895,7 +17872,7 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.RestorePointCollecti api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.RestorePointCollectionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17984,7 +17961,7 @@ async def _create_initial( parameters: Union[_models.RestorePoint, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18183,7 +18160,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, restore_point_collection_name: str, restore_point_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18313,7 +18290,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_09_01.models.RestorePoint :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18457,7 +18434,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2023_09_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18590,7 +18567,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2023_09_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18645,9 +18622,7 @@ async def update( return deserialized # type: ignore @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, capacity_reservation_group_name: str, **kwargs: Any - ) -> None: + async def delete(self, resource_group_name: str, capacity_reservation_group_name: str, **kwargs: Any) -> None: """The operation to delete a capacity reservation group. This operation is allowed only if all the associated resources are disassociated from the reservation group and all capacity reservations under the reservation group have also been deleted. Please refer to @@ -18661,7 +18636,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18725,7 +18700,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_09_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18799,7 +18774,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.CapacityReservationGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18886,7 +18861,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.CapacityReservationGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18976,7 +18951,7 @@ async def _create_or_update_initial( parameters: Union[_models.CapacityReservation, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19186,7 +19161,7 @@ async def _update_initial( parameters: Union[_models.CapacityReservationUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19389,7 +19364,7 @@ async def _delete_initial( capacity_reservation_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19527,7 +19502,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_09_01.models.CapacityReservation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19593,7 +19568,7 @@ def list_by_capacity_reservation_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.CapacityReservationListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19679,7 +19654,7 @@ def __init__(self, *args, **kwargs) -> None: async def _export_request_rate_by_interval_initial( self, location: str, parameters: Union[_models.RequestRateByIntervalInput, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19857,7 +19832,7 @@ def get_long_running_output(pipeline_response): async def _export_throttled_requests_initial( self, location: str, parameters: Union[_models.ThrottledRequestsInput, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20068,7 +20043,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.RunComman api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.RunCommandListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20141,7 +20116,7 @@ async def get(self, location: str, command_id: str, **kwargs: Any) -> _models.Ru :rtype: ~azure.mgmt.compute.v2023_09_01.models.RunCommandDocument :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20191,7 +20166,7 @@ async def _create_or_update_initial( run_command: Union[_models.VirtualMachineRunCommand, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20400,7 +20375,7 @@ async def _update_initial( run_command: Union[_models.VirtualMachineRunCommandUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20605,7 +20580,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_name: str, run_command_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20735,7 +20710,7 @@ async def get_by_virtual_machine( :rtype: ~azure.mgmt.compute.v2023_09_01.models.VirtualMachineRunCommand :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20803,7 +20778,7 @@ def list_by_virtual_machine( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.VirtualMachineRunCommandsListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20896,7 +20871,7 @@ async def _create_or_update_initial( run_command: Union[_models.VirtualMachineRunCommand, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21114,7 +21089,7 @@ async def _update_initial( run_command: Union[_models.VirtualMachineRunCommandUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21327,7 +21302,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, run_command_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21463,7 +21438,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_09_01.models.VirtualMachineRunCommand :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21540,7 +21515,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.VirtualMachineRunCommandsListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_09_01/models/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_09_01/models/__init__.py index f4cd0b6a2fcf4..1451a355619f8 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_09_01/models/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_09_01/models/__init__.py @@ -5,362 +5,373 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._models_py3 import AdditionalCapabilities -from ._models_py3 import AdditionalUnattendContent -from ._models_py3 import AlternativeOption -from ._models_py3 import ApiEntityReference -from ._models_py3 import ApiError -from ._models_py3 import ApiErrorBase -from ._models_py3 import ApplicationProfile -from ._models_py3 import AttachDetachDataDisksRequest -from ._models_py3 import AutomaticOSUpgradePolicy -from ._models_py3 import AutomaticOSUpgradeProperties -from ._models_py3 import AutomaticRepairsPolicy -from ._models_py3 import AvailabilitySet -from ._models_py3 import AvailabilitySetListResult -from ._models_py3 import AvailabilitySetUpdate -from ._models_py3 import AvailablePatchSummary -from ._models_py3 import BillingProfile -from ._models_py3 import BootDiagnostics -from ._models_py3 import BootDiagnosticsInstanceView -from ._models_py3 import CapacityReservation -from ._models_py3 import CapacityReservationGroup -from ._models_py3 import CapacityReservationGroupInstanceView -from ._models_py3 import CapacityReservationGroupListResult -from ._models_py3 import CapacityReservationGroupUpdate -from ._models_py3 import CapacityReservationInstanceView -from ._models_py3 import CapacityReservationInstanceViewWithName -from ._models_py3 import CapacityReservationListResult -from ._models_py3 import CapacityReservationProfile -from ._models_py3 import CapacityReservationUpdate -from ._models_py3 import CapacityReservationUtilization -from ._models_py3 import ComputeOperationListResult -from ._models_py3 import ComputeOperationValue -from ._models_py3 import DataDisk -from ._models_py3 import DataDiskImage -from ._models_py3 import DataDisksToAttach -from ._models_py3 import DataDisksToDetach -from ._models_py3 import DedicatedHost -from ._models_py3 import DedicatedHostAllocatableVM -from ._models_py3 import DedicatedHostAvailableCapacity -from ._models_py3 import DedicatedHostGroup -from ._models_py3 import DedicatedHostGroupInstanceView -from ._models_py3 import DedicatedHostGroupListResult -from ._models_py3 import DedicatedHostGroupPropertiesAdditionalCapabilities -from ._models_py3 import DedicatedHostGroupUpdate -from ._models_py3 import DedicatedHostInstanceView -from ._models_py3 import DedicatedHostInstanceViewWithName -from ._models_py3 import DedicatedHostListResult -from ._models_py3 import DedicatedHostSizeListResult -from ._models_py3 import DedicatedHostUpdate -from ._models_py3 import DiagnosticsProfile -from ._models_py3 import DiffDiskSettings -from ._models_py3 import DisallowedConfiguration -from ._models_py3 import DiskEncryptionSetParameters -from ._models_py3 import DiskEncryptionSettings -from ._models_py3 import DiskInstanceView -from ._models_py3 import DiskRestorePointAttributes -from ._models_py3 import DiskRestorePointInstanceView -from ._models_py3 import DiskRestorePointReplicationStatus -from ._models_py3 import EncryptionIdentity -from ._models_py3 import ExtendedLocation -from ._models_py3 import HardwareProfile -from ._models_py3 import Image -from ._models_py3 import ImageDataDisk -from ._models_py3 import ImageDeprecationStatus -from ._models_py3 import ImageDisk -from ._models_py3 import ImageListResult -from ._models_py3 import ImageOSDisk -from ._models_py3 import ImageReference -from ._models_py3 import ImageStorageProfile -from ._models_py3 import ImageUpdate -from ._models_py3 import InnerError -from ._models_py3 import InstanceViewStatus -from ._models_py3 import KeyVaultKeyReference -from ._models_py3 import KeyVaultSecretReference -from ._models_py3 import LastPatchInstallationSummary -from ._models_py3 import LinuxConfiguration -from ._models_py3 import LinuxParameters -from ._models_py3 import LinuxPatchSettings -from ._models_py3 import LinuxVMGuestPatchAutomaticByPlatformSettings -from ._models_py3 import ListUsagesResult -from ._models_py3 import LogAnalyticsInputBase -from ._models_py3 import LogAnalyticsOperationResult -from ._models_py3 import LogAnalyticsOutput -from ._models_py3 import MaintenanceRedeployStatus -from ._models_py3 import ManagedDiskParameters -from ._models_py3 import NetworkInterfaceReference -from ._models_py3 import NetworkProfile -from ._models_py3 import OSDisk -from ._models_py3 import OSDiskImage -from ._models_py3 import OSImageNotificationProfile -from ._models_py3 import OSProfile -from ._models_py3 import OSProfileProvisioningData -from ._models_py3 import OrchestrationServiceStateInput -from ._models_py3 import OrchestrationServiceSummary -from ._models_py3 import PatchInstallationDetail -from ._models_py3 import PatchSettings -from ._models_py3 import Plan -from ._models_py3 import PriorityMixPolicy -from ._models_py3 import ProximityPlacementGroup -from ._models_py3 import ProximityPlacementGroupListResult -from ._models_py3 import ProximityPlacementGroupPropertiesIntent -from ._models_py3 import ProximityPlacementGroupUpdate -from ._models_py3 import ProxyAgentSettings -from ._models_py3 import ProxyResource -from ._models_py3 import PublicIPAddressSku -from ._models_py3 import PurchasePlan -from ._models_py3 import RecoveryWalkResponse -from ._models_py3 import RequestRateByIntervalInput -from ._models_py3 import ResiliencyPolicy -from ._models_py3 import ResilientVMCreationPolicy -from ._models_py3 import ResilientVMDeletionPolicy -from ._models_py3 import Resource -from ._models_py3 import ResourceSharingProfile -from ._models_py3 import ResourceWithOptionalLocation -from ._models_py3 import RestorePoint -from ._models_py3 import RestorePointCollection -from ._models_py3 import RestorePointCollectionListResult -from ._models_py3 import RestorePointCollectionSourceProperties -from ._models_py3 import RestorePointCollectionUpdate -from ._models_py3 import RestorePointEncryption -from ._models_py3 import RestorePointInstanceView -from ._models_py3 import RestorePointSourceMetadata -from ._models_py3 import RestorePointSourceVMDataDisk -from ._models_py3 import RestorePointSourceVMOSDisk -from ._models_py3 import RestorePointSourceVMStorageProfile -from ._models_py3 import RetrieveBootDiagnosticsDataResult -from ._models_py3 import RollbackStatusInfo -from ._models_py3 import RollingUpgradePolicy -from ._models_py3 import RollingUpgradeProgressInfo -from ._models_py3 import RollingUpgradeRunningStatus -from ._models_py3 import RollingUpgradeStatusInfo -from ._models_py3 import RunCommandDocument -from ._models_py3 import RunCommandDocumentBase -from ._models_py3 import RunCommandInput -from ._models_py3 import RunCommandInputParameter -from ._models_py3 import RunCommandListResult -from ._models_py3 import RunCommandManagedIdentity -from ._models_py3 import RunCommandParameterDefinition -from ._models_py3 import RunCommandResult -from ._models_py3 import ScaleInPolicy -from ._models_py3 import ScheduledEventsProfile -from ._models_py3 import SecurityPostureReference -from ._models_py3 import SecurityProfile -from ._models_py3 import ServiceArtifactReference -from ._models_py3 import Sku -from ._models_py3 import SpotRestorePolicy -from ._models_py3 import SshConfiguration -from ._models_py3 import SshGenerateKeyPairInputParameters -from ._models_py3 import SshPublicKey -from ._models_py3 import SshPublicKeyGenerateKeyPairResult -from ._models_py3 import SshPublicKeyResource -from ._models_py3 import SshPublicKeyUpdateResource -from ._models_py3 import SshPublicKeysGroupListResult -from ._models_py3 import StorageProfile -from ._models_py3 import SubResource -from ._models_py3 import SubResourceReadOnly -from ._models_py3 import SubResourceWithColocationStatus -from ._models_py3 import SystemData -from ._models_py3 import TerminateNotificationProfile -from ._models_py3 import ThrottledRequestsInput -from ._models_py3 import UefiSettings -from ._models_py3 import UpdateResource -from ._models_py3 import UpgradeOperationHistoricalStatusInfo -from ._models_py3 import UpgradeOperationHistoricalStatusInfoProperties -from ._models_py3 import UpgradeOperationHistoryStatus -from ._models_py3 import UpgradePolicy -from ._models_py3 import Usage -from ._models_py3 import UsageName -from ._models_py3 import UserAssignedIdentitiesValue -from ._models_py3 import VMDiskSecurityProfile -from ._models_py3 import VMGalleryApplication -from ._models_py3 import VMScaleSetConvertToSinglePlacementGroupInput -from ._models_py3 import VMSizeProperties -from ._models_py3 import VaultCertificate -from ._models_py3 import VaultSecretGroup -from ._models_py3 import VirtualHardDisk -from ._models_py3 import VirtualMachine -from ._models_py3 import VirtualMachineAgentInstanceView -from ._models_py3 import VirtualMachineAssessPatchesResult -from ._models_py3 import VirtualMachineCaptureParameters -from ._models_py3 import VirtualMachineCaptureResult -from ._models_py3 import VirtualMachineExtension -from ._models_py3 import VirtualMachineExtensionHandlerInstanceView -from ._models_py3 import VirtualMachineExtensionImage -from ._models_py3 import VirtualMachineExtensionInstanceView -from ._models_py3 import VirtualMachineExtensionUpdate -from ._models_py3 import VirtualMachineExtensionsListResult -from ._models_py3 import VirtualMachineHealthStatus -from ._models_py3 import VirtualMachineIdentity -from ._models_py3 import VirtualMachineImage -from ._models_py3 import VirtualMachineImageFeature -from ._models_py3 import VirtualMachineImageResource -from ._models_py3 import VirtualMachineInstallPatchesParameters -from ._models_py3 import VirtualMachineInstallPatchesResult -from ._models_py3 import VirtualMachineInstanceView -from ._models_py3 import VirtualMachineIpTag -from ._models_py3 import VirtualMachineListResult -from ._models_py3 import VirtualMachineNetworkInterfaceConfiguration -from ._models_py3 import VirtualMachineNetworkInterfaceDnsSettingsConfiguration -from ._models_py3 import VirtualMachineNetworkInterfaceIPConfiguration -from ._models_py3 import VirtualMachinePatchStatus -from ._models_py3 import VirtualMachinePublicIPAddressConfiguration -from ._models_py3 import VirtualMachinePublicIPAddressDnsSettingsConfiguration -from ._models_py3 import VirtualMachineReimageParameters -from ._models_py3 import VirtualMachineRunCommand -from ._models_py3 import VirtualMachineRunCommandInstanceView -from ._models_py3 import VirtualMachineRunCommandScriptSource -from ._models_py3 import VirtualMachineRunCommandUpdate -from ._models_py3 import VirtualMachineRunCommandsListResult -from ._models_py3 import VirtualMachineScaleSet -from ._models_py3 import VirtualMachineScaleSetDataDisk -from ._models_py3 import VirtualMachineScaleSetExtension -from ._models_py3 import VirtualMachineScaleSetExtensionListResult -from ._models_py3 import VirtualMachineScaleSetExtensionProfile -from ._models_py3 import VirtualMachineScaleSetExtensionUpdate -from ._models_py3 import VirtualMachineScaleSetHardwareProfile -from ._models_py3 import VirtualMachineScaleSetIPConfiguration -from ._models_py3 import VirtualMachineScaleSetIdentity -from ._models_py3 import VirtualMachineScaleSetInstanceView -from ._models_py3 import VirtualMachineScaleSetInstanceViewStatusesSummary -from ._models_py3 import VirtualMachineScaleSetIpTag -from ._models_py3 import VirtualMachineScaleSetListOSUpgradeHistory -from ._models_py3 import VirtualMachineScaleSetListResult -from ._models_py3 import VirtualMachineScaleSetListSkusResult -from ._models_py3 import VirtualMachineScaleSetListWithLinkResult -from ._models_py3 import VirtualMachineScaleSetManagedDiskParameters -from ._models_py3 import VirtualMachineScaleSetNetworkConfiguration -from ._models_py3 import VirtualMachineScaleSetNetworkConfigurationDnsSettings -from ._models_py3 import VirtualMachineScaleSetNetworkProfile -from ._models_py3 import VirtualMachineScaleSetOSDisk -from ._models_py3 import VirtualMachineScaleSetOSProfile -from ._models_py3 import VirtualMachineScaleSetPublicIPAddressConfiguration -from ._models_py3 import VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings -from ._models_py3 import VirtualMachineScaleSetReimageParameters -from ._models_py3 import VirtualMachineScaleSetSku -from ._models_py3 import VirtualMachineScaleSetSkuCapacity -from ._models_py3 import VirtualMachineScaleSetStorageProfile -from ._models_py3 import VirtualMachineScaleSetUpdate -from ._models_py3 import VirtualMachineScaleSetUpdateIPConfiguration -from ._models_py3 import VirtualMachineScaleSetUpdateNetworkConfiguration -from ._models_py3 import VirtualMachineScaleSetUpdateNetworkProfile -from ._models_py3 import VirtualMachineScaleSetUpdateOSDisk -from ._models_py3 import VirtualMachineScaleSetUpdateOSProfile -from ._models_py3 import VirtualMachineScaleSetUpdatePublicIPAddressConfiguration -from ._models_py3 import VirtualMachineScaleSetUpdateStorageProfile -from ._models_py3 import VirtualMachineScaleSetUpdateVMProfile -from ._models_py3 import VirtualMachineScaleSetVM -from ._models_py3 import VirtualMachineScaleSetVMExtension -from ._models_py3 import VirtualMachineScaleSetVMExtensionUpdate -from ._models_py3 import VirtualMachineScaleSetVMExtensionsListResult -from ._models_py3 import VirtualMachineScaleSetVMExtensionsSummary -from ._models_py3 import VirtualMachineScaleSetVMInstanceIDs -from ._models_py3 import VirtualMachineScaleSetVMInstanceRequiredIDs -from ._models_py3 import VirtualMachineScaleSetVMInstanceView -from ._models_py3 import VirtualMachineScaleSetVMListResult -from ._models_py3 import VirtualMachineScaleSetVMNetworkProfileConfiguration -from ._models_py3 import VirtualMachineScaleSetVMProfile -from ._models_py3 import VirtualMachineScaleSetVMProtectionPolicy -from ._models_py3 import VirtualMachineScaleSetVMReimageParameters -from ._models_py3 import VirtualMachineSize -from ._models_py3 import VirtualMachineSizeListResult -from ._models_py3 import VirtualMachineSoftwarePatchProperties -from ._models_py3 import VirtualMachineStatusCodeCount -from ._models_py3 import VirtualMachineUpdate -from ._models_py3 import VmImagesInEdgeZoneListResult -from ._models_py3 import WinRMConfiguration -from ._models_py3 import WinRMListener -from ._models_py3 import WindowsConfiguration -from ._models_py3 import WindowsParameters -from ._models_py3 import WindowsVMGuestPatchAutomaticByPlatformSettings +from typing import TYPE_CHECKING -from ._compute_management_client_enums import AlternativeType -from ._compute_management_client_enums import ArchitectureTypes -from ._compute_management_client_enums import AvailabilitySetSkuTypes -from ._compute_management_client_enums import CachingTypes -from ._compute_management_client_enums import CapacityReservationGroupInstanceViewTypes -from ._compute_management_client_enums import CapacityReservationInstanceViewTypes -from ._compute_management_client_enums import ConsistencyModeTypes -from ._compute_management_client_enums import DedicatedHostLicenseTypes -from ._compute_management_client_enums import DeleteOptions -from ._compute_management_client_enums import DiffDiskOptions -from ._compute_management_client_enums import DiffDiskPlacement -from ._compute_management_client_enums import DiskControllerTypes -from ._compute_management_client_enums import DiskCreateOptionTypes -from ._compute_management_client_enums import DiskDeleteOptionTypes -from ._compute_management_client_enums import DiskDetachOptionTypes -from ._compute_management_client_enums import DomainNameLabelScopeTypes -from ._compute_management_client_enums import ExecutionState -from ._compute_management_client_enums import ExpandTypeForListVMs -from ._compute_management_client_enums import ExpandTypesForGetCapacityReservationGroups -from ._compute_management_client_enums import ExpandTypesForGetVMScaleSets -from ._compute_management_client_enums import ExpandTypesForListVMs -from ._compute_management_client_enums import ExtendedLocationTypes -from ._compute_management_client_enums import HyperVGeneration -from ._compute_management_client_enums import HyperVGenerationType -from ._compute_management_client_enums import HyperVGenerationTypes -from ._compute_management_client_enums import IPVersion -from ._compute_management_client_enums import IPVersions -from ._compute_management_client_enums import ImageState -from ._compute_management_client_enums import InstanceViewTypes -from ._compute_management_client_enums import IntervalInMins -from ._compute_management_client_enums import LinuxPatchAssessmentMode -from ._compute_management_client_enums import LinuxVMGuestPatchAutomaticByPlatformRebootSetting -from ._compute_management_client_enums import LinuxVMGuestPatchMode -from ._compute_management_client_enums import MaintenanceOperationResultCodeTypes -from ._compute_management_client_enums import Mode -from ._compute_management_client_enums import NetworkApiVersion -from ._compute_management_client_enums import NetworkInterfaceAuxiliaryMode -from ._compute_management_client_enums import NetworkInterfaceAuxiliarySku -from ._compute_management_client_enums import OperatingSystemStateTypes -from ._compute_management_client_enums import OperatingSystemType -from ._compute_management_client_enums import OperatingSystemTypes -from ._compute_management_client_enums import OrchestrationMode -from ._compute_management_client_enums import OrchestrationServiceNames -from ._compute_management_client_enums import OrchestrationServiceState -from ._compute_management_client_enums import OrchestrationServiceStateAction -from ._compute_management_client_enums import PatchAssessmentState -from ._compute_management_client_enums import PatchInstallationState -from ._compute_management_client_enums import PatchOperationStatus -from ._compute_management_client_enums import ProtocolTypes -from ._compute_management_client_enums import ProximityPlacementGroupType -from ._compute_management_client_enums import PublicIPAddressSkuName -from ._compute_management_client_enums import PublicIPAddressSkuTier -from ._compute_management_client_enums import PublicIPAllocationMethod -from ._compute_management_client_enums import RepairAction -from ._compute_management_client_enums import ResourceIdentityType -from ._compute_management_client_enums import RestorePointCollectionExpandOptions -from ._compute_management_client_enums import RestorePointEncryptionType -from ._compute_management_client_enums import RestorePointExpandOptions -from ._compute_management_client_enums import RollingUpgradeActionType -from ._compute_management_client_enums import RollingUpgradeStatusCode -from ._compute_management_client_enums import SecurityEncryptionTypes -from ._compute_management_client_enums import SecurityTypes -from ._compute_management_client_enums import SettingNames -from ._compute_management_client_enums import SshEncryptionTypes -from ._compute_management_client_enums import StatusLevelTypes -from ._compute_management_client_enums import StorageAccountTypes -from ._compute_management_client_enums import UpgradeMode -from ._compute_management_client_enums import UpgradeOperationInvoker -from ._compute_management_client_enums import UpgradeState -from ._compute_management_client_enums import VMGuestPatchClassificationLinux -from ._compute_management_client_enums import VMGuestPatchClassificationWindows -from ._compute_management_client_enums import VMGuestPatchRebootBehavior -from ._compute_management_client_enums import VMGuestPatchRebootSetting -from ._compute_management_client_enums import VMGuestPatchRebootStatus -from ._compute_management_client_enums import VirtualMachineEvictionPolicyTypes -from ._compute_management_client_enums import VirtualMachinePriorityTypes -from ._compute_management_client_enums import VirtualMachineScaleSetScaleInRules -from ._compute_management_client_enums import VirtualMachineScaleSetSkuScaleType -from ._compute_management_client_enums import VirtualMachineSizeTypes -from ._compute_management_client_enums import VmDiskTypes -from ._compute_management_client_enums import WindowsPatchAssessmentMode -from ._compute_management_client_enums import WindowsVMGuestPatchAutomaticByPlatformRebootSetting -from ._compute_management_client_enums import WindowsVMGuestPatchMode +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + + +from ._models_py3 import ( # type: ignore + AdditionalCapabilities, + AdditionalUnattendContent, + AlternativeOption, + ApiEntityReference, + ApiError, + ApiErrorBase, + ApplicationProfile, + AttachDetachDataDisksRequest, + AutomaticOSUpgradePolicy, + AutomaticOSUpgradeProperties, + AutomaticRepairsPolicy, + AvailabilitySet, + AvailabilitySetListResult, + AvailabilitySetUpdate, + AvailablePatchSummary, + BillingProfile, + BootDiagnostics, + BootDiagnosticsInstanceView, + CapacityReservation, + CapacityReservationGroup, + CapacityReservationGroupInstanceView, + CapacityReservationGroupListResult, + CapacityReservationGroupUpdate, + CapacityReservationInstanceView, + CapacityReservationInstanceViewWithName, + CapacityReservationListResult, + CapacityReservationProfile, + CapacityReservationUpdate, + CapacityReservationUtilization, + ComputeOperationListResult, + ComputeOperationValue, + DataDisk, + DataDiskImage, + DataDisksToAttach, + DataDisksToDetach, + DedicatedHost, + DedicatedHostAllocatableVM, + DedicatedHostAvailableCapacity, + DedicatedHostGroup, + DedicatedHostGroupInstanceView, + DedicatedHostGroupListResult, + DedicatedHostGroupPropertiesAdditionalCapabilities, + DedicatedHostGroupUpdate, + DedicatedHostInstanceView, + DedicatedHostInstanceViewWithName, + DedicatedHostListResult, + DedicatedHostSizeListResult, + DedicatedHostUpdate, + DiagnosticsProfile, + DiffDiskSettings, + DisallowedConfiguration, + DiskEncryptionSetParameters, + DiskEncryptionSettings, + DiskInstanceView, + DiskRestorePointAttributes, + DiskRestorePointInstanceView, + DiskRestorePointReplicationStatus, + EncryptionIdentity, + ExtendedLocation, + HardwareProfile, + Image, + ImageDataDisk, + ImageDeprecationStatus, + ImageDisk, + ImageListResult, + ImageOSDisk, + ImageReference, + ImageStorageProfile, + ImageUpdate, + InnerError, + InstanceViewStatus, + KeyVaultKeyReference, + KeyVaultSecretReference, + LastPatchInstallationSummary, + LinuxConfiguration, + LinuxParameters, + LinuxPatchSettings, + LinuxVMGuestPatchAutomaticByPlatformSettings, + ListUsagesResult, + LogAnalyticsInputBase, + LogAnalyticsOperationResult, + LogAnalyticsOutput, + MaintenanceRedeployStatus, + ManagedDiskParameters, + NetworkInterfaceReference, + NetworkProfile, + OSDisk, + OSDiskImage, + OSImageNotificationProfile, + OSProfile, + OSProfileProvisioningData, + OrchestrationServiceStateInput, + OrchestrationServiceSummary, + PatchInstallationDetail, + PatchSettings, + Plan, + PriorityMixPolicy, + ProximityPlacementGroup, + ProximityPlacementGroupListResult, + ProximityPlacementGroupPropertiesIntent, + ProximityPlacementGroupUpdate, + ProxyAgentSettings, + ProxyResource, + PublicIPAddressSku, + PurchasePlan, + RecoveryWalkResponse, + RequestRateByIntervalInput, + ResiliencyPolicy, + ResilientVMCreationPolicy, + ResilientVMDeletionPolicy, + Resource, + ResourceSharingProfile, + ResourceWithOptionalLocation, + RestorePoint, + RestorePointCollection, + RestorePointCollectionListResult, + RestorePointCollectionSourceProperties, + RestorePointCollectionUpdate, + RestorePointEncryption, + RestorePointInstanceView, + RestorePointSourceMetadata, + RestorePointSourceVMDataDisk, + RestorePointSourceVMOSDisk, + RestorePointSourceVMStorageProfile, + RetrieveBootDiagnosticsDataResult, + RollbackStatusInfo, + RollingUpgradePolicy, + RollingUpgradeProgressInfo, + RollingUpgradeRunningStatus, + RollingUpgradeStatusInfo, + RunCommandDocument, + RunCommandDocumentBase, + RunCommandInput, + RunCommandInputParameter, + RunCommandListResult, + RunCommandManagedIdentity, + RunCommandParameterDefinition, + RunCommandResult, + ScaleInPolicy, + ScheduledEventsProfile, + SecurityPostureReference, + SecurityProfile, + ServiceArtifactReference, + Sku, + SpotRestorePolicy, + SshConfiguration, + SshGenerateKeyPairInputParameters, + SshPublicKey, + SshPublicKeyGenerateKeyPairResult, + SshPublicKeyResource, + SshPublicKeyUpdateResource, + SshPublicKeysGroupListResult, + StorageProfile, + SubResource, + SubResourceReadOnly, + SubResourceWithColocationStatus, + SystemData, + TerminateNotificationProfile, + ThrottledRequestsInput, + UefiSettings, + UpdateResource, + UpgradeOperationHistoricalStatusInfo, + UpgradeOperationHistoricalStatusInfoProperties, + UpgradeOperationHistoryStatus, + UpgradePolicy, + Usage, + UsageName, + UserAssignedIdentitiesValue, + VMDiskSecurityProfile, + VMGalleryApplication, + VMScaleSetConvertToSinglePlacementGroupInput, + VMSizeProperties, + VaultCertificate, + VaultSecretGroup, + VirtualHardDisk, + VirtualMachine, + VirtualMachineAgentInstanceView, + VirtualMachineAssessPatchesResult, + VirtualMachineCaptureParameters, + VirtualMachineCaptureResult, + VirtualMachineExtension, + VirtualMachineExtensionHandlerInstanceView, + VirtualMachineExtensionImage, + VirtualMachineExtensionInstanceView, + VirtualMachineExtensionUpdate, + VirtualMachineExtensionsListResult, + VirtualMachineHealthStatus, + VirtualMachineIdentity, + VirtualMachineImage, + VirtualMachineImageFeature, + VirtualMachineImageResource, + VirtualMachineInstallPatchesParameters, + VirtualMachineInstallPatchesResult, + VirtualMachineInstanceView, + VirtualMachineIpTag, + VirtualMachineListResult, + VirtualMachineNetworkInterfaceConfiguration, + VirtualMachineNetworkInterfaceDnsSettingsConfiguration, + VirtualMachineNetworkInterfaceIPConfiguration, + VirtualMachinePatchStatus, + VirtualMachinePublicIPAddressConfiguration, + VirtualMachinePublicIPAddressDnsSettingsConfiguration, + VirtualMachineReimageParameters, + VirtualMachineRunCommand, + VirtualMachineRunCommandInstanceView, + VirtualMachineRunCommandScriptSource, + VirtualMachineRunCommandUpdate, + VirtualMachineRunCommandsListResult, + VirtualMachineScaleSet, + VirtualMachineScaleSetDataDisk, + VirtualMachineScaleSetExtension, + VirtualMachineScaleSetExtensionListResult, + VirtualMachineScaleSetExtensionProfile, + VirtualMachineScaleSetExtensionUpdate, + VirtualMachineScaleSetHardwareProfile, + VirtualMachineScaleSetIPConfiguration, + VirtualMachineScaleSetIdentity, + VirtualMachineScaleSetInstanceView, + VirtualMachineScaleSetInstanceViewStatusesSummary, + VirtualMachineScaleSetIpTag, + VirtualMachineScaleSetListOSUpgradeHistory, + VirtualMachineScaleSetListResult, + VirtualMachineScaleSetListSkusResult, + VirtualMachineScaleSetListWithLinkResult, + VirtualMachineScaleSetManagedDiskParameters, + VirtualMachineScaleSetNetworkConfiguration, + VirtualMachineScaleSetNetworkConfigurationDnsSettings, + VirtualMachineScaleSetNetworkProfile, + VirtualMachineScaleSetOSDisk, + VirtualMachineScaleSetOSProfile, + VirtualMachineScaleSetPublicIPAddressConfiguration, + VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings, + VirtualMachineScaleSetReimageParameters, + VirtualMachineScaleSetSku, + VirtualMachineScaleSetSkuCapacity, + VirtualMachineScaleSetStorageProfile, + VirtualMachineScaleSetUpdate, + VirtualMachineScaleSetUpdateIPConfiguration, + VirtualMachineScaleSetUpdateNetworkConfiguration, + VirtualMachineScaleSetUpdateNetworkProfile, + VirtualMachineScaleSetUpdateOSDisk, + VirtualMachineScaleSetUpdateOSProfile, + VirtualMachineScaleSetUpdatePublicIPAddressConfiguration, + VirtualMachineScaleSetUpdateStorageProfile, + VirtualMachineScaleSetUpdateVMProfile, + VirtualMachineScaleSetVM, + VirtualMachineScaleSetVMExtension, + VirtualMachineScaleSetVMExtensionUpdate, + VirtualMachineScaleSetVMExtensionsListResult, + VirtualMachineScaleSetVMExtensionsSummary, + VirtualMachineScaleSetVMInstanceIDs, + VirtualMachineScaleSetVMInstanceRequiredIDs, + VirtualMachineScaleSetVMInstanceView, + VirtualMachineScaleSetVMListResult, + VirtualMachineScaleSetVMNetworkProfileConfiguration, + VirtualMachineScaleSetVMProfile, + VirtualMachineScaleSetVMProtectionPolicy, + VirtualMachineScaleSetVMReimageParameters, + VirtualMachineSize, + VirtualMachineSizeListResult, + VirtualMachineSoftwarePatchProperties, + VirtualMachineStatusCodeCount, + VirtualMachineUpdate, + VmImagesInEdgeZoneListResult, + WinRMConfiguration, + WinRMListener, + WindowsConfiguration, + WindowsParameters, + WindowsVMGuestPatchAutomaticByPlatformSettings, +) + +from ._compute_management_client_enums import ( # type: ignore + AlternativeType, + ArchitectureTypes, + AvailabilitySetSkuTypes, + CachingTypes, + CapacityReservationGroupInstanceViewTypes, + CapacityReservationInstanceViewTypes, + ConsistencyModeTypes, + DedicatedHostLicenseTypes, + DeleteOptions, + DiffDiskOptions, + DiffDiskPlacement, + DiskControllerTypes, + DiskCreateOptionTypes, + DiskDeleteOptionTypes, + DiskDetachOptionTypes, + DomainNameLabelScopeTypes, + ExecutionState, + ExpandTypeForListVMs, + ExpandTypesForGetCapacityReservationGroups, + ExpandTypesForGetVMScaleSets, + ExpandTypesForListVMs, + ExtendedLocationTypes, + HyperVGeneration, + HyperVGenerationType, + HyperVGenerationTypes, + IPVersion, + IPVersions, + ImageState, + InstanceViewTypes, + IntervalInMins, + LinuxPatchAssessmentMode, + LinuxVMGuestPatchAutomaticByPlatformRebootSetting, + LinuxVMGuestPatchMode, + MaintenanceOperationResultCodeTypes, + Mode, + NetworkApiVersion, + NetworkInterfaceAuxiliaryMode, + NetworkInterfaceAuxiliarySku, + OperatingSystemStateTypes, + OperatingSystemType, + OperatingSystemTypes, + OrchestrationMode, + OrchestrationServiceNames, + OrchestrationServiceState, + OrchestrationServiceStateAction, + PatchAssessmentState, + PatchInstallationState, + PatchOperationStatus, + ProtocolTypes, + ProximityPlacementGroupType, + PublicIPAddressSkuName, + PublicIPAddressSkuTier, + PublicIPAllocationMethod, + RepairAction, + ResourceIdentityType, + RestorePointCollectionExpandOptions, + RestorePointEncryptionType, + RestorePointExpandOptions, + RollingUpgradeActionType, + RollingUpgradeStatusCode, + SecurityEncryptionTypes, + SecurityTypes, + SettingNames, + SshEncryptionTypes, + StatusLevelTypes, + StorageAccountTypes, + UpgradeMode, + UpgradeOperationInvoker, + UpgradeState, + VMGuestPatchClassificationLinux, + VMGuestPatchClassificationWindows, + VMGuestPatchRebootBehavior, + VMGuestPatchRebootSetting, + VMGuestPatchRebootStatus, + VirtualMachineEvictionPolicyTypes, + VirtualMachinePriorityTypes, + VirtualMachineScaleSetScaleInRules, + VirtualMachineScaleSetSkuScaleType, + VirtualMachineSizeTypes, + VmDiskTypes, + WindowsPatchAssessmentMode, + WindowsVMGuestPatchAutomaticByPlatformRebootSetting, + WindowsVMGuestPatchMode, +) 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__ = [ @@ -717,5 +728,5 @@ "WindowsVMGuestPatchAutomaticByPlatformRebootSetting", "WindowsVMGuestPatchMode", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_09_01/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_09_01/models/_models_py3.py index 8ce08f04ec347..0fc831a101b93 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_09_01/models/_models_py3.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_09_01/models/_models_py3.py @@ -1,5 +1,5 @@ -# 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. @@ -16,10 +16,9 @@ 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 if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object @@ -526,7 +525,7 @@ def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kw self.tags = tags -class AvailabilitySet(Resource): # pylint: disable=too-many-instance-attributes +class AvailabilitySet(Resource): """Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see `Availability sets @@ -939,7 +938,7 @@ def __init__(self, **kwargs: Any) -> None: self.status = None -class CapacityReservation(Resource): # pylint: disable=too-many-instance-attributes +class CapacityReservation(Resource): """Specifies information about the capacity reservation. Variables are only populated by the server, and will be ignored when sending a request. @@ -1629,7 +1628,7 @@ def __init__(self, **kwargs: Any) -> None: self.provider = None -class DataDisk(_serialization.Model): # pylint: disable=too-many-instance-attributes +class DataDisk(_serialization.Model): """Describes a data disk. Variables are only populated by the server, and will be ignored when sending a request. @@ -1906,7 +1905,7 @@ def __init__( self.detach_option = detach_option -class DedicatedHost(Resource): # pylint: disable=too-many-instance-attributes +class DedicatedHost(Resource): """Specifies information about the Dedicated host. Variables are only populated by the server, and will be ignored when sending a request. @@ -2084,7 +2083,7 @@ def __init__( self.allocatable_v_ms = allocatable_v_ms -class DedicatedHostGroup(Resource): # pylint: disable=too-many-instance-attributes +class DedicatedHostGroup(Resource): """Specifies information about the dedicated host group that the dedicated hosts should be assigned to. Currently, a dedicated host can only be added to a dedicated host group at creation time. An existing dedicated host cannot be added to another dedicated host group. @@ -2518,7 +2517,7 @@ def __init__(self, *, value: Optional[List[str]] = None, **kwargs: Any) -> None: self.value = value -class DedicatedHostUpdate(UpdateResource): # pylint: disable=too-many-instance-attributes +class DedicatedHostUpdate(UpdateResource): """Specifies information about the dedicated host. Only tags, autoReplaceOnFailure and licenseType may be updated. @@ -3996,7 +3995,7 @@ def __init__(self, *, secret_url: str, source_vault: "_models.SubResource", **kw self.source_vault = source_vault -class LastPatchInstallationSummary(_serialization.Model): # pylint: disable=too-many-instance-attributes +class LastPatchInstallationSummary(_serialization.Model): """Describes the properties of the last installed patch summary. Variables are only populated by the server, and will be ignored when sending a request. @@ -4775,7 +4774,7 @@ def __init__(self, **kwargs: Any) -> None: self.service_state = None -class OSDisk(_serialization.Model): # pylint: disable=too-many-instance-attributes +class OSDisk(_serialization.Model): """Specifies information about the operating system disk used by the virtual machine. For more information about disks, see `About disks and VHDs for Azure virtual machines `_. @@ -5462,7 +5461,7 @@ def __init__( self.regular_priority_percentage_above_base = regular_priority_percentage_above_base -class ProximityPlacementGroup(Resource): # pylint: disable=too-many-instance-attributes +class ProximityPlacementGroup(Resource): """Specifies information about the proximity placement group. Variables are only populated by the server, and will be ignored when sending a request. @@ -8572,7 +8571,7 @@ def __init__(self, *, uri: Optional[str] = None, **kwargs: Any) -> None: self.uri = uri -class VirtualMachine(Resource): # pylint: disable=too-many-instance-attributes +class VirtualMachine(Resource): """Describes a Virtual Machine. Variables are only populated by the server, and will be ignored when sending a request. @@ -9154,7 +9153,7 @@ def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylin self.resources = None -class VirtualMachineExtension(ResourceWithOptionalLocation): # pylint: disable=too-many-instance-attributes +class VirtualMachineExtension(ResourceWithOptionalLocation): """Describes a Virtual Machine Extension. Variables are only populated by the server, and will be ignored when sending a request. @@ -9520,7 +9519,7 @@ def __init__(self, *, value: Optional[List["_models.VirtualMachineExtension"]] = self.value = value -class VirtualMachineExtensionUpdate(UpdateResource): # pylint: disable=too-many-instance-attributes +class VirtualMachineExtensionUpdate(UpdateResource): """Describes a Virtual Machine Extension. :ivar tags: Resource tags. @@ -9782,7 +9781,7 @@ def __init__( self.extended_location = extended_location -class VirtualMachineImage(VirtualMachineImageResource): # pylint: disable=too-many-instance-attributes +class VirtualMachineImage(VirtualMachineImageResource): """Describes a Virtual Machine Image. All required parameters must be populated in order to send to server. @@ -10007,7 +10006,7 @@ def __init__( self.linux_parameters = linux_parameters -class VirtualMachineInstallPatchesResult(_serialization.Model): # pylint: disable=too-many-instance-attributes +class VirtualMachineInstallPatchesResult(_serialization.Model): """The result summary of an installation operation. Variables are only populated by the server, and will be ignored when sending a request. @@ -10097,7 +10096,7 @@ def __init__(self, **kwargs: Any) -> None: self.error = None -class VirtualMachineInstanceView(_serialization.Model): # pylint: disable=too-many-instance-attributes +class VirtualMachineInstanceView(_serialization.Model): """The instance view of a virtual machine. Variables are only populated by the server, and will be ignored when sending a request. @@ -10309,9 +10308,7 @@ def __init__( self.next_link = next_link -class VirtualMachineNetworkInterfaceConfiguration( - _serialization.Model -): # pylint: disable=too-many-instance-attributes,name-too-long +class VirtualMachineNetworkInterfaceConfiguration(_serialization.Model): # pylint: disable=name-too-long """Describes a virtual machine network interface configurations. All required parameters must be populated in order to send to server. @@ -10840,7 +10837,7 @@ def __init__( self.os_profile = os_profile -class VirtualMachineRunCommand(Resource): # pylint: disable=too-many-instance-attributes +class VirtualMachineRunCommand(Resource): """Describes a Virtual Machine run command. Variables are only populated by the server, and will be ignored when sending a request. @@ -11215,7 +11212,7 @@ def __init__( self.next_link = next_link -class VirtualMachineRunCommandUpdate(UpdateResource): # pylint: disable=too-many-instance-attributes +class VirtualMachineRunCommandUpdate(UpdateResource): """Describes a Virtual Machine run command. Variables are only populated by the server, and will be ignored when sending a request. @@ -11399,7 +11396,7 @@ def __init__( self.treat_failure_as_deployment_failure = treat_failure_as_deployment_failure -class VirtualMachineScaleSet(Resource): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSet(Resource): """Describes a Virtual Machine Scale Set. Variables are only populated by the server, and will be ignored when sending a request. @@ -11814,7 +11811,7 @@ def __init__( self.delete_option = delete_option -class VirtualMachineScaleSetExtension(SubResourceReadOnly): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetExtension(SubResourceReadOnly): """Describes a Virtual Machine Scale Set Extension. Variables are only populated by the server, and will be ignored when sending a request. @@ -12034,7 +12031,7 @@ def __init__( self.extensions_time_budget = extensions_time_budget -class VirtualMachineScaleSetExtensionUpdate(SubResourceReadOnly): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetExtensionUpdate(SubResourceReadOnly): """Describes a Virtual Machine Scale Set Extension. Variables are only populated by the server, and will be ignored when sending a request. @@ -12686,9 +12683,7 @@ def __init__( self.security_profile = security_profile -class VirtualMachineScaleSetNetworkConfiguration( - _serialization.Model -): # pylint: disable=too-many-instance-attributes,name-too-long +class VirtualMachineScaleSetNetworkConfiguration(_serialization.Model): # pylint: disable=name-too-long """Describes a virtual machine scale set network profile's network configurations. All required parameters must be populated in order to send to server. @@ -12891,7 +12886,7 @@ def __init__( self.network_api_version = network_api_version -class VirtualMachineScaleSetOSDisk(_serialization.Model): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetOSDisk(_serialization.Model): """Describes a virtual machine scale set operating system disk. All required parameters must be populated in order to send to server. @@ -13539,7 +13534,7 @@ def __init__( self.disk_controller_type = disk_controller_type -class VirtualMachineScaleSetUpdate(UpdateResource): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetUpdate(UpdateResource): """Describes a Virtual Machine Scale Set. :ivar tags: Resource tags. @@ -13818,9 +13813,7 @@ def __init__( self.load_balancer_inbound_nat_pools = load_balancer_inbound_nat_pools -class VirtualMachineScaleSetUpdateNetworkConfiguration( - _serialization.Model -): # pylint: disable=too-many-instance-attributes,name-too-long +class VirtualMachineScaleSetUpdateNetworkConfiguration(_serialization.Model): # pylint: disable=name-too-long """Describes a virtual machine scale set network profile's network configurations. :ivar name: The network configuration name. @@ -14250,7 +14243,7 @@ def __init__( self.disk_controller_type = disk_controller_type -class VirtualMachineScaleSetUpdateVMProfile(_serialization.Model): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetUpdateVMProfile(_serialization.Model): """Describes a virtual machine scale set virtual machine profile. :ivar os_profile: The virtual machine scale set OS profile. @@ -14363,7 +14356,7 @@ def __init__( self.hardware_profile = hardware_profile -class VirtualMachineScaleSetVM(Resource): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetVM(Resource): """Describes a virtual machine scale set virtual machine. Variables are only populated by the server, and will be ignored when sending a request. @@ -14633,7 +14626,7 @@ def __init__( # pylint: disable=too-many-locals self.time_created = None -class VirtualMachineScaleSetVMExtension(SubResourceReadOnly): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetVMExtension(SubResourceReadOnly): """Describes a VMSS VM Extension. Variables are only populated by the server, and will be ignored when sending a request. @@ -14845,7 +14838,7 @@ def __init__(self, **kwargs: Any) -> None: self.statuses_summary = None -class VirtualMachineScaleSetVMExtensionUpdate(SubResourceReadOnly): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetVMExtensionUpdate(SubResourceReadOnly): """Describes a VMSS VM Extension. Variables are only populated by the server, and will be ignored when sending a request. @@ -15025,7 +15018,7 @@ def __init__(self, *, instance_ids: List[str], **kwargs: Any) -> None: self.instance_ids = instance_ids -class VirtualMachineScaleSetVMInstanceView(_serialization.Model): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetVMInstanceView(_serialization.Model): """The instance view of a virtual machine scale set VM. Variables are only populated by the server, and will be ignored when sending a request. @@ -15246,7 +15239,7 @@ def __init__( self.network_interface_configurations = network_interface_configurations -class VirtualMachineScaleSetVMProfile(_serialization.Model): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetVMProfile(_serialization.Model): """Describes a virtual machine scale set virtual machine profile. Variables are only populated by the server, and will be ignored when sending a request. @@ -15698,7 +15691,7 @@ def __init__(self, **kwargs: Any) -> None: self.count = None -class VirtualMachineUpdate(UpdateResource): # pylint: disable=too-many-instance-attributes +class VirtualMachineUpdate(UpdateResource): """Describes a Virtual Machine Update. Variables are only populated by the server, and will be ignored when sending a request. diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_09_01/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_09_01/operations/__init__.py index 3cc8e8e7a73a8..5cc9a11e23416 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_09_01/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_09_01/operations/__init__.py @@ -5,36 +5,42 @@ # Code generated by Microsoft (R) AutoRest 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 UsageOperations -from ._operations import VirtualMachineSizesOperations -from ._operations import VirtualMachineScaleSetsOperations -from ._operations import VirtualMachineScaleSetExtensionsOperations -from ._operations import VirtualMachineScaleSetRollingUpgradesOperations -from ._operations import VirtualMachineScaleSetVMExtensionsOperations -from ._operations import VirtualMachineScaleSetVMsOperations -from ._operations import VirtualMachineExtensionsOperations -from ._operations import VirtualMachinesOperations -from ._operations import VirtualMachineImagesOperations -from ._operations import VirtualMachineImagesEdgeZoneOperations -from ._operations import VirtualMachineExtensionImagesOperations -from ._operations import AvailabilitySetsOperations -from ._operations import ProximityPlacementGroupsOperations -from ._operations import DedicatedHostGroupsOperations -from ._operations import DedicatedHostsOperations -from ._operations import SshPublicKeysOperations -from ._operations import ImagesOperations -from ._operations import RestorePointCollectionsOperations -from ._operations import RestorePointsOperations -from ._operations import CapacityReservationGroupsOperations -from ._operations import CapacityReservationsOperations -from ._operations import LogAnalyticsOperations -from ._operations import VirtualMachineRunCommandsOperations -from ._operations import VirtualMachineScaleSetVMRunCommandsOperations +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 UsageOperations # type: ignore +from ._operations import VirtualMachineSizesOperations # type: ignore +from ._operations import VirtualMachineScaleSetsOperations # type: ignore +from ._operations import VirtualMachineScaleSetExtensionsOperations # type: ignore +from ._operations import VirtualMachineScaleSetRollingUpgradesOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMExtensionsOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMsOperations # type: ignore +from ._operations import VirtualMachineExtensionsOperations # type: ignore +from ._operations import VirtualMachinesOperations # type: ignore +from ._operations import VirtualMachineImagesOperations # type: ignore +from ._operations import VirtualMachineImagesEdgeZoneOperations # type: ignore +from ._operations import VirtualMachineExtensionImagesOperations # type: ignore +from ._operations import AvailabilitySetsOperations # type: ignore +from ._operations import ProximityPlacementGroupsOperations # type: ignore +from ._operations import DedicatedHostGroupsOperations # type: ignore +from ._operations import DedicatedHostsOperations # type: ignore +from ._operations import SshPublicKeysOperations # type: ignore +from ._operations import ImagesOperations # type: ignore +from ._operations import RestorePointCollectionsOperations # type: ignore +from ._operations import RestorePointsOperations # type: ignore +from ._operations import CapacityReservationGroupsOperations # type: ignore +from ._operations import CapacityReservationsOperations # type: ignore +from ._operations import LogAnalyticsOperations # type: ignore +from ._operations import VirtualMachineRunCommandsOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMRunCommandsOperations # 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__ = [ @@ -65,5 +71,5 @@ "VirtualMachineRunCommandsOperations", "VirtualMachineScaleSetVMRunCommandsOperations", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_09_01/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_09_01/operations/_operations.py index 6dc58b2b49ee4..65d82eed6929e 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_09_01/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_09_01/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. @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Iterable, Iterator, List, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Iterable, Iterator, List, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -36,7 +36,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, HttpResponse], T, Dict[str, Any]], Any]] @@ -6272,7 +6272,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.ComputeOperationValue"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.ComputeOperationListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6369,7 +6369,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.Usage"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.ListUsagesResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6468,7 +6468,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.VirtualMachine api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6569,7 +6569,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> Iterable["_models.Vi api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6640,7 +6640,7 @@ def _create_or_update_initial( if_none_match: Optional[str] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6870,7 +6870,7 @@ def _update_initial( if_none_match: Optional[str] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7094,7 +7094,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, *, force_deletion: Optional[bool] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7223,7 +7223,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_09_01.models.VirtualMachineScaleSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7275,7 +7275,7 @@ def _deallocate_initial( hibernate: Optional[bool] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7490,7 +7490,7 @@ def _delete_instances_initial( force_deletion: Optional[bool] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7698,7 +7698,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2023_09_01.models.VirtualMachineScaleSetInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7758,7 +7758,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Vir api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7837,7 +7837,7 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.VirtualMachineScaleSet"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.VirtualMachineScaleSetListWithLinkResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7920,7 +7920,7 @@ def list_skus( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.VirtualMachineScaleSetListSkusResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8004,7 +8004,7 @@ def get_os_upgrade_history( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.VirtualMachineScaleSetListOSUpgradeHistory] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8075,7 +8075,7 @@ def _power_off_initial( skip_shutdown: bool = False, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8288,7 +8288,7 @@ def _restart_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8477,7 +8477,7 @@ def _start_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8660,7 +8660,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _reapply_initial(self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8773,7 +8773,7 @@ def _redeploy_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8965,7 +8965,7 @@ def _perform_maintenance_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9163,7 +9163,7 @@ def _update_instances_initial( vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9349,7 +9349,7 @@ def _reimage_initial( vm_scale_set_reimage_input: Optional[Union[_models.VirtualMachineScaleSetReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9542,7 +9542,7 @@ def _reimage_all_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9734,7 +9734,7 @@ def _approve_rolling_upgrade_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9953,7 +9953,7 @@ def force_recovery_service_fabric_platform_update_domain_walk( # pylint: disabl :rtype: ~azure.mgmt.compute.v2023_09_01.models.RecoveryWalkResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9999,7 +9999,7 @@ def force_recovery_service_fabric_platform_update_domain_walk( # pylint: disabl return deserialized # type: ignore @overload - def convert_to_single_placement_group( # pylint: disable=inconsistent-return-statements + def convert_to_single_placement_group( self, resource_group_name: str, vm_scale_set_name: str, @@ -10027,7 +10027,7 @@ def convert_to_single_placement_group( # pylint: disable=inconsistent-return-st """ @overload - def convert_to_single_placement_group( # pylint: disable=inconsistent-return-statements + def convert_to_single_placement_group( self, resource_group_name: str, vm_scale_set_name: str, @@ -10077,7 +10077,7 @@ def convert_to_single_placement_group( # pylint: disable=inconsistent-return-st :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10134,7 +10134,7 @@ def _set_orchestration_service_state_initial( parameters: Union[_models.OrchestrationServiceStateInput, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10342,7 +10342,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtension, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10553,7 +10553,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtensionUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10760,7 +10760,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, vmss_extension_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10890,7 +10890,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_09_01.models.VirtualMachineScaleSetExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10956,7 +10956,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.VirtualMachineScaleSetExtensionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11040,7 +11040,7 @@ def __init__(self, *args, **kwargs): self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") def _cancel_initial(self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11142,7 +11142,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_os_upgrade_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11248,7 +11248,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_extension_upgrade_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11365,7 +11365,7 @@ def get_latest( :rtype: ~azure.mgmt.compute.v2023_09_01.models.RollingUpgradeStatusInfo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11437,7 +11437,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetVMExtension, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11657,7 +11657,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetVMExtensionUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11872,7 +11872,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, vm_extension_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12008,7 +12008,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_09_01.models.VirtualMachineScaleSetVMExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12077,7 +12077,7 @@ def list( :rtype: ~azure.mgmt.compute.v2023_09_01.models.VirtualMachineScaleSetVMExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12154,7 +12154,7 @@ def _reimage_initial( ] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12353,7 +12353,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _reimage_all_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12462,7 +12462,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _approve_rolling_upgrade_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12573,7 +12573,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _deallocate_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12691,7 +12691,7 @@ def _update_initial( if_none_match: Optional[str] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12936,7 +12936,7 @@ def _delete_initial( force_deletion: Optional[bool] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13078,7 +13078,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_09_01.models.VirtualMachineScaleSetVM :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13138,7 +13138,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2023_09_01.models.VirtualMachineScaleSetVMInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13220,7 +13220,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.VirtualMachineScaleSetVMListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13294,7 +13294,7 @@ def _power_off_initial( skip_shutdown: bool = False, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13416,7 +13416,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _restart_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13524,7 +13524,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13632,7 +13632,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _redeploy_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13765,7 +13765,7 @@ def retrieve_boot_diagnostics_data( :rtype: ~azure.mgmt.compute.v2023_09_01.models.RetrieveBootDiagnosticsDataResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13812,7 +13812,7 @@ def retrieve_boot_diagnostics_data( def _perform_maintenance_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13933,7 +13933,7 @@ def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13980,7 +13980,7 @@ def _attach_detach_data_disks_initial( parameters: Union[_models.AttachDetachDataDisksRequest, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14191,7 +14191,7 @@ def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14415,7 +14415,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineExtension, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14625,7 +14625,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineExtensionUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14831,7 +14831,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_name: str, vm_extension_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14961,7 +14961,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_09_01.models.VirtualMachineExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15021,7 +15021,7 @@ def list( :rtype: ~azure.mgmt.compute.v2023_09_01.models.VirtualMachineExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15102,7 +15102,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> Iterable["_models.Vi api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15170,7 +15170,7 @@ def _capture_initial( parameters: Union[_models.VirtualMachineCaptureParameters, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15371,7 +15371,7 @@ def _create_or_update_initial( if_none_match: Optional[str] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15601,7 +15601,7 @@ def _update_initial( if_none_match: Optional[str] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15821,7 +15821,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_name: str, *, force_deletion: Optional[bool] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15952,7 +15952,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_09_01.models.VirtualMachine :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16009,7 +16009,7 @@ def instance_view( :rtype: ~azure.mgmt.compute.v2023_09_01.models.VirtualMachineInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16054,7 +16054,7 @@ def instance_view( def _convert_to_managed_disks_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16157,7 +16157,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _deallocate_initial( self, resource_group_name: str, vm_name: str, *, hibernate: Optional[bool] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16283,7 +16283,7 @@ def generalize( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16330,6 +16330,7 @@ def list( expand: Optional[Union[str, _models.ExpandTypeForListVMs]] = None, **kwargs: Any ) -> Iterable["_models.VirtualMachine"]: + # pylint: disable=line-too-long """Lists all of the virtual machines in the specified resource group. Use the nextLink property in the response to get the next page of virtual machines. @@ -16354,7 +16355,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16426,6 +16427,7 @@ def list_all( expand: Optional[Union[str, _models.ExpandTypesForListVMs]] = None, **kwargs: Any ) -> Iterable["_models.VirtualMachine"]: + # pylint: disable=line-too-long """Lists all of the virtual machines in the specified subscription. Use the nextLink property in the response to get the next page of virtual machines. @@ -16451,7 +16453,7 @@ def list_all( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16535,7 +16537,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16600,7 +16602,7 @@ def get_next(next_link=None): def _power_off_initial( self, resource_group_name: str, vm_name: str, *, skip_shutdown: bool = False, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16709,7 +16711,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _reapply_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16809,7 +16811,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _restart_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16909,7 +16911,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _start_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17009,7 +17011,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _redeploy_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17115,7 +17117,7 @@ def _reimage_initial( parameters: Optional[Union[_models.VirtualMachineReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17334,7 +17336,7 @@ def retrieve_boot_diagnostics_data( :rtype: ~azure.mgmt.compute.v2023_09_01.models.RetrieveBootDiagnosticsDataResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17378,7 +17380,7 @@ def retrieve_boot_diagnostics_data( return deserialized # type: ignore def _perform_maintenance_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17491,7 +17493,7 @@ def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17530,7 +17532,7 @@ def simulate_eviction( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore def _assess_patches_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17646,7 +17648,7 @@ def _install_patches_initial( install_patches_input: Union[_models.VirtualMachineInstallPatchesParameters, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17844,7 +17846,7 @@ def _attach_detach_data_disks_initial( parameters: Union[_models.AttachDetachDataDisksRequest, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18042,7 +18044,7 @@ def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18267,7 +18269,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_09_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18346,7 +18348,7 @@ def list( :rtype: list[~azure.mgmt.compute.v2023_09_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18407,7 +18409,7 @@ def list_offers( :rtype: list[~azure.mgmt.compute.v2023_09_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18459,7 +18461,7 @@ def list_publishers(self, location: str, **kwargs: Any) -> List[_models.VirtualM :rtype: list[~azure.mgmt.compute.v2023_09_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18516,7 +18518,7 @@ def list_skus( :rtype: list[~azure.mgmt.compute.v2023_09_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18571,7 +18573,7 @@ def list_by_edge_zone(self, location: str, edge_zone: str, **kwargs: Any) -> _mo :rtype: ~azure.mgmt.compute.v2023_09_01.models.VmImagesInEdgeZoneListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18656,7 +18658,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_09_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18741,7 +18743,7 @@ def list( :rtype: list[~azure.mgmt.compute.v2023_09_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18806,7 +18808,7 @@ def list_offers( :rtype: list[~azure.mgmt.compute.v2023_09_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18863,7 +18865,7 @@ def list_publishers( :rtype: list[~azure.mgmt.compute.v2023_09_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18924,7 +18926,7 @@ def list_skus( :rtype: list[~azure.mgmt.compute.v2023_09_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19007,7 +19009,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_09_01.models.VirtualMachineExtensionImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19065,7 +19067,7 @@ def list_types( :rtype: list[~azure.mgmt.compute.v2023_09_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19137,7 +19139,7 @@ def list_versions( :rtype: list[~azure.mgmt.compute.v2023_09_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19277,7 +19279,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2023_09_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19404,7 +19406,7 @@ def update( :rtype: ~azure.mgmt.compute.v2023_09_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19472,7 +19474,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19522,7 +19524,7 @@ def get(self, resource_group_name: str, availability_set_name: str, **kwargs: An :rtype: ~azure.mgmt.compute.v2023_09_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19583,7 +19585,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19660,7 +19662,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Ava api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19742,7 +19744,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19900,7 +19902,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2023_09_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20030,7 +20032,7 @@ def update( :rtype: ~azure.mgmt.compute.v2023_09_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20098,7 +20100,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20158,7 +20160,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_09_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20217,7 +20219,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.ProximityPlac api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20297,7 +20299,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20458,7 +20460,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2023_09_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20585,7 +20587,7 @@ def update( :rtype: ~azure.mgmt.compute.v2023_09_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20653,7 +20655,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20715,7 +20717,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_09_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20775,7 +20777,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20851,7 +20853,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.DedicatedHost api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20940,7 +20942,7 @@ def _create_or_update_initial( parameters: Union[_models.DedicatedHost, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21141,7 +21143,7 @@ def _update_initial( parameters: Union[_models.DedicatedHostUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21337,7 +21339,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21468,7 +21470,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_09_01.models.DedicatedHost :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21533,7 +21535,7 @@ def list_by_host_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.DedicatedHostListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21598,7 +21600,7 @@ def get_next(next_link=None): def _restart_initial( self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21709,7 +21711,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _redeploy_initial( self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21845,7 +21847,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.DedicatedHostSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21946,7 +21948,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.SshPublicKeyR api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22027,7 +22029,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22161,7 +22163,7 @@ def create( :rtype: ~azure.mgmt.compute.v2023_09_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22289,7 +22291,7 @@ def update( :rtype: ~azure.mgmt.compute.v2023_09_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22357,7 +22359,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22407,7 +22409,7 @@ def get(self, resource_group_name: str, ssh_public_key_name: str, **kwargs: Any) :rtype: ~azure.mgmt.compute.v2023_09_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22529,7 +22531,7 @@ def generate_key_pair( :rtype: ~azure.mgmt.compute.v2023_09_01.models.SshPublicKeyGenerateKeyPairResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22610,7 +22612,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, image_name: str, parameters: Union[_models.Image, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22792,7 +22794,7 @@ def _update_initial( parameters: Union[_models.ImageUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22972,7 +22974,7 @@ def get_long_running_output(pipeline_response): ) def _delete_initial(self, resource_group_name: str, image_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23087,7 +23089,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_09_01.models.Image :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23147,7 +23149,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23223,7 +23225,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Image"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23385,7 +23387,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2023_09_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23515,7 +23517,7 @@ def update( :rtype: ~azure.mgmt.compute.v2023_09_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23572,7 +23574,7 @@ def update( def _delete_initial( self, resource_group_name: str, restore_point_collection_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23698,7 +23700,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_09_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23759,7 +23761,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Res api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.RestorePointCollectionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23838,7 +23840,7 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.RestorePointCollection"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.RestorePointCollectionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23927,7 +23929,7 @@ def _create_initial( parameters: Union[_models.RestorePoint, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24126,7 +24128,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, restore_point_collection_name: str, restore_point_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24256,7 +24258,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_09_01.models.RestorePoint :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24400,7 +24402,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2023_09_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24533,7 +24535,7 @@ def update( :rtype: ~azure.mgmt.compute.v2023_09_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24604,7 +24606,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24668,7 +24670,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_09_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24742,7 +24744,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.CapacityReservationGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24829,7 +24831,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.CapacityReservationGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24919,7 +24921,7 @@ def _create_or_update_initial( parameters: Union[_models.CapacityReservation, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25129,7 +25131,7 @@ def _update_initial( parameters: Union[_models.CapacityReservationUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25332,7 +25334,7 @@ def _delete_initial( capacity_reservation_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25470,7 +25472,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_09_01.models.CapacityReservation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25536,7 +25538,7 @@ def list_by_capacity_reservation_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.CapacityReservationListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25622,7 +25624,7 @@ def __init__(self, *args, **kwargs): def _export_request_rate_by_interval_initial( self, location: str, parameters: Union[_models.RequestRateByIntervalInput, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25799,7 +25801,7 @@ def get_long_running_output(pipeline_response): def _export_throttled_requests_initial( self, location: str, parameters: Union[_models.ThrottledRequestsInput, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26009,7 +26011,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.RunCommandDocu api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.RunCommandListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26082,7 +26084,7 @@ def get(self, location: str, command_id: str, **kwargs: Any) -> _models.RunComma :rtype: ~azure.mgmt.compute.v2023_09_01.models.RunCommandDocument :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26132,7 +26134,7 @@ def _create_or_update_initial( run_command: Union[_models.VirtualMachineRunCommand, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26341,7 +26343,7 @@ def _update_initial( run_command: Union[_models.VirtualMachineRunCommandUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26546,7 +26548,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_name: str, run_command_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26676,7 +26678,7 @@ def get_by_virtual_machine( :rtype: ~azure.mgmt.compute.v2023_09_01.models.VirtualMachineRunCommand :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26744,7 +26746,7 @@ def list_by_virtual_machine( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.VirtualMachineRunCommandsListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26837,7 +26839,7 @@ def _create_or_update_initial( run_command: Union[_models.VirtualMachineRunCommand, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -27055,7 +27057,7 @@ def _update_initial( run_command: Union[_models.VirtualMachineRunCommandUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -27268,7 +27270,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, run_command_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -27404,7 +27406,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_09_01.models.VirtualMachineRunCommand :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -27481,7 +27483,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-09-01")) cls: ClsType[_models.VirtualMachineRunCommandsListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_10_02/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_10_02/__init__.py index 3b1b6244b2375..ab7c46e8991db 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_10_02/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_10_02/__init__.py @@ -5,15 +5,21 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._compute_management_client import ComputeManagementClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._compute_management_client import ComputeManagementClient # 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__ = [ "ComputeManagementClient", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_10_02/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_10_02/_compute_management_client.py index ede9e73df48fa..47d2935c9eccd 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_10_02/_compute_management_client.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_10_02/_compute_management_client.py @@ -27,11 +27,10 @@ ) if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class ComputeManagementClient: # pylint: disable=client-accepts-api-version-keyword +class ComputeManagementClient: """Compute Client. :ivar disks: DisksOperations operations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_10_02/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_10_02/_configuration.py index 6e2d42f8ffc17..7d39c5d9e1ea8 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_10_02/_configuration.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_10_02/_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 ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ComputeManagementClient. Note that all parameters used to create this instance are saved as instance diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_10_02/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_10_02/_version.py index d79b2760319c5..e5754a47ce68f 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_10_02/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_10_02/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "33.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_10_02/aio/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_10_02/aio/__init__.py index 0715f50185586..d3fd1ba93379a 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_10_02/aio/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_10_02/aio/__init__.py @@ -5,12 +5,18 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._compute_management_client import ComputeManagementClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._compute_management_client import ComputeManagementClient # 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__ = [ "ComputeManagementClient", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_10_02/aio/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_10_02/aio/_compute_management_client.py index b50ced1f61379..54a43c67a6bd1 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_10_02/aio/_compute_management_client.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_10_02/aio/_compute_management_client.py @@ -27,11 +27,10 @@ ) if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class ComputeManagementClient: # pylint: disable=client-accepts-api-version-keyword +class ComputeManagementClient: """Compute Client. :ivar disks: DisksOperations operations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_10_02/aio/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_10_02/aio/_configuration.py index 7f66a619234c4..8e33564d19bfd 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_10_02/aio/_configuration.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_10_02/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 ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ComputeManagementClient. Note that all parameters used to create this instance are saved as instance diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_10_02/aio/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_10_02/aio/operations/__init__.py index 8ca1cc2598c3b..0e0c2d8aaf8d4 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_10_02/aio/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_10_02/aio/operations/__init__.py @@ -5,15 +5,21 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._operations import DisksOperations -from ._operations import DiskAccessesOperations -from ._operations import DiskEncryptionSetsOperations -from ._operations import DiskRestorePointOperations -from ._operations import SnapshotsOperations +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._operations import DisksOperations # type: ignore +from ._operations import DiskAccessesOperations # type: ignore +from ._operations import DiskEncryptionSetsOperations # type: ignore +from ._operations import DiskRestorePointOperations # type: ignore +from ._operations import SnapshotsOperations # 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__ = [ @@ -23,5 +29,5 @@ "DiskRestorePointOperations", "SnapshotsOperations", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_10_02/aio/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_10_02/aio/operations/_operations.py index 876b78e888342..764e0e5df4ace 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_10_02/aio/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_10_02/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. @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -76,7 +76,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]] @@ -104,7 +104,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.Disk, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -288,7 +288,7 @@ def get_long_running_output(pipeline_response): async def _update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.DiskUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -483,7 +483,7 @@ async def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.compute.v2023_10_02.models.Disk :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -526,7 +526,7 @@ async def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> return deserialized # type: ignore async def _delete_initial(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -643,7 +643,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-10-02")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -718,7 +718,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Disk"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-10-02")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -785,7 +785,7 @@ async def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -980,7 +980,7 @@ def get_long_running_output(pipeline_response): async def _revoke_access_initial( self, resource_group_name: str, disk_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1113,7 +1113,7 @@ async def _create_or_update_initial( disk_access: Union[_models.DiskAccess, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1310,7 +1310,7 @@ async def _update_initial( disk_access: Union[_models.DiskAccessUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1514,7 +1514,7 @@ async def get(self, resource_group_name: str, disk_access_name: str, **kwargs: A :rtype: ~azure.mgmt.compute.v2023_10_02.models.DiskAccess :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1559,7 +1559,7 @@ async def get(self, resource_group_name: str, disk_access_name: str, **kwargs: A async def _delete_initial( self, resource_group_name: str, disk_access_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1679,7 +1679,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-10-02")) cls: ClsType[_models.DiskAccessList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1755,7 +1755,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.DiskAccess"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-10-02")) cls: ClsType[_models.DiskAccessList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1831,7 +1831,7 @@ async def get_private_link_resources( :rtype: ~azure.mgmt.compute.v2023_10_02.models.PrivateLinkResourceListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1881,7 +1881,7 @@ async def _update_a_private_endpoint_connection_initial( # pylint: disable=name private_endpoint_connection: Union[_models.PrivateEndpointConnection, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2109,7 +2109,7 @@ async def get_a_private_endpoint_connection( :rtype: ~azure.mgmt.compute.v2023_10_02.models.PrivateEndpointConnection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2155,7 +2155,7 @@ async def get_a_private_endpoint_connection( async def _delete_a_private_endpoint_connection_initial( # pylint: disable=name-too-long self, resource_group_name: str, disk_access_name: str, private_endpoint_connection_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2286,7 +2286,7 @@ def list_private_endpoint_connections( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-10-02")) cls: ClsType[_models.PrivateEndpointConnectionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2376,7 +2376,7 @@ async def _create_or_update_initial( disk_encryption_set: Union[_models.DiskEncryptionSet, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2577,7 +2577,7 @@ async def _update_initial( disk_encryption_set: Union[_models.DiskEncryptionSetUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2788,7 +2788,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_10_02.models.DiskEncryptionSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2833,7 +2833,7 @@ async def get( async def _delete_initial( self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2955,7 +2955,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-10-02")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3031,7 +3031,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.DiskEncryptionSet"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-10-02")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3113,7 +3113,7 @@ def list_associated_resources( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-10-02")) cls: ClsType[_models.ResourceUriList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3221,7 +3221,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2023_10_02.models.DiskRestorePoint :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3290,7 +3290,7 @@ def list_by_restore_point( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-10-02")) cls: ClsType[_models.DiskRestorePointList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3362,7 +3362,7 @@ async def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3584,7 +3584,7 @@ async def _revoke_access_initial( disk_restore_point_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3726,7 +3726,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, snapshot_name: str, snapshot: Union[_models.Snapshot, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3917,7 +3917,7 @@ async def _update_initial( snapshot: Union[_models.SnapshotUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4121,7 +4121,7 @@ async def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) :rtype: ~azure.mgmt.compute.v2023_10_02.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4166,7 +4166,7 @@ async def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) async def _delete_initial( self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4284,7 +4284,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-10-02")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4360,7 +4360,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Snapshot"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-10-02")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4427,7 +4427,7 @@ async def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4622,7 +4622,7 @@ def get_long_running_output(pipeline_response): async def _revoke_access_initial( self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_10_02/models/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_10_02/models/__init__.py index 697907ff3ad58..087321a1aa15d 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_10_02/models/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_10_02/models/__init__.py @@ -5,83 +5,94 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._models_py3 import AccessUri -from ._models_py3 import ApiError -from ._models_py3 import ApiErrorBase -from ._models_py3 import CopyCompletionError -from ._models_py3 import CreationData -from ._models_py3 import Disk -from ._models_py3 import DiskAccess -from ._models_py3 import DiskAccessList -from ._models_py3 import DiskAccessUpdate -from ._models_py3 import DiskEncryptionSet -from ._models_py3 import DiskEncryptionSetList -from ._models_py3 import DiskEncryptionSetUpdate -from ._models_py3 import DiskList -from ._models_py3 import DiskRestorePoint -from ._models_py3 import DiskRestorePointList -from ._models_py3 import DiskSecurityProfile -from ._models_py3 import DiskSku -from ._models_py3 import DiskUpdate -from ._models_py3 import Encryption -from ._models_py3 import EncryptionSetIdentity -from ._models_py3 import EncryptionSettingsCollection -from ._models_py3 import EncryptionSettingsElement -from ._models_py3 import ExtendedLocation -from ._models_py3 import GrantAccessData -from ._models_py3 import ImageDiskReference -from ._models_py3 import InnerError -from ._models_py3 import KeyForDiskEncryptionSet -from ._models_py3 import KeyVaultAndKeyReference -from ._models_py3 import KeyVaultAndSecretReference -from ._models_py3 import PrivateEndpoint -from ._models_py3 import PrivateEndpointConnection -from ._models_py3 import PrivateEndpointConnectionListResult -from ._models_py3 import PrivateLinkResource -from ._models_py3 import PrivateLinkResourceListResult -from ._models_py3 import PrivateLinkServiceConnectionState -from ._models_py3 import PropertyUpdatesInProgress -from ._models_py3 import ProxyOnlyResource -from ._models_py3 import PurchasePlan -from ._models_py3 import Resource -from ._models_py3 import ResourceUriList -from ._models_py3 import ResourceWithOptionalLocation -from ._models_py3 import ShareInfoElement -from ._models_py3 import Snapshot -from ._models_py3 import SnapshotList -from ._models_py3 import SnapshotSku -from ._models_py3 import SnapshotUpdate -from ._models_py3 import SourceVault -from ._models_py3 import SubResource -from ._models_py3 import SubResourceReadOnly -from ._models_py3 import SupportedCapabilities -from ._models_py3 import SystemData -from ._models_py3 import UserAssignedIdentitiesValue +from typing import TYPE_CHECKING -from ._compute_management_client_enums import AccessLevel -from ._compute_management_client_enums import Architecture -from ._compute_management_client_enums import CopyCompletionErrorReason -from ._compute_management_client_enums import DataAccessAuthMode -from ._compute_management_client_enums import DiskCreateOption -from ._compute_management_client_enums import DiskEncryptionSetIdentityType -from ._compute_management_client_enums import DiskEncryptionSetType -from ._compute_management_client_enums import DiskSecurityTypes -from ._compute_management_client_enums import DiskState -from ._compute_management_client_enums import DiskStorageAccountTypes -from ._compute_management_client_enums import EncryptionType -from ._compute_management_client_enums import ExtendedLocationTypes -from ._compute_management_client_enums import FileFormat -from ._compute_management_client_enums import HyperVGeneration -from ._compute_management_client_enums import NetworkAccessPolicy -from ._compute_management_client_enums import OperatingSystemTypes -from ._compute_management_client_enums import PrivateEndpointConnectionProvisioningState -from ._compute_management_client_enums import PrivateEndpointServiceConnectionStatus -from ._compute_management_client_enums import ProvisionedBandwidthCopyOption -from ._compute_management_client_enums import PublicNetworkAccess -from ._compute_management_client_enums import SnapshotStorageAccountTypes +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + + +from ._models_py3 import ( # type: ignore + AccessUri, + ApiError, + ApiErrorBase, + CopyCompletionError, + CreationData, + Disk, + DiskAccess, + DiskAccessList, + DiskAccessUpdate, + DiskEncryptionSet, + DiskEncryptionSetList, + DiskEncryptionSetUpdate, + DiskList, + DiskRestorePoint, + DiskRestorePointList, + DiskSecurityProfile, + DiskSku, + DiskUpdate, + Encryption, + EncryptionSetIdentity, + EncryptionSettingsCollection, + EncryptionSettingsElement, + ExtendedLocation, + GrantAccessData, + ImageDiskReference, + InnerError, + KeyForDiskEncryptionSet, + KeyVaultAndKeyReference, + KeyVaultAndSecretReference, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateEndpointConnectionListResult, + PrivateLinkResource, + PrivateLinkResourceListResult, + PrivateLinkServiceConnectionState, + PropertyUpdatesInProgress, + ProxyOnlyResource, + PurchasePlan, + Resource, + ResourceUriList, + ResourceWithOptionalLocation, + ShareInfoElement, + Snapshot, + SnapshotList, + SnapshotSku, + SnapshotUpdate, + SourceVault, + SubResource, + SubResourceReadOnly, + SupportedCapabilities, + SystemData, + UserAssignedIdentitiesValue, +) + +from ._compute_management_client_enums import ( # type: ignore + AccessLevel, + Architecture, + CopyCompletionErrorReason, + DataAccessAuthMode, + DiskCreateOption, + DiskEncryptionSetIdentityType, + DiskEncryptionSetType, + DiskSecurityTypes, + DiskState, + DiskStorageAccountTypes, + EncryptionType, + ExtendedLocationTypes, + FileFormat, + HyperVGeneration, + NetworkAccessPolicy, + OperatingSystemTypes, + PrivateEndpointConnectionProvisioningState, + PrivateEndpointServiceConnectionStatus, + ProvisionedBandwidthCopyOption, + PublicNetworkAccess, + SnapshotStorageAccountTypes, +) 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__ = [ @@ -159,5 +170,5 @@ "PublicNetworkAccess", "SnapshotStorageAccountTypes", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_10_02/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_10_02/models/_models_py3.py index e16a0875422b4..878aebb200376 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_10_02/models/_models_py3.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_10_02/models/_models_py3.py @@ -1,5 +1,5 @@ -# 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. @@ -12,7 +12,6 @@ from ... import _serialization if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models @@ -171,7 +170,7 @@ def __init__( self.error_message = error_message -class CreationData(_serialization.Model): # pylint: disable=too-many-instance-attributes +class CreationData(_serialization.Model): """Data used when creating a disk. Variables are only populated by the server, and will be ignored when sending a request. @@ -370,7 +369,7 @@ def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kw self.tags = tags -class Disk(Resource): # pylint: disable=too-many-instance-attributes +class Disk(Resource): """Disk resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -872,7 +871,7 @@ def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> N self.tags = tags -class DiskEncryptionSet(Resource): # pylint: disable=too-many-instance-attributes +class DiskEncryptionSet(Resource): """disk encryption set resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -1173,7 +1172,7 @@ def __init__(self, **kwargs: Any) -> None: self.type = None -class DiskRestorePoint(ProxyOnlyResource): # pylint: disable=too-many-instance-attributes +class DiskRestorePoint(ProxyOnlyResource): """Properties of disk restore point. Variables are only populated by the server, and will be ignored when sending a request. @@ -1440,7 +1439,7 @@ def __init__(self, *, name: Optional[Union[str, "_models.DiskStorageAccountTypes self.tier = None -class DiskUpdate(_serialization.Model): # pylint: disable=too-many-instance-attributes +class DiskUpdate(_serialization.Model): """Disk update resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -2564,7 +2563,7 @@ def __init__(self, **kwargs: Any) -> None: self.vm_uri = None -class Snapshot(Resource): # pylint: disable=too-many-instance-attributes +class Snapshot(Resource): """Snapshot resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -2902,7 +2901,7 @@ def __init__( self.tier = None -class SnapshotUpdate(_serialization.Model): # pylint: disable=too-many-instance-attributes +class SnapshotUpdate(_serialization.Model): """Snapshot update resource. :ivar tags: Resource tags. diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_10_02/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_10_02/operations/__init__.py index 8ca1cc2598c3b..0e0c2d8aaf8d4 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_10_02/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_10_02/operations/__init__.py @@ -5,15 +5,21 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._operations import DisksOperations -from ._operations import DiskAccessesOperations -from ._operations import DiskEncryptionSetsOperations -from ._operations import DiskRestorePointOperations -from ._operations import SnapshotsOperations +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._operations import DisksOperations # type: ignore +from ._operations import DiskAccessesOperations # type: ignore +from ._operations import DiskEncryptionSetsOperations # type: ignore +from ._operations import DiskRestorePointOperations # type: ignore +from ._operations import SnapshotsOperations # 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__ = [ @@ -23,5 +29,5 @@ "DiskRestorePointOperations", "SnapshotsOperations", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_10_02/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_10_02/operations/_operations.py index b67da00fe4879..48c5a01a727ff 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_10_02/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2023_10_02/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. @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -36,7 +36,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, HttpResponse], T, Dict[str, Any]], Any]] @@ -1280,7 +1280,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.Disk, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1464,7 +1464,7 @@ def get_long_running_output(pipeline_response): def _update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.DiskUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1659,7 +1659,7 @@ def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> _model :rtype: ~azure.mgmt.compute.v2023_10_02.models.Disk :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1702,7 +1702,7 @@ def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> _model return deserialized # type: ignore def _delete_initial(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1819,7 +1819,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-10-02")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1894,7 +1894,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Disk"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-10-02")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1961,7 +1961,7 @@ def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2151,7 +2151,7 @@ def get_long_running_output(pipeline_response): ) def _revoke_access_initial(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2282,7 +2282,7 @@ def _create_or_update_initial( disk_access: Union[_models.DiskAccess, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2476,7 +2476,7 @@ def _update_initial( disk_access: Union[_models.DiskAccessUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2677,7 +2677,7 @@ def get(self, resource_group_name: str, disk_access_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.compute.v2023_10_02.models.DiskAccess :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2720,7 +2720,7 @@ def get(self, resource_group_name: str, disk_access_name: str, **kwargs: Any) -> return deserialized # type: ignore def _delete_initial(self, resource_group_name: str, disk_access_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2837,7 +2837,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-10-02")) cls: ClsType[_models.DiskAccessList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2912,7 +2912,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.DiskAccess"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-10-02")) cls: ClsType[_models.DiskAccessList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2988,7 +2988,7 @@ def get_private_link_resources( :rtype: ~azure.mgmt.compute.v2023_10_02.models.PrivateLinkResourceListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3038,7 +3038,7 @@ def _update_a_private_endpoint_connection_initial( # pylint: disable=name-too-l private_endpoint_connection: Union[_models.PrivateEndpointConnection, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3266,7 +3266,7 @@ def get_a_private_endpoint_connection( :rtype: ~azure.mgmt.compute.v2023_10_02.models.PrivateEndpointConnection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3312,7 +3312,7 @@ def get_a_private_endpoint_connection( def _delete_a_private_endpoint_connection_initial( # pylint: disable=name-too-long self, resource_group_name: str, disk_access_name: str, private_endpoint_connection_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3443,7 +3443,7 @@ def list_private_endpoint_connections( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-10-02")) cls: ClsType[_models.PrivateEndpointConnectionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3533,7 +3533,7 @@ def _create_or_update_initial( disk_encryption_set: Union[_models.DiskEncryptionSet, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3731,7 +3731,7 @@ def _update_initial( disk_encryption_set: Union[_models.DiskEncryptionSetUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3937,7 +3937,7 @@ def get(self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: :rtype: ~azure.mgmt.compute.v2023_10_02.models.DiskEncryptionSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3982,7 +3982,7 @@ def get(self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: def _delete_initial( self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4099,7 +4099,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-10-02")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4174,7 +4174,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.DiskEncryptionSet"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-10-02")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4256,7 +4256,7 @@ def list_associated_resources( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-10-02")) cls: ClsType[_models.ResourceUriList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4364,7 +4364,7 @@ def get( :rtype: ~azure.mgmt.compute.v2023_10_02.models.DiskRestorePoint :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4432,7 +4432,7 @@ def list_by_restore_point( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-10-02")) cls: ClsType[_models.DiskRestorePointList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4504,7 +4504,7 @@ def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4723,7 +4723,7 @@ def _revoke_access_initial( disk_restore_point_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4865,7 +4865,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, snapshot_name: str, snapshot: Union[_models.Snapshot, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5053,7 +5053,7 @@ def _update_initial( snapshot: Union[_models.SnapshotUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5254,7 +5254,7 @@ def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> _m :rtype: ~azure.mgmt.compute.v2023_10_02.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5297,7 +5297,7 @@ def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> _m return deserialized # type: ignore def _delete_initial(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5414,7 +5414,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-10-02")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5489,7 +5489,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Snapshot"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-10-02")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5556,7 +5556,7 @@ def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5746,7 +5746,7 @@ def get_long_running_output(pipeline_response): ) def _revoke_access_initial(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_01/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_01/__init__.py index 3b1b6244b2375..ab7c46e8991db 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_01/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_01/__init__.py @@ -5,15 +5,21 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._compute_management_client import ComputeManagementClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._compute_management_client import ComputeManagementClient # 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__ = [ "ComputeManagementClient", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_01/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_01/_compute_management_client.py index 70afb6414058b..5c98670f700b9 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_01/_compute_management_client.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_01/_compute_management_client.py @@ -48,11 +48,10 @@ ) if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class ComputeManagementClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes +class ComputeManagementClient: # pylint: disable=too-many-instance-attributes """Compute Client. :ivar operations: Operations operations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_01/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_01/_configuration.py index 8ab5cfc8e6643..0aadbc5ebb854 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_01/_configuration.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_01/_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 ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ComputeManagementClient. Note that all parameters used to create this instance are saved as instance diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_01/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_01/_version.py index d79b2760319c5..e5754a47ce68f 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_01/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "33.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_01/aio/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_01/aio/__init__.py index 0715f50185586..d3fd1ba93379a 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_01/aio/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_01/aio/__init__.py @@ -5,12 +5,18 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._compute_management_client import ComputeManagementClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._compute_management_client import ComputeManagementClient # 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__ = [ "ComputeManagementClient", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_01/aio/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_01/aio/_compute_management_client.py index db04e240864a5..c3d6eec3b7084 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_01/aio/_compute_management_client.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_01/aio/_compute_management_client.py @@ -48,11 +48,10 @@ ) if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class ComputeManagementClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes +class ComputeManagementClient: # pylint: disable=too-many-instance-attributes """Compute Client. :ivar operations: Operations operations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_01/aio/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_01/aio/_configuration.py index c0a79058c3df6..ea1b15a0b9d01 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_01/aio/_configuration.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_01/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 ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ComputeManagementClient. Note that all parameters used to create this instance are saved as instance diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_01/aio/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_01/aio/operations/__init__.py index 3cc8e8e7a73a8..5cc9a11e23416 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_01/aio/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_01/aio/operations/__init__.py @@ -5,36 +5,42 @@ # Code generated by Microsoft (R) AutoRest 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 UsageOperations -from ._operations import VirtualMachineSizesOperations -from ._operations import VirtualMachineScaleSetsOperations -from ._operations import VirtualMachineScaleSetExtensionsOperations -from ._operations import VirtualMachineScaleSetRollingUpgradesOperations -from ._operations import VirtualMachineScaleSetVMExtensionsOperations -from ._operations import VirtualMachineScaleSetVMsOperations -from ._operations import VirtualMachineExtensionsOperations -from ._operations import VirtualMachinesOperations -from ._operations import VirtualMachineImagesOperations -from ._operations import VirtualMachineImagesEdgeZoneOperations -from ._operations import VirtualMachineExtensionImagesOperations -from ._operations import AvailabilitySetsOperations -from ._operations import ProximityPlacementGroupsOperations -from ._operations import DedicatedHostGroupsOperations -from ._operations import DedicatedHostsOperations -from ._operations import SshPublicKeysOperations -from ._operations import ImagesOperations -from ._operations import RestorePointCollectionsOperations -from ._operations import RestorePointsOperations -from ._operations import CapacityReservationGroupsOperations -from ._operations import CapacityReservationsOperations -from ._operations import LogAnalyticsOperations -from ._operations import VirtualMachineRunCommandsOperations -from ._operations import VirtualMachineScaleSetVMRunCommandsOperations +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 UsageOperations # type: ignore +from ._operations import VirtualMachineSizesOperations # type: ignore +from ._operations import VirtualMachineScaleSetsOperations # type: ignore +from ._operations import VirtualMachineScaleSetExtensionsOperations # type: ignore +from ._operations import VirtualMachineScaleSetRollingUpgradesOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMExtensionsOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMsOperations # type: ignore +from ._operations import VirtualMachineExtensionsOperations # type: ignore +from ._operations import VirtualMachinesOperations # type: ignore +from ._operations import VirtualMachineImagesOperations # type: ignore +from ._operations import VirtualMachineImagesEdgeZoneOperations # type: ignore +from ._operations import VirtualMachineExtensionImagesOperations # type: ignore +from ._operations import AvailabilitySetsOperations # type: ignore +from ._operations import ProximityPlacementGroupsOperations # type: ignore +from ._operations import DedicatedHostGroupsOperations # type: ignore +from ._operations import DedicatedHostsOperations # type: ignore +from ._operations import SshPublicKeysOperations # type: ignore +from ._operations import ImagesOperations # type: ignore +from ._operations import RestorePointCollectionsOperations # type: ignore +from ._operations import RestorePointsOperations # type: ignore +from ._operations import CapacityReservationGroupsOperations # type: ignore +from ._operations import CapacityReservationsOperations # type: ignore +from ._operations import LogAnalyticsOperations # type: ignore +from ._operations import VirtualMachineRunCommandsOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMRunCommandsOperations # 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__ = [ @@ -65,5 +71,5 @@ "VirtualMachineRunCommandsOperations", "VirtualMachineScaleSetVMRunCommandsOperations", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_01/aio/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_01/aio/operations/_operations.py index 5e779cd6bbd8a..e04bf500ce2c4 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_01/aio/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_01/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. @@ -8,21 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import ( - Any, - AsyncIterable, - AsyncIterator, - Callable, - Dict, - IO, - List, - Optional, - Type, - TypeVar, - Union, - cast, - overload, -) +from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, List, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -231,7 +217,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]] @@ -272,7 +258,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.ComputeOperationValue"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.ComputeOperationListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -369,7 +355,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.Usage"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.ListUsagesResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -469,7 +455,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.VirtualMa api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -570,7 +556,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> AsyncIterable["_mode api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -641,7 +627,7 @@ async def _create_or_update_initial( if_none_match: Optional[str] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -871,7 +857,7 @@ async def _update_initial( if_none_match: Optional[str] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1095,7 +1081,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, *, force_deletion: Optional[bool] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1224,7 +1210,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2024_03_01.models.VirtualMachineScaleSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1276,7 +1262,7 @@ async def _deallocate_initial( hibernate: Optional[bool] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1491,7 +1477,7 @@ async def _delete_instances_initial( force_deletion: Optional[bool] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1699,7 +1685,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2024_03_01.models.VirtualMachineScaleSetInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1759,7 +1745,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1838,7 +1824,7 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.VirtualMachineScaleS api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.VirtualMachineScaleSetListWithLinkResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1921,7 +1907,7 @@ def list_skus( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.VirtualMachineScaleSetListSkusResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1987,6 +1973,7 @@ async def get_next(next_link=None): def get_os_upgrade_history( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> AsyncIterable["_models.UpgradeOperationHistoricalStatusInfo"]: + # pylint: disable=line-too-long """Gets list of OS upgrades on a VM scale set instance. :param resource_group_name: The name of the resource group. Required. @@ -2005,7 +1992,7 @@ def get_os_upgrade_history( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.VirtualMachineScaleSetListOSUpgradeHistory] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2076,7 +2063,7 @@ async def _power_off_initial( skip_shutdown: bool = False, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2289,7 +2276,7 @@ async def _restart_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2478,7 +2465,7 @@ async def _start_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2663,7 +2650,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _reapply_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2778,7 +2765,7 @@ async def _redeploy_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2970,7 +2957,7 @@ async def _perform_maintenance_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3168,7 +3155,7 @@ async def _update_instances_initial( vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3354,7 +3341,7 @@ async def _reimage_initial( vm_scale_set_reimage_input: Optional[Union[_models.VirtualMachineScaleSetReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3547,7 +3534,7 @@ async def _reimage_all_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3739,7 +3726,7 @@ async def _approve_rolling_upgrade_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3958,7 +3945,7 @@ async def force_recovery_service_fabric_platform_update_domain_walk( # pylint: :rtype: ~azure.mgmt.compute.v2024_03_01.models.RecoveryWalkResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4004,7 +3991,7 @@ async def force_recovery_service_fabric_platform_update_domain_walk( # pylint: return deserialized # type: ignore @overload - async def convert_to_single_placement_group( # pylint: disable=inconsistent-return-statements + async def convert_to_single_placement_group( self, resource_group_name: str, vm_scale_set_name: str, @@ -4032,7 +4019,7 @@ async def convert_to_single_placement_group( # pylint: disable=inconsistent-ret """ @overload - async def convert_to_single_placement_group( # pylint: disable=inconsistent-return-statements + async def convert_to_single_placement_group( self, resource_group_name: str, vm_scale_set_name: str, @@ -4059,7 +4046,7 @@ async def convert_to_single_placement_group( # pylint: disable=inconsistent-ret """ @distributed_trace_async - async def convert_to_single_placement_group( # pylint: disable=inconsistent-return-statements + async def convert_to_single_placement_group( self, resource_group_name: str, vm_scale_set_name: str, @@ -4082,7 +4069,7 @@ async def convert_to_single_placement_group( # pylint: disable=inconsistent-ret :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4139,7 +4126,7 @@ async def _set_orchestration_service_state_initial( parameters: Union[_models.OrchestrationServiceStateInput, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4347,7 +4334,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtension, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4558,7 +4545,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtensionUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4765,7 +4752,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, vmss_extension_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4895,7 +4882,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2024_03_01.models.VirtualMachineScaleSetExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4961,7 +4948,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.VirtualMachineScaleSetExtensionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5047,7 +5034,7 @@ def __init__(self, *args, **kwargs) -> None: async def _cancel_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5151,7 +5138,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_os_upgrade_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5257,7 +5244,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_extension_upgrade_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5374,7 +5361,7 @@ async def get_latest( :rtype: ~azure.mgmt.compute.v2024_03_01.models.RollingUpgradeStatusInfo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5446,7 +5433,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetVMExtension, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5666,7 +5653,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetVMExtensionUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5881,7 +5868,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, vm_extension_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6017,7 +6004,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2024_03_01.models.VirtualMachineScaleSetVMExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6086,7 +6073,7 @@ async def list( :rtype: ~azure.mgmt.compute.v2024_03_01.models.VirtualMachineScaleSetVMExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6163,7 +6150,7 @@ async def _reimage_initial( ] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6362,7 +6349,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _reimage_all_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6471,7 +6458,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _approve_rolling_upgrade_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6582,7 +6569,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _deallocate_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6700,7 +6687,7 @@ async def _update_initial( if_none_match: Optional[str] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6945,7 +6932,7 @@ async def _delete_initial( force_deletion: Optional[bool] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7087,7 +7074,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2024_03_01.models.VirtualMachineScaleSetVM :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7147,7 +7134,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2024_03_01.models.VirtualMachineScaleSetVMInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7229,7 +7216,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.VirtualMachineScaleSetVMListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7303,7 +7290,7 @@ async def _power_off_initial( skip_shutdown: bool = False, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7425,7 +7412,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _restart_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7533,7 +7520,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7641,7 +7628,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _redeploy_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7774,7 +7761,7 @@ async def retrieve_boot_diagnostics_data( :rtype: ~azure.mgmt.compute.v2024_03_01.models.RetrieveBootDiagnosticsDataResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7821,7 +7808,7 @@ async def retrieve_boot_diagnostics_data( async def _perform_maintenance_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7927,7 +7914,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace_async - async def simulate_eviction( # pylint: disable=inconsistent-return-statements + async def simulate_eviction( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: """The operation to simulate the eviction of spot virtual machine in a VM scale set. @@ -7942,7 +7929,7 @@ async def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7989,7 +7976,7 @@ async def _attach_detach_data_disks_initial( parameters: Union[_models.AttachDetachDataDisksRequest, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8203,7 +8190,7 @@ async def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8430,7 +8417,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineExtension, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8640,7 +8627,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineExtensionUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8846,7 +8833,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_name: str, vm_extension_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8976,7 +8963,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2024_03_01.models.VirtualMachineExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9036,7 +9023,7 @@ async def list( :rtype: ~azure.mgmt.compute.v2024_03_01.models.VirtualMachineExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9118,7 +9105,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> AsyncIterable["_mode api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9186,7 +9173,7 @@ async def _capture_initial( parameters: Union[_models.VirtualMachineCaptureParameters, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9387,7 +9374,7 @@ async def _create_or_update_initial( if_none_match: Optional[str] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9620,7 +9607,7 @@ async def _update_initial( if_none_match: Optional[str] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9843,7 +9830,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_name: str, *, force_deletion: Optional[bool] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9974,7 +9961,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2024_03_01.models.VirtualMachine :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10031,7 +10018,7 @@ async def instance_view( :rtype: ~azure.mgmt.compute.v2024_03_01.models.VirtualMachineInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10076,7 +10063,7 @@ async def instance_view( async def _convert_to_managed_disks_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10181,7 +10168,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _deallocate_initial( self, resource_group_name: str, vm_name: str, *, hibernate: Optional[bool] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10288,9 +10275,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace_async - async def generalize( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, vm_name: str, **kwargs: Any - ) -> None: + async def generalize(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> None: """Sets the OS state of the virtual machine to generalized. It is recommended to sysprep the virtual machine before performing this operation. For Windows, please refer to `Create a managed image of a generalized VM in Azure @@ -10306,7 +10291,7 @@ async def generalize( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10353,6 +10338,7 @@ def list( expand: Optional[Union[str, _models.ExpandTypeForListVMs]] = None, **kwargs: Any ) -> AsyncIterable["_models.VirtualMachine"]: + # pylint: disable=line-too-long """Lists all of the virtual machines in the specified resource group. Use the nextLink property in the response to get the next page of virtual machines. @@ -10378,7 +10364,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10450,6 +10436,7 @@ def list_all( expand: Optional[Union[str, _models.ExpandTypesForListVMs]] = None, **kwargs: Any ) -> AsyncIterable["_models.VirtualMachine"]: + # pylint: disable=line-too-long """Lists all of the virtual machines in the specified subscription. Use the nextLink property in the response to get the next page of virtual machines. @@ -10476,7 +10463,7 @@ def list_all( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10561,7 +10548,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10626,7 +10613,7 @@ async def get_next(next_link=None): async def _power_off_initial( self, resource_group_name: str, vm_name: str, *, skip_shutdown: bool = False, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10735,7 +10722,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _reapply_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10835,7 +10822,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _restart_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10935,7 +10922,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _start_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11035,7 +11022,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _redeploy_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11141,7 +11128,7 @@ async def _reimage_initial( parameters: Optional[Union[_models.VirtualMachineReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11360,7 +11347,7 @@ async def retrieve_boot_diagnostics_data( :rtype: ~azure.mgmt.compute.v2024_03_01.models.RetrieveBootDiagnosticsDataResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11406,7 +11393,7 @@ async def retrieve_boot_diagnostics_data( async def _perform_maintenance_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11508,9 +11495,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace_async - async def simulate_eviction( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, vm_name: str, **kwargs: Any - ) -> None: + async def simulate_eviction(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> None: """The operation to simulate the eviction of spot virtual machine. :param resource_group_name: The name of the resource group. Required. @@ -11521,7 +11506,7 @@ async def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11562,7 +11547,7 @@ async def simulate_eviction( # pylint: disable=inconsistent-return-statements async def _assess_patches_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11678,7 +11663,7 @@ async def _install_patches_initial( install_patches_input: Union[_models.VirtualMachineInstallPatchesParameters, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11876,7 +11861,7 @@ async def _attach_detach_data_disks_initial( parameters: Union[_models.AttachDetachDataDisksRequest, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12077,7 +12062,7 @@ async def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12305,7 +12290,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2024_03_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12384,7 +12369,7 @@ async def list( :rtype: list[~azure.mgmt.compute.v2024_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12445,7 +12430,7 @@ async def list_offers( :rtype: list[~azure.mgmt.compute.v2024_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12497,7 +12482,7 @@ async def list_publishers(self, location: str, **kwargs: Any) -> List[_models.Vi :rtype: list[~azure.mgmt.compute.v2024_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12554,7 +12539,7 @@ async def list_skus( :rtype: list[~azure.mgmt.compute.v2024_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12611,7 +12596,7 @@ async def list_by_edge_zone( :rtype: ~azure.mgmt.compute.v2024_03_01.models.VmImagesInEdgeZoneListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12696,7 +12681,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2024_03_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12781,7 +12766,7 @@ async def list( :rtype: list[~azure.mgmt.compute.v2024_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12846,7 +12831,7 @@ async def list_offers( :rtype: list[~azure.mgmt.compute.v2024_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12903,7 +12888,7 @@ async def list_publishers( :rtype: list[~azure.mgmt.compute.v2024_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12964,7 +12949,7 @@ async def list_skus( :rtype: list[~azure.mgmt.compute.v2024_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13047,7 +13032,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2024_03_01.models.VirtualMachineExtensionImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13105,7 +13090,7 @@ async def list_types( :rtype: list[~azure.mgmt.compute.v2024_03_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13177,7 +13162,7 @@ async def list_versions( :rtype: list[~azure.mgmt.compute.v2024_03_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13317,7 +13302,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2024_03_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13444,7 +13429,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2024_03_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13499,9 +13484,7 @@ async def update( return deserialized # type: ignore @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, availability_set_name: str, **kwargs: Any - ) -> None: + async def delete(self, resource_group_name: str, availability_set_name: str, **kwargs: Any) -> None: """Delete an availability set. :param resource_group_name: The name of the resource group. Required. @@ -13512,7 +13495,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13562,7 +13545,7 @@ async def get(self, resource_group_name: str, availability_set_name: str, **kwar :rtype: ~azure.mgmt.compute.v2024_03_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13624,7 +13607,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13702,7 +13685,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13785,7 +13768,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13943,7 +13926,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2024_03_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14073,7 +14056,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2024_03_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14128,9 +14111,7 @@ async def update( return deserialized # type: ignore @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, proximity_placement_group_name: str, **kwargs: Any - ) -> None: + async def delete(self, resource_group_name: str, proximity_placement_group_name: str, **kwargs: Any) -> None: """Delete a proximity placement group. :param resource_group_name: The name of the resource group. Required. @@ -14141,7 +14122,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14201,7 +14182,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2024_03_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14260,7 +14241,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Proximit api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14340,7 +14321,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14501,7 +14482,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2024_03_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14628,7 +14609,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2024_03_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14683,9 +14664,7 @@ async def update( return deserialized # type: ignore @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, host_group_name: str, **kwargs: Any - ) -> None: + async def delete(self, resource_group_name: str, host_group_name: str, **kwargs: Any) -> None: """Delete a dedicated host group. :param resource_group_name: The name of the resource group. Required. @@ -14696,7 +14675,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14758,7 +14737,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2024_03_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14821,7 +14800,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14898,7 +14877,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Dedicate api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14987,7 +14966,7 @@ async def _create_or_update_initial( parameters: Union[_models.DedicatedHost, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15191,7 +15170,7 @@ async def _update_initial( parameters: Union[_models.DedicatedHostUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15390,7 +15369,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15521,7 +15500,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2024_03_01.models.DedicatedHost :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15587,7 +15566,7 @@ def list_by_host_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.DedicatedHostListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15652,7 +15631,7 @@ async def get_next(next_link=None): async def _restart_initial( self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15763,7 +15742,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _redeploy_initial( self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15899,7 +15878,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.DedicatedHostSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16000,7 +15979,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.SshPubli api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16081,7 +16060,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16215,7 +16194,7 @@ async def create( :rtype: ~azure.mgmt.compute.v2024_03_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16343,7 +16322,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2024_03_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16398,9 +16377,7 @@ async def update( return deserialized # type: ignore @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, ssh_public_key_name: str, **kwargs: Any - ) -> None: + async def delete(self, resource_group_name: str, ssh_public_key_name: str, **kwargs: Any) -> None: """Delete an SSH public key. :param resource_group_name: The name of the resource group. Required. @@ -16411,7 +16388,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16463,7 +16440,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2024_03_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16585,7 +16562,7 @@ async def generate_key_pair( :rtype: ~azure.mgmt.compute.v2024_03_01.models.SshPublicKeyGenerateKeyPairResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16666,7 +16643,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, image_name: str, parameters: Union[_models.Image, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16848,7 +16825,7 @@ async def _update_initial( parameters: Union[_models.ImageUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17028,7 +17005,7 @@ def get_long_running_output(pipeline_response): ) async def _delete_initial(self, resource_group_name: str, image_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17143,7 +17120,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2024_03_01.models.Image :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17203,7 +17180,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17279,7 +17256,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Image"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17441,7 +17418,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2024_03_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17571,7 +17548,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2024_03_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17628,7 +17605,7 @@ async def update( async def _delete_initial( self, resource_group_name: str, restore_point_collection_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17754,7 +17731,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2024_03_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17815,7 +17792,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.RestorePointCollectionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17894,7 +17871,7 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.RestorePointCollecti api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.RestorePointCollectionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17983,7 +17960,7 @@ async def _create_initial( parameters: Union[_models.RestorePoint, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18182,7 +18159,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, restore_point_collection_name: str, restore_point_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18312,7 +18289,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2024_03_01.models.RestorePoint :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18456,7 +18433,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2024_03_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18589,7 +18566,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2024_03_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18644,9 +18621,7 @@ async def update( return deserialized # type: ignore @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, capacity_reservation_group_name: str, **kwargs: Any - ) -> None: + async def delete(self, resource_group_name: str, capacity_reservation_group_name: str, **kwargs: Any) -> None: """The operation to delete a capacity reservation group. This operation is allowed only if all the associated resources are disassociated from the reservation group and all capacity reservations under the reservation group have also been deleted. Please refer to @@ -18660,7 +18635,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18724,7 +18699,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2024_03_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18798,7 +18773,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.CapacityReservationGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18898,7 +18873,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.CapacityReservationGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18989,7 +18964,7 @@ async def _create_or_update_initial( parameters: Union[_models.CapacityReservation, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19199,7 +19174,7 @@ async def _update_initial( parameters: Union[_models.CapacityReservationUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19402,7 +19377,7 @@ async def _delete_initial( capacity_reservation_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19540,7 +19515,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2024_03_01.models.CapacityReservation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19606,7 +19581,7 @@ def list_by_capacity_reservation_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.CapacityReservationListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19692,7 +19667,7 @@ def __init__(self, *args, **kwargs) -> None: async def _export_request_rate_by_interval_initial( self, location: str, parameters: Union[_models.RequestRateByIntervalInput, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19870,7 +19845,7 @@ def get_long_running_output(pipeline_response): async def _export_throttled_requests_initial( self, location: str, parameters: Union[_models.ThrottledRequestsInput, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20081,7 +20056,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.RunComman api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.RunCommandListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20154,7 +20129,7 @@ async def get(self, location: str, command_id: str, **kwargs: Any) -> _models.Ru :rtype: ~azure.mgmt.compute.v2024_03_01.models.RunCommandDocument :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20204,7 +20179,7 @@ async def _create_or_update_initial( run_command: Union[_models.VirtualMachineRunCommand, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20413,7 +20388,7 @@ async def _update_initial( run_command: Union[_models.VirtualMachineRunCommandUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20618,7 +20593,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_name: str, run_command_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20748,7 +20723,7 @@ async def get_by_virtual_machine( :rtype: ~azure.mgmt.compute.v2024_03_01.models.VirtualMachineRunCommand :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20816,7 +20791,7 @@ def list_by_virtual_machine( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.VirtualMachineRunCommandsListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20909,7 +20884,7 @@ async def _create_or_update_initial( run_command: Union[_models.VirtualMachineRunCommand, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21127,7 +21102,7 @@ async def _update_initial( run_command: Union[_models.VirtualMachineRunCommandUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21340,7 +21315,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, run_command_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21476,7 +21451,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2024_03_01.models.VirtualMachineRunCommand :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21553,7 +21528,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.VirtualMachineRunCommandsListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_01/models/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_01/models/__init__.py index b61694c9ef8fc..ff662fe88b7b9 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_01/models/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_01/models/__init__.py @@ -5,369 +5,380 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._models_py3 import AdditionalCapabilities -from ._models_py3 import AdditionalUnattendContent -from ._models_py3 import AlternativeOption -from ._models_py3 import ApiEntityReference -from ._models_py3 import ApiError -from ._models_py3 import ApiErrorBase -from ._models_py3 import ApplicationProfile -from ._models_py3 import AttachDetachDataDisksRequest -from ._models_py3 import AutomaticOSUpgradePolicy -from ._models_py3 import AutomaticOSUpgradeProperties -from ._models_py3 import AutomaticRepairsPolicy -from ._models_py3 import AvailabilitySet -from ._models_py3 import AvailabilitySetListResult -from ._models_py3 import AvailabilitySetUpdate -from ._models_py3 import AvailablePatchSummary -from ._models_py3 import BillingProfile -from ._models_py3 import BootDiagnostics -from ._models_py3 import BootDiagnosticsInstanceView -from ._models_py3 import CapacityReservation -from ._models_py3 import CapacityReservationGroup -from ._models_py3 import CapacityReservationGroupInstanceView -from ._models_py3 import CapacityReservationGroupListResult -from ._models_py3 import CapacityReservationGroupUpdate -from ._models_py3 import CapacityReservationInstanceView -from ._models_py3 import CapacityReservationInstanceViewWithName -from ._models_py3 import CapacityReservationListResult -from ._models_py3 import CapacityReservationProfile -from ._models_py3 import CapacityReservationUpdate -from ._models_py3 import CapacityReservationUtilization -from ._models_py3 import ComputeOperationListResult -from ._models_py3 import ComputeOperationValue -from ._models_py3 import DataDisk -from ._models_py3 import DataDiskImage -from ._models_py3 import DataDisksToAttach -from ._models_py3 import DataDisksToDetach -from ._models_py3 import DedicatedHost -from ._models_py3 import DedicatedHostAllocatableVM -from ._models_py3 import DedicatedHostAvailableCapacity -from ._models_py3 import DedicatedHostGroup -from ._models_py3 import DedicatedHostGroupInstanceView -from ._models_py3 import DedicatedHostGroupListResult -from ._models_py3 import DedicatedHostGroupPropertiesAdditionalCapabilities -from ._models_py3 import DedicatedHostGroupUpdate -from ._models_py3 import DedicatedHostInstanceView -from ._models_py3 import DedicatedHostInstanceViewWithName -from ._models_py3 import DedicatedHostListResult -from ._models_py3 import DedicatedHostSizeListResult -from ._models_py3 import DedicatedHostUpdate -from ._models_py3 import DiagnosticsProfile -from ._models_py3 import DiffDiskSettings -from ._models_py3 import DisallowedConfiguration -from ._models_py3 import DiskEncryptionSetParameters -from ._models_py3 import DiskEncryptionSettings -from ._models_py3 import DiskInstanceView -from ._models_py3 import DiskRestorePointAttributes -from ._models_py3 import DiskRestorePointInstanceView -from ._models_py3 import DiskRestorePointReplicationStatus -from ._models_py3 import EncryptionIdentity -from ._models_py3 import EventGridAndResourceGraph -from ._models_py3 import ExtendedLocation -from ._models_py3 import HardwareProfile -from ._models_py3 import Image -from ._models_py3 import ImageDataDisk -from ._models_py3 import ImageDeprecationStatus -from ._models_py3 import ImageDisk -from ._models_py3 import ImageListResult -from ._models_py3 import ImageOSDisk -from ._models_py3 import ImageReference -from ._models_py3 import ImageStorageProfile -from ._models_py3 import ImageUpdate -from ._models_py3 import InnerError -from ._models_py3 import InstanceViewStatus -from ._models_py3 import KeyVaultKeyReference -from ._models_py3 import KeyVaultSecretReference -from ._models_py3 import LastPatchInstallationSummary -from ._models_py3 import LinuxConfiguration -from ._models_py3 import LinuxParameters -from ._models_py3 import LinuxPatchSettings -from ._models_py3 import LinuxVMGuestPatchAutomaticByPlatformSettings -from ._models_py3 import ListUsagesResult -from ._models_py3 import LogAnalyticsInputBase -from ._models_py3 import LogAnalyticsOperationResult -from ._models_py3 import LogAnalyticsOutput -from ._models_py3 import MaintenanceRedeployStatus -from ._models_py3 import ManagedDiskParameters -from ._models_py3 import NetworkInterfaceReference -from ._models_py3 import NetworkProfile -from ._models_py3 import OSDisk -from ._models_py3 import OSDiskImage -from ._models_py3 import OSImageNotificationProfile -from ._models_py3 import OSProfile -from ._models_py3 import OSProfileProvisioningData -from ._models_py3 import OrchestrationServiceStateInput -from ._models_py3 import OrchestrationServiceSummary -from ._models_py3 import PatchInstallationDetail -from ._models_py3 import PatchSettings -from ._models_py3 import Plan -from ._models_py3 import PriorityMixPolicy -from ._models_py3 import ProximityPlacementGroup -from ._models_py3 import ProximityPlacementGroupListResult -from ._models_py3 import ProximityPlacementGroupPropertiesIntent -from ._models_py3 import ProximityPlacementGroupUpdate -from ._models_py3 import ProxyAgentSettings -from ._models_py3 import ProxyResource -from ._models_py3 import PublicIPAddressSku -from ._models_py3 import PurchasePlan -from ._models_py3 import RecoveryWalkResponse -from ._models_py3 import RequestRateByIntervalInput -from ._models_py3 import ResiliencyPolicy -from ._models_py3 import ResilientVMCreationPolicy -from ._models_py3 import ResilientVMDeletionPolicy -from ._models_py3 import Resource -from ._models_py3 import ResourceSharingProfile -from ._models_py3 import ResourceWithOptionalLocation -from ._models_py3 import RestorePoint -from ._models_py3 import RestorePointCollection -from ._models_py3 import RestorePointCollectionListResult -from ._models_py3 import RestorePointCollectionSourceProperties -from ._models_py3 import RestorePointCollectionUpdate -from ._models_py3 import RestorePointEncryption -from ._models_py3 import RestorePointInstanceView -from ._models_py3 import RestorePointSourceMetadata -from ._models_py3 import RestorePointSourceVMDataDisk -from ._models_py3 import RestorePointSourceVMOSDisk -from ._models_py3 import RestorePointSourceVMStorageProfile -from ._models_py3 import RetrieveBootDiagnosticsDataResult -from ._models_py3 import RollbackStatusInfo -from ._models_py3 import RollingUpgradePolicy -from ._models_py3 import RollingUpgradeProgressInfo -from ._models_py3 import RollingUpgradeRunningStatus -from ._models_py3 import RollingUpgradeStatusInfo -from ._models_py3 import RunCommandDocument -from ._models_py3 import RunCommandDocumentBase -from ._models_py3 import RunCommandInput -from ._models_py3 import RunCommandInputParameter -from ._models_py3 import RunCommandListResult -from ._models_py3 import RunCommandManagedIdentity -from ._models_py3 import RunCommandParameterDefinition -from ._models_py3 import RunCommandResult -from ._models_py3 import ScaleInPolicy -from ._models_py3 import ScheduledEventsAdditionalPublishingTargets -from ._models_py3 import ScheduledEventsPolicy -from ._models_py3 import ScheduledEventsProfile -from ._models_py3 import SecurityPostureReference -from ._models_py3 import SecurityPostureReferenceUpdate -from ._models_py3 import SecurityProfile -from ._models_py3 import ServiceArtifactReference -from ._models_py3 import Sku -from ._models_py3 import SpotRestorePolicy -from ._models_py3 import SshConfiguration -from ._models_py3 import SshGenerateKeyPairInputParameters -from ._models_py3 import SshPublicKey -from ._models_py3 import SshPublicKeyGenerateKeyPairResult -from ._models_py3 import SshPublicKeyResource -from ._models_py3 import SshPublicKeyUpdateResource -from ._models_py3 import SshPublicKeysGroupListResult -from ._models_py3 import StorageProfile -from ._models_py3 import SubResource -from ._models_py3 import SubResourceReadOnly -from ._models_py3 import SubResourceWithColocationStatus -from ._models_py3 import SystemData -from ._models_py3 import TerminateNotificationProfile -from ._models_py3 import ThrottledRequestsInput -from ._models_py3 import UefiSettings -from ._models_py3 import UpdateResource -from ._models_py3 import UpgradeOperationHistoricalStatusInfo -from ._models_py3 import UpgradeOperationHistoricalStatusInfoProperties -from ._models_py3 import UpgradeOperationHistoryStatus -from ._models_py3 import UpgradePolicy -from ._models_py3 import Usage -from ._models_py3 import UsageName -from ._models_py3 import UserAssignedIdentitiesValue -from ._models_py3 import UserInitiatedReboot -from ._models_py3 import UserInitiatedRedeploy -from ._models_py3 import VMDiskSecurityProfile -from ._models_py3 import VMGalleryApplication -from ._models_py3 import VMScaleSetConvertToSinglePlacementGroupInput -from ._models_py3 import VMSizeProperties -from ._models_py3 import VaultCertificate -from ._models_py3 import VaultSecretGroup -from ._models_py3 import VirtualHardDisk -from ._models_py3 import VirtualMachine -from ._models_py3 import VirtualMachineAgentInstanceView -from ._models_py3 import VirtualMachineAssessPatchesResult -from ._models_py3 import VirtualMachineCaptureParameters -from ._models_py3 import VirtualMachineCaptureResult -from ._models_py3 import VirtualMachineExtension -from ._models_py3 import VirtualMachineExtensionHandlerInstanceView -from ._models_py3 import VirtualMachineExtensionImage -from ._models_py3 import VirtualMachineExtensionInstanceView -from ._models_py3 import VirtualMachineExtensionUpdate -from ._models_py3 import VirtualMachineExtensionsListResult -from ._models_py3 import VirtualMachineHealthStatus -from ._models_py3 import VirtualMachineIdentity -from ._models_py3 import VirtualMachineImage -from ._models_py3 import VirtualMachineImageFeature -from ._models_py3 import VirtualMachineImageResource -from ._models_py3 import VirtualMachineInstallPatchesParameters -from ._models_py3 import VirtualMachineInstallPatchesResult -from ._models_py3 import VirtualMachineInstanceView -from ._models_py3 import VirtualMachineIpTag -from ._models_py3 import VirtualMachineListResult -from ._models_py3 import VirtualMachineNetworkInterfaceConfiguration -from ._models_py3 import VirtualMachineNetworkInterfaceDnsSettingsConfiguration -from ._models_py3 import VirtualMachineNetworkInterfaceIPConfiguration -from ._models_py3 import VirtualMachinePatchStatus -from ._models_py3 import VirtualMachinePublicIPAddressConfiguration -from ._models_py3 import VirtualMachinePublicIPAddressDnsSettingsConfiguration -from ._models_py3 import VirtualMachineReimageParameters -from ._models_py3 import VirtualMachineRunCommand -from ._models_py3 import VirtualMachineRunCommandInstanceView -from ._models_py3 import VirtualMachineRunCommandScriptSource -from ._models_py3 import VirtualMachineRunCommandUpdate -from ._models_py3 import VirtualMachineRunCommandsListResult -from ._models_py3 import VirtualMachineScaleSet -from ._models_py3 import VirtualMachineScaleSetDataDisk -from ._models_py3 import VirtualMachineScaleSetExtension -from ._models_py3 import VirtualMachineScaleSetExtensionListResult -from ._models_py3 import VirtualMachineScaleSetExtensionProfile -from ._models_py3 import VirtualMachineScaleSetExtensionUpdate -from ._models_py3 import VirtualMachineScaleSetHardwareProfile -from ._models_py3 import VirtualMachineScaleSetIPConfiguration -from ._models_py3 import VirtualMachineScaleSetIdentity -from ._models_py3 import VirtualMachineScaleSetInstanceView -from ._models_py3 import VirtualMachineScaleSetInstanceViewStatusesSummary -from ._models_py3 import VirtualMachineScaleSetIpTag -from ._models_py3 import VirtualMachineScaleSetListOSUpgradeHistory -from ._models_py3 import VirtualMachineScaleSetListResult -from ._models_py3 import VirtualMachineScaleSetListSkusResult -from ._models_py3 import VirtualMachineScaleSetListWithLinkResult -from ._models_py3 import VirtualMachineScaleSetManagedDiskParameters -from ._models_py3 import VirtualMachineScaleSetNetworkConfiguration -from ._models_py3 import VirtualMachineScaleSetNetworkConfigurationDnsSettings -from ._models_py3 import VirtualMachineScaleSetNetworkProfile -from ._models_py3 import VirtualMachineScaleSetOSDisk -from ._models_py3 import VirtualMachineScaleSetOSProfile -from ._models_py3 import VirtualMachineScaleSetPublicIPAddressConfiguration -from ._models_py3 import VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings -from ._models_py3 import VirtualMachineScaleSetReimageParameters -from ._models_py3 import VirtualMachineScaleSetSku -from ._models_py3 import VirtualMachineScaleSetSkuCapacity -from ._models_py3 import VirtualMachineScaleSetStorageProfile -from ._models_py3 import VirtualMachineScaleSetUpdate -from ._models_py3 import VirtualMachineScaleSetUpdateIPConfiguration -from ._models_py3 import VirtualMachineScaleSetUpdateNetworkConfiguration -from ._models_py3 import VirtualMachineScaleSetUpdateNetworkProfile -from ._models_py3 import VirtualMachineScaleSetUpdateOSDisk -from ._models_py3 import VirtualMachineScaleSetUpdateOSProfile -from ._models_py3 import VirtualMachineScaleSetUpdatePublicIPAddressConfiguration -from ._models_py3 import VirtualMachineScaleSetUpdateStorageProfile -from ._models_py3 import VirtualMachineScaleSetUpdateVMProfile -from ._models_py3 import VirtualMachineScaleSetVM -from ._models_py3 import VirtualMachineScaleSetVMExtension -from ._models_py3 import VirtualMachineScaleSetVMExtensionUpdate -from ._models_py3 import VirtualMachineScaleSetVMExtensionsListResult -from ._models_py3 import VirtualMachineScaleSetVMExtensionsSummary -from ._models_py3 import VirtualMachineScaleSetVMInstanceIDs -from ._models_py3 import VirtualMachineScaleSetVMInstanceRequiredIDs -from ._models_py3 import VirtualMachineScaleSetVMInstanceView -from ._models_py3 import VirtualMachineScaleSetVMListResult -from ._models_py3 import VirtualMachineScaleSetVMNetworkProfileConfiguration -from ._models_py3 import VirtualMachineScaleSetVMProfile -from ._models_py3 import VirtualMachineScaleSetVMProtectionPolicy -from ._models_py3 import VirtualMachineScaleSetVMReimageParameters -from ._models_py3 import VirtualMachineSize -from ._models_py3 import VirtualMachineSizeListResult -from ._models_py3 import VirtualMachineSoftwarePatchProperties -from ._models_py3 import VirtualMachineStatusCodeCount -from ._models_py3 import VirtualMachineUpdate -from ._models_py3 import VmImagesInEdgeZoneListResult -from ._models_py3 import WinRMConfiguration -from ._models_py3 import WinRMListener -from ._models_py3 import WindowsConfiguration -from ._models_py3 import WindowsParameters -from ._models_py3 import WindowsVMGuestPatchAutomaticByPlatformSettings +from typing import TYPE_CHECKING -from ._compute_management_client_enums import AlternativeType -from ._compute_management_client_enums import ArchitectureTypes -from ._compute_management_client_enums import AvailabilitySetSkuTypes -from ._compute_management_client_enums import CachingTypes -from ._compute_management_client_enums import CapacityReservationGroupInstanceViewTypes -from ._compute_management_client_enums import CapacityReservationInstanceViewTypes -from ._compute_management_client_enums import ConsistencyModeTypes -from ._compute_management_client_enums import DedicatedHostLicenseTypes -from ._compute_management_client_enums import DeleteOptions -from ._compute_management_client_enums import DiffDiskOptions -from ._compute_management_client_enums import DiffDiskPlacement -from ._compute_management_client_enums import DiskControllerTypes -from ._compute_management_client_enums import DiskCreateOptionTypes -from ._compute_management_client_enums import DiskDeleteOptionTypes -from ._compute_management_client_enums import DiskDetachOptionTypes -from ._compute_management_client_enums import DomainNameLabelScopeTypes -from ._compute_management_client_enums import ExecutionState -from ._compute_management_client_enums import ExpandTypeForListVMs -from ._compute_management_client_enums import ExpandTypesForGetCapacityReservationGroups -from ._compute_management_client_enums import ExpandTypesForGetVMScaleSets -from ._compute_management_client_enums import ExpandTypesForListVMs -from ._compute_management_client_enums import ExtendedLocationTypes -from ._compute_management_client_enums import HyperVGeneration -from ._compute_management_client_enums import HyperVGenerationType -from ._compute_management_client_enums import HyperVGenerationTypes -from ._compute_management_client_enums import IPVersion -from ._compute_management_client_enums import IPVersions -from ._compute_management_client_enums import ImageState -from ._compute_management_client_enums import InstanceViewTypes -from ._compute_management_client_enums import IntervalInMins -from ._compute_management_client_enums import LinuxPatchAssessmentMode -from ._compute_management_client_enums import LinuxVMGuestPatchAutomaticByPlatformRebootSetting -from ._compute_management_client_enums import LinuxVMGuestPatchMode -from ._compute_management_client_enums import MaintenanceOperationResultCodeTypes -from ._compute_management_client_enums import Mode -from ._compute_management_client_enums import NetworkApiVersion -from ._compute_management_client_enums import NetworkInterfaceAuxiliaryMode -from ._compute_management_client_enums import NetworkInterfaceAuxiliarySku -from ._compute_management_client_enums import OperatingSystemStateTypes -from ._compute_management_client_enums import OperatingSystemType -from ._compute_management_client_enums import OperatingSystemTypes -from ._compute_management_client_enums import OrchestrationMode -from ._compute_management_client_enums import OrchestrationServiceNames -from ._compute_management_client_enums import OrchestrationServiceState -from ._compute_management_client_enums import OrchestrationServiceStateAction -from ._compute_management_client_enums import PatchAssessmentState -from ._compute_management_client_enums import PatchInstallationState -from ._compute_management_client_enums import PatchOperationStatus -from ._compute_management_client_enums import ProtocolTypes -from ._compute_management_client_enums import ProximityPlacementGroupType -from ._compute_management_client_enums import PublicIPAddressSkuName -from ._compute_management_client_enums import PublicIPAddressSkuTier -from ._compute_management_client_enums import PublicIPAllocationMethod -from ._compute_management_client_enums import RepairAction -from ._compute_management_client_enums import ResourceIdOptionsForGetCapacityReservationGroups -from ._compute_management_client_enums import ResourceIdentityType -from ._compute_management_client_enums import RestorePointCollectionExpandOptions -from ._compute_management_client_enums import RestorePointEncryptionType -from ._compute_management_client_enums import RestorePointExpandOptions -from ._compute_management_client_enums import RollingUpgradeActionType -from ._compute_management_client_enums import RollingUpgradeStatusCode -from ._compute_management_client_enums import SecurityEncryptionTypes -from ._compute_management_client_enums import SecurityTypes -from ._compute_management_client_enums import SettingNames -from ._compute_management_client_enums import SshEncryptionTypes -from ._compute_management_client_enums import StatusLevelTypes -from ._compute_management_client_enums import StorageAccountTypes -from ._compute_management_client_enums import UpgradeMode -from ._compute_management_client_enums import UpgradeOperationInvoker -from ._compute_management_client_enums import UpgradeState -from ._compute_management_client_enums import VMGuestPatchClassificationLinux -from ._compute_management_client_enums import VMGuestPatchClassificationWindows -from ._compute_management_client_enums import VMGuestPatchRebootBehavior -from ._compute_management_client_enums import VMGuestPatchRebootSetting -from ._compute_management_client_enums import VMGuestPatchRebootStatus -from ._compute_management_client_enums import VirtualMachineEvictionPolicyTypes -from ._compute_management_client_enums import VirtualMachinePriorityTypes -from ._compute_management_client_enums import VirtualMachineScaleSetScaleInRules -from ._compute_management_client_enums import VirtualMachineScaleSetSkuScaleType -from ._compute_management_client_enums import VirtualMachineSizeTypes -from ._compute_management_client_enums import VmDiskTypes -from ._compute_management_client_enums import WindowsPatchAssessmentMode -from ._compute_management_client_enums import WindowsVMGuestPatchAutomaticByPlatformRebootSetting -from ._compute_management_client_enums import WindowsVMGuestPatchMode +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + + +from ._models_py3 import ( # type: ignore + AdditionalCapabilities, + AdditionalUnattendContent, + AlternativeOption, + ApiEntityReference, + ApiError, + ApiErrorBase, + ApplicationProfile, + AttachDetachDataDisksRequest, + AutomaticOSUpgradePolicy, + AutomaticOSUpgradeProperties, + AutomaticRepairsPolicy, + AvailabilitySet, + AvailabilitySetListResult, + AvailabilitySetUpdate, + AvailablePatchSummary, + BillingProfile, + BootDiagnostics, + BootDiagnosticsInstanceView, + CapacityReservation, + CapacityReservationGroup, + CapacityReservationGroupInstanceView, + CapacityReservationGroupListResult, + CapacityReservationGroupUpdate, + CapacityReservationInstanceView, + CapacityReservationInstanceViewWithName, + CapacityReservationListResult, + CapacityReservationProfile, + CapacityReservationUpdate, + CapacityReservationUtilization, + ComputeOperationListResult, + ComputeOperationValue, + DataDisk, + DataDiskImage, + DataDisksToAttach, + DataDisksToDetach, + DedicatedHost, + DedicatedHostAllocatableVM, + DedicatedHostAvailableCapacity, + DedicatedHostGroup, + DedicatedHostGroupInstanceView, + DedicatedHostGroupListResult, + DedicatedHostGroupPropertiesAdditionalCapabilities, + DedicatedHostGroupUpdate, + DedicatedHostInstanceView, + DedicatedHostInstanceViewWithName, + DedicatedHostListResult, + DedicatedHostSizeListResult, + DedicatedHostUpdate, + DiagnosticsProfile, + DiffDiskSettings, + DisallowedConfiguration, + DiskEncryptionSetParameters, + DiskEncryptionSettings, + DiskInstanceView, + DiskRestorePointAttributes, + DiskRestorePointInstanceView, + DiskRestorePointReplicationStatus, + EncryptionIdentity, + EventGridAndResourceGraph, + ExtendedLocation, + HardwareProfile, + Image, + ImageDataDisk, + ImageDeprecationStatus, + ImageDisk, + ImageListResult, + ImageOSDisk, + ImageReference, + ImageStorageProfile, + ImageUpdate, + InnerError, + InstanceViewStatus, + KeyVaultKeyReference, + KeyVaultSecretReference, + LastPatchInstallationSummary, + LinuxConfiguration, + LinuxParameters, + LinuxPatchSettings, + LinuxVMGuestPatchAutomaticByPlatformSettings, + ListUsagesResult, + LogAnalyticsInputBase, + LogAnalyticsOperationResult, + LogAnalyticsOutput, + MaintenanceRedeployStatus, + ManagedDiskParameters, + NetworkInterfaceReference, + NetworkProfile, + OSDisk, + OSDiskImage, + OSImageNotificationProfile, + OSProfile, + OSProfileProvisioningData, + OrchestrationServiceStateInput, + OrchestrationServiceSummary, + PatchInstallationDetail, + PatchSettings, + Plan, + PriorityMixPolicy, + ProximityPlacementGroup, + ProximityPlacementGroupListResult, + ProximityPlacementGroupPropertiesIntent, + ProximityPlacementGroupUpdate, + ProxyAgentSettings, + ProxyResource, + PublicIPAddressSku, + PurchasePlan, + RecoveryWalkResponse, + RequestRateByIntervalInput, + ResiliencyPolicy, + ResilientVMCreationPolicy, + ResilientVMDeletionPolicy, + Resource, + ResourceSharingProfile, + ResourceWithOptionalLocation, + RestorePoint, + RestorePointCollection, + RestorePointCollectionListResult, + RestorePointCollectionSourceProperties, + RestorePointCollectionUpdate, + RestorePointEncryption, + RestorePointInstanceView, + RestorePointSourceMetadata, + RestorePointSourceVMDataDisk, + RestorePointSourceVMOSDisk, + RestorePointSourceVMStorageProfile, + RetrieveBootDiagnosticsDataResult, + RollbackStatusInfo, + RollingUpgradePolicy, + RollingUpgradeProgressInfo, + RollingUpgradeRunningStatus, + RollingUpgradeStatusInfo, + RunCommandDocument, + RunCommandDocumentBase, + RunCommandInput, + RunCommandInputParameter, + RunCommandListResult, + RunCommandManagedIdentity, + RunCommandParameterDefinition, + RunCommandResult, + ScaleInPolicy, + ScheduledEventsAdditionalPublishingTargets, + ScheduledEventsPolicy, + ScheduledEventsProfile, + SecurityPostureReference, + SecurityPostureReferenceUpdate, + SecurityProfile, + ServiceArtifactReference, + Sku, + SpotRestorePolicy, + SshConfiguration, + SshGenerateKeyPairInputParameters, + SshPublicKey, + SshPublicKeyGenerateKeyPairResult, + SshPublicKeyResource, + SshPublicKeyUpdateResource, + SshPublicKeysGroupListResult, + StorageProfile, + SubResource, + SubResourceReadOnly, + SubResourceWithColocationStatus, + SystemData, + TerminateNotificationProfile, + ThrottledRequestsInput, + UefiSettings, + UpdateResource, + UpgradeOperationHistoricalStatusInfo, + UpgradeOperationHistoricalStatusInfoProperties, + UpgradeOperationHistoryStatus, + UpgradePolicy, + Usage, + UsageName, + UserAssignedIdentitiesValue, + UserInitiatedReboot, + UserInitiatedRedeploy, + VMDiskSecurityProfile, + VMGalleryApplication, + VMScaleSetConvertToSinglePlacementGroupInput, + VMSizeProperties, + VaultCertificate, + VaultSecretGroup, + VirtualHardDisk, + VirtualMachine, + VirtualMachineAgentInstanceView, + VirtualMachineAssessPatchesResult, + VirtualMachineCaptureParameters, + VirtualMachineCaptureResult, + VirtualMachineExtension, + VirtualMachineExtensionHandlerInstanceView, + VirtualMachineExtensionImage, + VirtualMachineExtensionInstanceView, + VirtualMachineExtensionUpdate, + VirtualMachineExtensionsListResult, + VirtualMachineHealthStatus, + VirtualMachineIdentity, + VirtualMachineImage, + VirtualMachineImageFeature, + VirtualMachineImageResource, + VirtualMachineInstallPatchesParameters, + VirtualMachineInstallPatchesResult, + VirtualMachineInstanceView, + VirtualMachineIpTag, + VirtualMachineListResult, + VirtualMachineNetworkInterfaceConfiguration, + VirtualMachineNetworkInterfaceDnsSettingsConfiguration, + VirtualMachineNetworkInterfaceIPConfiguration, + VirtualMachinePatchStatus, + VirtualMachinePublicIPAddressConfiguration, + VirtualMachinePublicIPAddressDnsSettingsConfiguration, + VirtualMachineReimageParameters, + VirtualMachineRunCommand, + VirtualMachineRunCommandInstanceView, + VirtualMachineRunCommandScriptSource, + VirtualMachineRunCommandUpdate, + VirtualMachineRunCommandsListResult, + VirtualMachineScaleSet, + VirtualMachineScaleSetDataDisk, + VirtualMachineScaleSetExtension, + VirtualMachineScaleSetExtensionListResult, + VirtualMachineScaleSetExtensionProfile, + VirtualMachineScaleSetExtensionUpdate, + VirtualMachineScaleSetHardwareProfile, + VirtualMachineScaleSetIPConfiguration, + VirtualMachineScaleSetIdentity, + VirtualMachineScaleSetInstanceView, + VirtualMachineScaleSetInstanceViewStatusesSummary, + VirtualMachineScaleSetIpTag, + VirtualMachineScaleSetListOSUpgradeHistory, + VirtualMachineScaleSetListResult, + VirtualMachineScaleSetListSkusResult, + VirtualMachineScaleSetListWithLinkResult, + VirtualMachineScaleSetManagedDiskParameters, + VirtualMachineScaleSetNetworkConfiguration, + VirtualMachineScaleSetNetworkConfigurationDnsSettings, + VirtualMachineScaleSetNetworkProfile, + VirtualMachineScaleSetOSDisk, + VirtualMachineScaleSetOSProfile, + VirtualMachineScaleSetPublicIPAddressConfiguration, + VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings, + VirtualMachineScaleSetReimageParameters, + VirtualMachineScaleSetSku, + VirtualMachineScaleSetSkuCapacity, + VirtualMachineScaleSetStorageProfile, + VirtualMachineScaleSetUpdate, + VirtualMachineScaleSetUpdateIPConfiguration, + VirtualMachineScaleSetUpdateNetworkConfiguration, + VirtualMachineScaleSetUpdateNetworkProfile, + VirtualMachineScaleSetUpdateOSDisk, + VirtualMachineScaleSetUpdateOSProfile, + VirtualMachineScaleSetUpdatePublicIPAddressConfiguration, + VirtualMachineScaleSetUpdateStorageProfile, + VirtualMachineScaleSetUpdateVMProfile, + VirtualMachineScaleSetVM, + VirtualMachineScaleSetVMExtension, + VirtualMachineScaleSetVMExtensionUpdate, + VirtualMachineScaleSetVMExtensionsListResult, + VirtualMachineScaleSetVMExtensionsSummary, + VirtualMachineScaleSetVMInstanceIDs, + VirtualMachineScaleSetVMInstanceRequiredIDs, + VirtualMachineScaleSetVMInstanceView, + VirtualMachineScaleSetVMListResult, + VirtualMachineScaleSetVMNetworkProfileConfiguration, + VirtualMachineScaleSetVMProfile, + VirtualMachineScaleSetVMProtectionPolicy, + VirtualMachineScaleSetVMReimageParameters, + VirtualMachineSize, + VirtualMachineSizeListResult, + VirtualMachineSoftwarePatchProperties, + VirtualMachineStatusCodeCount, + VirtualMachineUpdate, + VmImagesInEdgeZoneListResult, + WinRMConfiguration, + WinRMListener, + WindowsConfiguration, + WindowsParameters, + WindowsVMGuestPatchAutomaticByPlatformSettings, +) + +from ._compute_management_client_enums import ( # type: ignore + AlternativeType, + ArchitectureTypes, + AvailabilitySetSkuTypes, + CachingTypes, + CapacityReservationGroupInstanceViewTypes, + CapacityReservationInstanceViewTypes, + ConsistencyModeTypes, + DedicatedHostLicenseTypes, + DeleteOptions, + DiffDiskOptions, + DiffDiskPlacement, + DiskControllerTypes, + DiskCreateOptionTypes, + DiskDeleteOptionTypes, + DiskDetachOptionTypes, + DomainNameLabelScopeTypes, + ExecutionState, + ExpandTypeForListVMs, + ExpandTypesForGetCapacityReservationGroups, + ExpandTypesForGetVMScaleSets, + ExpandTypesForListVMs, + ExtendedLocationTypes, + HyperVGeneration, + HyperVGenerationType, + HyperVGenerationTypes, + IPVersion, + IPVersions, + ImageState, + InstanceViewTypes, + IntervalInMins, + LinuxPatchAssessmentMode, + LinuxVMGuestPatchAutomaticByPlatformRebootSetting, + LinuxVMGuestPatchMode, + MaintenanceOperationResultCodeTypes, + Mode, + NetworkApiVersion, + NetworkInterfaceAuxiliaryMode, + NetworkInterfaceAuxiliarySku, + OperatingSystemStateTypes, + OperatingSystemType, + OperatingSystemTypes, + OrchestrationMode, + OrchestrationServiceNames, + OrchestrationServiceState, + OrchestrationServiceStateAction, + PatchAssessmentState, + PatchInstallationState, + PatchOperationStatus, + ProtocolTypes, + ProximityPlacementGroupType, + PublicIPAddressSkuName, + PublicIPAddressSkuTier, + PublicIPAllocationMethod, + RepairAction, + ResourceIdOptionsForGetCapacityReservationGroups, + ResourceIdentityType, + RestorePointCollectionExpandOptions, + RestorePointEncryptionType, + RestorePointExpandOptions, + RollingUpgradeActionType, + RollingUpgradeStatusCode, + SecurityEncryptionTypes, + SecurityTypes, + SettingNames, + SshEncryptionTypes, + StatusLevelTypes, + StorageAccountTypes, + UpgradeMode, + UpgradeOperationInvoker, + UpgradeState, + VMGuestPatchClassificationLinux, + VMGuestPatchClassificationWindows, + VMGuestPatchRebootBehavior, + VMGuestPatchRebootSetting, + VMGuestPatchRebootStatus, + VirtualMachineEvictionPolicyTypes, + VirtualMachinePriorityTypes, + VirtualMachineScaleSetScaleInRules, + VirtualMachineScaleSetSkuScaleType, + VirtualMachineSizeTypes, + VmDiskTypes, + WindowsPatchAssessmentMode, + WindowsVMGuestPatchAutomaticByPlatformRebootSetting, + WindowsVMGuestPatchMode, +) 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__ = [ @@ -731,5 +742,5 @@ "WindowsVMGuestPatchAutomaticByPlatformRebootSetting", "WindowsVMGuestPatchMode", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_01/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_01/models/_models_py3.py index 863e36da33561..6f440c8745148 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_01/models/_models_py3.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_01/models/_models_py3.py @@ -1,5 +1,5 @@ -# 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. @@ -16,10 +16,9 @@ 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 if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object @@ -526,7 +525,7 @@ def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kw self.tags = tags -class AvailabilitySet(Resource): # pylint: disable=too-many-instance-attributes +class AvailabilitySet(Resource): """Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see `Availability sets @@ -939,7 +938,7 @@ def __init__(self, **kwargs: Any) -> None: self.status = None -class CapacityReservation(Resource): # pylint: disable=too-many-instance-attributes +class CapacityReservation(Resource): """Specifies information about the capacity reservation. Variables are only populated by the server, and will be ignored when sending a request. @@ -1629,7 +1628,7 @@ def __init__(self, **kwargs: Any) -> None: self.provider = None -class DataDisk(_serialization.Model): # pylint: disable=too-many-instance-attributes +class DataDisk(_serialization.Model): """Describes a data disk. Variables are only populated by the server, and will be ignored when sending a request. @@ -1971,7 +1970,7 @@ def __init__( self.detach_option = detach_option -class DedicatedHost(Resource): # pylint: disable=too-many-instance-attributes +class DedicatedHost(Resource): """Specifies information about the Dedicated host. Variables are only populated by the server, and will be ignored when sending a request. @@ -2149,7 +2148,7 @@ def __init__( self.allocatable_v_ms = allocatable_v_ms -class DedicatedHostGroup(Resource): # pylint: disable=too-many-instance-attributes +class DedicatedHostGroup(Resource): """Specifies information about the dedicated host group that the dedicated hosts should be assigned to. Currently, a dedicated host can only be added to a dedicated host group at creation time. An existing dedicated host cannot be added to another dedicated host group. @@ -2583,7 +2582,7 @@ def __init__(self, *, value: Optional[List[str]] = None, **kwargs: Any) -> None: self.value = value -class DedicatedHostUpdate(UpdateResource): # pylint: disable=too-many-instance-attributes +class DedicatedHostUpdate(UpdateResource): """Specifies information about the dedicated host. Only tags, autoReplaceOnFailure and licenseType may be updated. @@ -4087,7 +4086,7 @@ def __init__(self, *, secret_url: str, source_vault: "_models.SubResource", **kw self.source_vault = source_vault -class LastPatchInstallationSummary(_serialization.Model): # pylint: disable=too-many-instance-attributes +class LastPatchInstallationSummary(_serialization.Model): """Describes the properties of the last installed patch summary. Variables are only populated by the server, and will be ignored when sending a request. @@ -4866,7 +4865,7 @@ def __init__(self, **kwargs: Any) -> None: self.service_state = None -class OSDisk(_serialization.Model): # pylint: disable=too-many-instance-attributes +class OSDisk(_serialization.Model): """Specifies information about the operating system disk used by the virtual machine. For more information about disks, see `About disks and VHDs for Azure virtual machines `_. @@ -5555,7 +5554,7 @@ def __init__( self.regular_priority_percentage_above_base = regular_priority_percentage_above_base -class ProximityPlacementGroup(Resource): # pylint: disable=too-many-instance-attributes +class ProximityPlacementGroup(Resource): """Specifies information about the proximity placement group. Variables are only populated by the server, and will be ignored when sending a request. @@ -8840,7 +8839,7 @@ def __init__(self, *, uri: Optional[str] = None, **kwargs: Any) -> None: self.uri = uri -class VirtualMachine(Resource): # pylint: disable=too-many-instance-attributes +class VirtualMachine(Resource): """Describes a Virtual Machine. Variables are only populated by the server, and will be ignored when sending a request. @@ -9434,7 +9433,7 @@ def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylin self.resources = None -class VirtualMachineExtension(ResourceWithOptionalLocation): # pylint: disable=too-many-instance-attributes +class VirtualMachineExtension(ResourceWithOptionalLocation): """Describes a Virtual Machine Extension. Variables are only populated by the server, and will be ignored when sending a request. @@ -9800,7 +9799,7 @@ def __init__(self, *, value: Optional[List["_models.VirtualMachineExtension"]] = self.value = value -class VirtualMachineExtensionUpdate(UpdateResource): # pylint: disable=too-many-instance-attributes +class VirtualMachineExtensionUpdate(UpdateResource): """Describes a Virtual Machine Extension. :ivar tags: Resource tags. @@ -10062,7 +10061,7 @@ def __init__( self.extended_location = extended_location -class VirtualMachineImage(VirtualMachineImageResource): # pylint: disable=too-many-instance-attributes +class VirtualMachineImage(VirtualMachineImageResource): """Describes a Virtual Machine Image. All required parameters must be populated in order to send to server. @@ -10287,7 +10286,7 @@ def __init__( self.linux_parameters = linux_parameters -class VirtualMachineInstallPatchesResult(_serialization.Model): # pylint: disable=too-many-instance-attributes +class VirtualMachineInstallPatchesResult(_serialization.Model): """The result summary of an installation operation. Variables are only populated by the server, and will be ignored when sending a request. @@ -10377,7 +10376,7 @@ def __init__(self, **kwargs: Any) -> None: self.error = None -class VirtualMachineInstanceView(_serialization.Model): # pylint: disable=too-many-instance-attributes +class VirtualMachineInstanceView(_serialization.Model): """The instance view of a virtual machine. Variables are only populated by the server, and will be ignored when sending a request. @@ -10589,9 +10588,7 @@ def __init__( self.next_link = next_link -class VirtualMachineNetworkInterfaceConfiguration( - _serialization.Model -): # pylint: disable=too-many-instance-attributes,name-too-long +class VirtualMachineNetworkInterfaceConfiguration(_serialization.Model): # pylint: disable=name-too-long """Describes a virtual machine network interface configurations. All required parameters must be populated in order to send to server. @@ -11120,7 +11117,7 @@ def __init__( self.os_profile = os_profile -class VirtualMachineRunCommand(Resource): # pylint: disable=too-many-instance-attributes +class VirtualMachineRunCommand(Resource): """Describes a Virtual Machine run command. Variables are only populated by the server, and will be ignored when sending a request. @@ -11495,7 +11492,7 @@ def __init__( self.next_link = next_link -class VirtualMachineRunCommandUpdate(UpdateResource): # pylint: disable=too-many-instance-attributes +class VirtualMachineRunCommandUpdate(UpdateResource): """Describes a Virtual Machine run command. Variables are only populated by the server, and will be ignored when sending a request. @@ -11679,7 +11676,7 @@ def __init__( self.treat_failure_as_deployment_failure = treat_failure_as_deployment_failure -class VirtualMachineScaleSet(Resource): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSet(Resource): """Describes a Virtual Machine Scale Set. Variables are only populated by the server, and will be ignored when sending a request. @@ -12102,7 +12099,7 @@ def __init__( self.delete_option = delete_option -class VirtualMachineScaleSetExtension(SubResourceReadOnly): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetExtension(SubResourceReadOnly): """Describes a Virtual Machine Scale Set Extension. Variables are only populated by the server, and will be ignored when sending a request. @@ -12322,7 +12319,7 @@ def __init__( self.extensions_time_budget = extensions_time_budget -class VirtualMachineScaleSetExtensionUpdate(SubResourceReadOnly): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetExtensionUpdate(SubResourceReadOnly): """Describes a Virtual Machine Scale Set Extension. Variables are only populated by the server, and will be ignored when sending a request. @@ -12974,9 +12971,7 @@ def __init__( self.security_profile = security_profile -class VirtualMachineScaleSetNetworkConfiguration( - _serialization.Model -): # pylint: disable=too-many-instance-attributes,name-too-long +class VirtualMachineScaleSetNetworkConfiguration(_serialization.Model): # pylint: disable=name-too-long """Describes a virtual machine scale set network profile's network configurations. All required parameters must be populated in order to send to server. @@ -13179,7 +13174,7 @@ def __init__( self.network_api_version = network_api_version -class VirtualMachineScaleSetOSDisk(_serialization.Model): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetOSDisk(_serialization.Model): """Describes a virtual machine scale set operating system disk. All required parameters must be populated in order to send to server. @@ -13879,7 +13874,7 @@ def __init__( self.disk_controller_type = disk_controller_type -class VirtualMachineScaleSetUpdate(UpdateResource): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetUpdate(UpdateResource): """Describes a Virtual Machine Scale Set. :ivar tags: Resource tags. @@ -14158,9 +14153,7 @@ def __init__( self.load_balancer_inbound_nat_pools = load_balancer_inbound_nat_pools -class VirtualMachineScaleSetUpdateNetworkConfiguration( - _serialization.Model -): # pylint: disable=too-many-instance-attributes,name-too-long +class VirtualMachineScaleSetUpdateNetworkConfiguration(_serialization.Model): # pylint: disable=name-too-long """Describes a virtual machine scale set network profile's network configurations. :ivar name: The network configuration name. @@ -14599,7 +14592,7 @@ def __init__( self.disk_controller_type = disk_controller_type -class VirtualMachineScaleSetUpdateVMProfile(_serialization.Model): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetUpdateVMProfile(_serialization.Model): """Describes a virtual machine scale set virtual machine profile. :ivar os_profile: The virtual machine scale set OS profile. @@ -14721,7 +14714,7 @@ def __init__( self.hardware_profile = hardware_profile -class VirtualMachineScaleSetVM(Resource): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetVM(Resource): """Describes a virtual machine scale set virtual machine. Variables are only populated by the server, and will be ignored when sending a request. @@ -14991,7 +14984,7 @@ def __init__( # pylint: disable=too-many-locals self.time_created = None -class VirtualMachineScaleSetVMExtension(SubResourceReadOnly): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetVMExtension(SubResourceReadOnly): """Describes a VMSS VM Extension. Variables are only populated by the server, and will be ignored when sending a request. @@ -15203,7 +15196,7 @@ def __init__(self, **kwargs: Any) -> None: self.statuses_summary = None -class VirtualMachineScaleSetVMExtensionUpdate(SubResourceReadOnly): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetVMExtensionUpdate(SubResourceReadOnly): """Describes a VMSS VM Extension. Variables are only populated by the server, and will be ignored when sending a request. @@ -15383,7 +15376,7 @@ def __init__(self, *, instance_ids: List[str], **kwargs: Any) -> None: self.instance_ids = instance_ids -class VirtualMachineScaleSetVMInstanceView(_serialization.Model): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetVMInstanceView(_serialization.Model): """The instance view of a virtual machine scale set VM. Variables are only populated by the server, and will be ignored when sending a request. @@ -15604,7 +15597,7 @@ def __init__( self.network_interface_configurations = network_interface_configurations -class VirtualMachineScaleSetVMProfile(_serialization.Model): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetVMProfile(_serialization.Model): """Describes a virtual machine scale set virtual machine profile. Variables are only populated by the server, and will be ignored when sending a request. @@ -16056,7 +16049,7 @@ def __init__(self, **kwargs: Any) -> None: self.count = None -class VirtualMachineUpdate(UpdateResource): # pylint: disable=too-many-instance-attributes +class VirtualMachineUpdate(UpdateResource): """Describes a Virtual Machine Update. Variables are only populated by the server, and will be ignored when sending a request. diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_01/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_01/operations/__init__.py index 3cc8e8e7a73a8..5cc9a11e23416 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_01/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_01/operations/__init__.py @@ -5,36 +5,42 @@ # Code generated by Microsoft (R) AutoRest 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 UsageOperations -from ._operations import VirtualMachineSizesOperations -from ._operations import VirtualMachineScaleSetsOperations -from ._operations import VirtualMachineScaleSetExtensionsOperations -from ._operations import VirtualMachineScaleSetRollingUpgradesOperations -from ._operations import VirtualMachineScaleSetVMExtensionsOperations -from ._operations import VirtualMachineScaleSetVMsOperations -from ._operations import VirtualMachineExtensionsOperations -from ._operations import VirtualMachinesOperations -from ._operations import VirtualMachineImagesOperations -from ._operations import VirtualMachineImagesEdgeZoneOperations -from ._operations import VirtualMachineExtensionImagesOperations -from ._operations import AvailabilitySetsOperations -from ._operations import ProximityPlacementGroupsOperations -from ._operations import DedicatedHostGroupsOperations -from ._operations import DedicatedHostsOperations -from ._operations import SshPublicKeysOperations -from ._operations import ImagesOperations -from ._operations import RestorePointCollectionsOperations -from ._operations import RestorePointsOperations -from ._operations import CapacityReservationGroupsOperations -from ._operations import CapacityReservationsOperations -from ._operations import LogAnalyticsOperations -from ._operations import VirtualMachineRunCommandsOperations -from ._operations import VirtualMachineScaleSetVMRunCommandsOperations +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 UsageOperations # type: ignore +from ._operations import VirtualMachineSizesOperations # type: ignore +from ._operations import VirtualMachineScaleSetsOperations # type: ignore +from ._operations import VirtualMachineScaleSetExtensionsOperations # type: ignore +from ._operations import VirtualMachineScaleSetRollingUpgradesOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMExtensionsOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMsOperations # type: ignore +from ._operations import VirtualMachineExtensionsOperations # type: ignore +from ._operations import VirtualMachinesOperations # type: ignore +from ._operations import VirtualMachineImagesOperations # type: ignore +from ._operations import VirtualMachineImagesEdgeZoneOperations # type: ignore +from ._operations import VirtualMachineExtensionImagesOperations # type: ignore +from ._operations import AvailabilitySetsOperations # type: ignore +from ._operations import ProximityPlacementGroupsOperations # type: ignore +from ._operations import DedicatedHostGroupsOperations # type: ignore +from ._operations import DedicatedHostsOperations # type: ignore +from ._operations import SshPublicKeysOperations # type: ignore +from ._operations import ImagesOperations # type: ignore +from ._operations import RestorePointCollectionsOperations # type: ignore +from ._operations import RestorePointsOperations # type: ignore +from ._operations import CapacityReservationGroupsOperations # type: ignore +from ._operations import CapacityReservationsOperations # type: ignore +from ._operations import LogAnalyticsOperations # type: ignore +from ._operations import VirtualMachineRunCommandsOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMRunCommandsOperations # 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__ = [ @@ -65,5 +71,5 @@ "VirtualMachineRunCommandsOperations", "VirtualMachineScaleSetVMRunCommandsOperations", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_01/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_01/operations/_operations.py index 14a80f0689f0d..5dbed5ffa9503 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_01/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_01/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. @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Iterable, Iterator, List, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Iterable, Iterator, List, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -36,7 +36,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, HttpResponse], T, Dict[str, Any]], Any]] @@ -6275,7 +6275,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.ComputeOperationValue"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.ComputeOperationListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6372,7 +6372,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.Usage"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.ListUsagesResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6471,7 +6471,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.VirtualMachine api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6572,7 +6572,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> Iterable["_models.Vi api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6643,7 +6643,7 @@ def _create_or_update_initial( if_none_match: Optional[str] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6873,7 +6873,7 @@ def _update_initial( if_none_match: Optional[str] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7097,7 +7097,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, *, force_deletion: Optional[bool] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7226,7 +7226,7 @@ def get( :rtype: ~azure.mgmt.compute.v2024_03_01.models.VirtualMachineScaleSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7278,7 +7278,7 @@ def _deallocate_initial( hibernate: Optional[bool] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7493,7 +7493,7 @@ def _delete_instances_initial( force_deletion: Optional[bool] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7701,7 +7701,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2024_03_01.models.VirtualMachineScaleSetInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7761,7 +7761,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Vir api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7840,7 +7840,7 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.VirtualMachineScaleSet"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.VirtualMachineScaleSetListWithLinkResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7923,7 +7923,7 @@ def list_skus( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.VirtualMachineScaleSetListSkusResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8007,7 +8007,7 @@ def get_os_upgrade_history( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.VirtualMachineScaleSetListOSUpgradeHistory] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8078,7 +8078,7 @@ def _power_off_initial( skip_shutdown: bool = False, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8291,7 +8291,7 @@ def _restart_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8480,7 +8480,7 @@ def _start_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8663,7 +8663,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _reapply_initial(self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8776,7 +8776,7 @@ def _redeploy_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8968,7 +8968,7 @@ def _perform_maintenance_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9166,7 +9166,7 @@ def _update_instances_initial( vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9352,7 +9352,7 @@ def _reimage_initial( vm_scale_set_reimage_input: Optional[Union[_models.VirtualMachineScaleSetReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9545,7 +9545,7 @@ def _reimage_all_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9737,7 +9737,7 @@ def _approve_rolling_upgrade_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9956,7 +9956,7 @@ def force_recovery_service_fabric_platform_update_domain_walk( # pylint: disabl :rtype: ~azure.mgmt.compute.v2024_03_01.models.RecoveryWalkResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10002,7 +10002,7 @@ def force_recovery_service_fabric_platform_update_domain_walk( # pylint: disabl return deserialized # type: ignore @overload - def convert_to_single_placement_group( # pylint: disable=inconsistent-return-statements + def convert_to_single_placement_group( self, resource_group_name: str, vm_scale_set_name: str, @@ -10030,7 +10030,7 @@ def convert_to_single_placement_group( # pylint: disable=inconsistent-return-st """ @overload - def convert_to_single_placement_group( # pylint: disable=inconsistent-return-statements + def convert_to_single_placement_group( self, resource_group_name: str, vm_scale_set_name: str, @@ -10080,7 +10080,7 @@ def convert_to_single_placement_group( # pylint: disable=inconsistent-return-st :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10137,7 +10137,7 @@ def _set_orchestration_service_state_initial( parameters: Union[_models.OrchestrationServiceStateInput, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10345,7 +10345,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtension, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10556,7 +10556,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtensionUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10763,7 +10763,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, vmss_extension_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10893,7 +10893,7 @@ def get( :rtype: ~azure.mgmt.compute.v2024_03_01.models.VirtualMachineScaleSetExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10959,7 +10959,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.VirtualMachineScaleSetExtensionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11043,7 +11043,7 @@ def __init__(self, *args, **kwargs): self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") def _cancel_initial(self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11145,7 +11145,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_os_upgrade_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11251,7 +11251,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_extension_upgrade_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11368,7 +11368,7 @@ def get_latest( :rtype: ~azure.mgmt.compute.v2024_03_01.models.RollingUpgradeStatusInfo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11440,7 +11440,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetVMExtension, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11660,7 +11660,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetVMExtensionUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11875,7 +11875,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, vm_extension_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12011,7 +12011,7 @@ def get( :rtype: ~azure.mgmt.compute.v2024_03_01.models.VirtualMachineScaleSetVMExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12080,7 +12080,7 @@ def list( :rtype: ~azure.mgmt.compute.v2024_03_01.models.VirtualMachineScaleSetVMExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12157,7 +12157,7 @@ def _reimage_initial( ] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12356,7 +12356,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _reimage_all_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12465,7 +12465,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _approve_rolling_upgrade_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12576,7 +12576,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _deallocate_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12694,7 +12694,7 @@ def _update_initial( if_none_match: Optional[str] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12939,7 +12939,7 @@ def _delete_initial( force_deletion: Optional[bool] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13081,7 +13081,7 @@ def get( :rtype: ~azure.mgmt.compute.v2024_03_01.models.VirtualMachineScaleSetVM :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13141,7 +13141,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2024_03_01.models.VirtualMachineScaleSetVMInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13223,7 +13223,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.VirtualMachineScaleSetVMListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13297,7 +13297,7 @@ def _power_off_initial( skip_shutdown: bool = False, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13419,7 +13419,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _restart_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13527,7 +13527,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13635,7 +13635,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _redeploy_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13768,7 +13768,7 @@ def retrieve_boot_diagnostics_data( :rtype: ~azure.mgmt.compute.v2024_03_01.models.RetrieveBootDiagnosticsDataResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13815,7 +13815,7 @@ def retrieve_boot_diagnostics_data( def _perform_maintenance_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13936,7 +13936,7 @@ def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13983,7 +13983,7 @@ def _attach_detach_data_disks_initial( parameters: Union[_models.AttachDetachDataDisksRequest, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14194,7 +14194,7 @@ def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14418,7 +14418,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineExtension, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14628,7 +14628,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineExtensionUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14834,7 +14834,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_name: str, vm_extension_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14964,7 +14964,7 @@ def get( :rtype: ~azure.mgmt.compute.v2024_03_01.models.VirtualMachineExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15024,7 +15024,7 @@ def list( :rtype: ~azure.mgmt.compute.v2024_03_01.models.VirtualMachineExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15105,7 +15105,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> Iterable["_models.Vi api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15173,7 +15173,7 @@ def _capture_initial( parameters: Union[_models.VirtualMachineCaptureParameters, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15374,7 +15374,7 @@ def _create_or_update_initial( if_none_match: Optional[str] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15604,7 +15604,7 @@ def _update_initial( if_none_match: Optional[str] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15824,7 +15824,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_name: str, *, force_deletion: Optional[bool] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15955,7 +15955,7 @@ def get( :rtype: ~azure.mgmt.compute.v2024_03_01.models.VirtualMachine :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16012,7 +16012,7 @@ def instance_view( :rtype: ~azure.mgmt.compute.v2024_03_01.models.VirtualMachineInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16057,7 +16057,7 @@ def instance_view( def _convert_to_managed_disks_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16160,7 +16160,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _deallocate_initial( self, resource_group_name: str, vm_name: str, *, hibernate: Optional[bool] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16285,7 +16285,7 @@ def generalize( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16332,6 +16332,7 @@ def list( expand: Optional[Union[str, _models.ExpandTypeForListVMs]] = None, **kwargs: Any ) -> Iterable["_models.VirtualMachine"]: + # pylint: disable=line-too-long """Lists all of the virtual machines in the specified resource group. Use the nextLink property in the response to get the next page of virtual machines. @@ -16356,7 +16357,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16428,6 +16429,7 @@ def list_all( expand: Optional[Union[str, _models.ExpandTypesForListVMs]] = None, **kwargs: Any ) -> Iterable["_models.VirtualMachine"]: + # pylint: disable=line-too-long """Lists all of the virtual machines in the specified subscription. Use the nextLink property in the response to get the next page of virtual machines. @@ -16453,7 +16455,7 @@ def list_all( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16537,7 +16539,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16602,7 +16604,7 @@ def get_next(next_link=None): def _power_off_initial( self, resource_group_name: str, vm_name: str, *, skip_shutdown: bool = False, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16711,7 +16713,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _reapply_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16811,7 +16813,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _restart_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16911,7 +16913,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _start_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17011,7 +17013,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _redeploy_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17117,7 +17119,7 @@ def _reimage_initial( parameters: Optional[Union[_models.VirtualMachineReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17336,7 +17338,7 @@ def retrieve_boot_diagnostics_data( :rtype: ~azure.mgmt.compute.v2024_03_01.models.RetrieveBootDiagnosticsDataResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17380,7 +17382,7 @@ def retrieve_boot_diagnostics_data( return deserialized # type: ignore def _perform_maintenance_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17493,7 +17495,7 @@ def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17532,7 +17534,7 @@ def simulate_eviction( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore def _assess_patches_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17648,7 +17650,7 @@ def _install_patches_initial( install_patches_input: Union[_models.VirtualMachineInstallPatchesParameters, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17846,7 +17848,7 @@ def _attach_detach_data_disks_initial( parameters: Union[_models.AttachDetachDataDisksRequest, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18044,7 +18046,7 @@ def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18269,7 +18271,7 @@ def get( :rtype: ~azure.mgmt.compute.v2024_03_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18348,7 +18350,7 @@ def list( :rtype: list[~azure.mgmt.compute.v2024_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18409,7 +18411,7 @@ def list_offers( :rtype: list[~azure.mgmt.compute.v2024_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18461,7 +18463,7 @@ def list_publishers(self, location: str, **kwargs: Any) -> List[_models.VirtualM :rtype: list[~azure.mgmt.compute.v2024_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18518,7 +18520,7 @@ def list_skus( :rtype: list[~azure.mgmt.compute.v2024_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18573,7 +18575,7 @@ def list_by_edge_zone(self, location: str, edge_zone: str, **kwargs: Any) -> _mo :rtype: ~azure.mgmt.compute.v2024_03_01.models.VmImagesInEdgeZoneListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18658,7 +18660,7 @@ def get( :rtype: ~azure.mgmt.compute.v2024_03_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18743,7 +18745,7 @@ def list( :rtype: list[~azure.mgmt.compute.v2024_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18808,7 +18810,7 @@ def list_offers( :rtype: list[~azure.mgmt.compute.v2024_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18865,7 +18867,7 @@ def list_publishers( :rtype: list[~azure.mgmt.compute.v2024_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18926,7 +18928,7 @@ def list_skus( :rtype: list[~azure.mgmt.compute.v2024_03_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19009,7 +19011,7 @@ def get( :rtype: ~azure.mgmt.compute.v2024_03_01.models.VirtualMachineExtensionImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19067,7 +19069,7 @@ def list_types( :rtype: list[~azure.mgmt.compute.v2024_03_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19139,7 +19141,7 @@ def list_versions( :rtype: list[~azure.mgmt.compute.v2024_03_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19279,7 +19281,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2024_03_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19406,7 +19408,7 @@ def update( :rtype: ~azure.mgmt.compute.v2024_03_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19474,7 +19476,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19524,7 +19526,7 @@ def get(self, resource_group_name: str, availability_set_name: str, **kwargs: An :rtype: ~azure.mgmt.compute.v2024_03_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19585,7 +19587,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19662,7 +19664,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Ava api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19744,7 +19746,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19902,7 +19904,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2024_03_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20032,7 +20034,7 @@ def update( :rtype: ~azure.mgmt.compute.v2024_03_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20100,7 +20102,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20160,7 +20162,7 @@ def get( :rtype: ~azure.mgmt.compute.v2024_03_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20219,7 +20221,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.ProximityPlac api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20299,7 +20301,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20460,7 +20462,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2024_03_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20587,7 +20589,7 @@ def update( :rtype: ~azure.mgmt.compute.v2024_03_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20655,7 +20657,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20717,7 +20719,7 @@ def get( :rtype: ~azure.mgmt.compute.v2024_03_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20777,7 +20779,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20853,7 +20855,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.DedicatedHost api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20942,7 +20944,7 @@ def _create_or_update_initial( parameters: Union[_models.DedicatedHost, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21143,7 +21145,7 @@ def _update_initial( parameters: Union[_models.DedicatedHostUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21339,7 +21341,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21470,7 +21472,7 @@ def get( :rtype: ~azure.mgmt.compute.v2024_03_01.models.DedicatedHost :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21535,7 +21537,7 @@ def list_by_host_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.DedicatedHostListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21600,7 +21602,7 @@ def get_next(next_link=None): def _restart_initial( self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21711,7 +21713,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _redeploy_initial( self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21847,7 +21849,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.DedicatedHostSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21948,7 +21950,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.SshPublicKeyR api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22029,7 +22031,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22163,7 +22165,7 @@ def create( :rtype: ~azure.mgmt.compute.v2024_03_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22291,7 +22293,7 @@ def update( :rtype: ~azure.mgmt.compute.v2024_03_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22359,7 +22361,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22409,7 +22411,7 @@ def get(self, resource_group_name: str, ssh_public_key_name: str, **kwargs: Any) :rtype: ~azure.mgmt.compute.v2024_03_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22531,7 +22533,7 @@ def generate_key_pair( :rtype: ~azure.mgmt.compute.v2024_03_01.models.SshPublicKeyGenerateKeyPairResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22612,7 +22614,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, image_name: str, parameters: Union[_models.Image, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22794,7 +22796,7 @@ def _update_initial( parameters: Union[_models.ImageUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22974,7 +22976,7 @@ def get_long_running_output(pipeline_response): ) def _delete_initial(self, resource_group_name: str, image_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23089,7 +23091,7 @@ def get( :rtype: ~azure.mgmt.compute.v2024_03_01.models.Image :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23149,7 +23151,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23225,7 +23227,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Image"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23387,7 +23389,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2024_03_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23517,7 +23519,7 @@ def update( :rtype: ~azure.mgmt.compute.v2024_03_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23574,7 +23576,7 @@ def update( def _delete_initial( self, resource_group_name: str, restore_point_collection_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23700,7 +23702,7 @@ def get( :rtype: ~azure.mgmt.compute.v2024_03_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23761,7 +23763,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Res api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.RestorePointCollectionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23840,7 +23842,7 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.RestorePointCollection"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.RestorePointCollectionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23929,7 +23931,7 @@ def _create_initial( parameters: Union[_models.RestorePoint, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24128,7 +24130,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, restore_point_collection_name: str, restore_point_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24258,7 +24260,7 @@ def get( :rtype: ~azure.mgmt.compute.v2024_03_01.models.RestorePoint :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24402,7 +24404,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2024_03_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24535,7 +24537,7 @@ def update( :rtype: ~azure.mgmt.compute.v2024_03_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24606,7 +24608,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24670,7 +24672,7 @@ def get( :rtype: ~azure.mgmt.compute.v2024_03_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24744,7 +24746,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.CapacityReservationGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24844,7 +24846,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.CapacityReservationGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24935,7 +24937,7 @@ def _create_or_update_initial( parameters: Union[_models.CapacityReservation, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25145,7 +25147,7 @@ def _update_initial( parameters: Union[_models.CapacityReservationUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25348,7 +25350,7 @@ def _delete_initial( capacity_reservation_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25486,7 +25488,7 @@ def get( :rtype: ~azure.mgmt.compute.v2024_03_01.models.CapacityReservation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25552,7 +25554,7 @@ def list_by_capacity_reservation_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.CapacityReservationListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25638,7 +25640,7 @@ def __init__(self, *args, **kwargs): def _export_request_rate_by_interval_initial( self, location: str, parameters: Union[_models.RequestRateByIntervalInput, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25815,7 +25817,7 @@ def get_long_running_output(pipeline_response): def _export_throttled_requests_initial( self, location: str, parameters: Union[_models.ThrottledRequestsInput, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26025,7 +26027,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.RunCommandDocu api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.RunCommandListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26098,7 +26100,7 @@ def get(self, location: str, command_id: str, **kwargs: Any) -> _models.RunComma :rtype: ~azure.mgmt.compute.v2024_03_01.models.RunCommandDocument :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26148,7 +26150,7 @@ def _create_or_update_initial( run_command: Union[_models.VirtualMachineRunCommand, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26357,7 +26359,7 @@ def _update_initial( run_command: Union[_models.VirtualMachineRunCommandUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26562,7 +26564,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_name: str, run_command_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26692,7 +26694,7 @@ def get_by_virtual_machine( :rtype: ~azure.mgmt.compute.v2024_03_01.models.VirtualMachineRunCommand :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26760,7 +26762,7 @@ def list_by_virtual_machine( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.VirtualMachineRunCommandsListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26853,7 +26855,7 @@ def _create_or_update_initial( run_command: Union[_models.VirtualMachineRunCommand, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -27071,7 +27073,7 @@ def _update_initial( run_command: Union[_models.VirtualMachineRunCommandUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -27284,7 +27286,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, run_command_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -27420,7 +27422,7 @@ def get( :rtype: ~azure.mgmt.compute.v2024_03_01.models.VirtualMachineRunCommand :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -27497,7 +27499,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-01")) cls: ClsType[_models.VirtualMachineRunCommandsListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_02/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_02/__init__.py index 3b1b6244b2375..ab7c46e8991db 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_02/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_02/__init__.py @@ -5,15 +5,21 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._compute_management_client import ComputeManagementClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._compute_management_client import ComputeManagementClient # 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__ = [ "ComputeManagementClient", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_02/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_02/_compute_management_client.py index 70c2b1c7aea00..488bc07e9289e 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_02/_compute_management_client.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_02/_compute_management_client.py @@ -27,11 +27,10 @@ ) if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class ComputeManagementClient: # pylint: disable=client-accepts-api-version-keyword +class ComputeManagementClient: """Compute Client. :ivar disks: DisksOperations operations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_02/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_02/_configuration.py index f100d2dc364ce..ec0e17102b9f8 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_02/_configuration.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_02/_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 ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ComputeManagementClient. Note that all parameters used to create this instance are saved as instance diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_02/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_02/_version.py index d79b2760319c5..e5754a47ce68f 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_02/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_02/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "33.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_02/aio/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_02/aio/__init__.py index 0715f50185586..d3fd1ba93379a 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_02/aio/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_02/aio/__init__.py @@ -5,12 +5,18 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._compute_management_client import ComputeManagementClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._compute_management_client import ComputeManagementClient # 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__ = [ "ComputeManagementClient", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_02/aio/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_02/aio/_compute_management_client.py index 800efa34327a0..64416721f0bee 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_02/aio/_compute_management_client.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_02/aio/_compute_management_client.py @@ -27,11 +27,10 @@ ) if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class ComputeManagementClient: # pylint: disable=client-accepts-api-version-keyword +class ComputeManagementClient: """Compute Client. :ivar disks: DisksOperations operations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_02/aio/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_02/aio/_configuration.py index b0419df328d84..b42db3bdd5e0d 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_02/aio/_configuration.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_02/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 ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ComputeManagementClient. Note that all parameters used to create this instance are saved as instance diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_02/aio/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_02/aio/operations/__init__.py index 8ca1cc2598c3b..0e0c2d8aaf8d4 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_02/aio/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_02/aio/operations/__init__.py @@ -5,15 +5,21 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._operations import DisksOperations -from ._operations import DiskAccessesOperations -from ._operations import DiskEncryptionSetsOperations -from ._operations import DiskRestorePointOperations -from ._operations import SnapshotsOperations +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._operations import DisksOperations # type: ignore +from ._operations import DiskAccessesOperations # type: ignore +from ._operations import DiskEncryptionSetsOperations # type: ignore +from ._operations import DiskRestorePointOperations # type: ignore +from ._operations import SnapshotsOperations # 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__ = [ @@ -23,5 +29,5 @@ "DiskRestorePointOperations", "SnapshotsOperations", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_02/aio/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_02/aio/operations/_operations.py index 6d7aa53b72fe7..7bc85f6a15f7f 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_02/aio/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_02/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. @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -76,7 +76,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]] @@ -104,7 +104,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.Disk, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -288,7 +288,7 @@ def get_long_running_output(pipeline_response): async def _update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.DiskUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -483,7 +483,7 @@ async def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.compute.v2024_03_02.models.Disk :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -526,7 +526,7 @@ async def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> return deserialized # type: ignore async def _delete_initial(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -643,7 +643,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-02")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -718,7 +718,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Disk"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-02")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -785,7 +785,7 @@ async def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -980,7 +980,7 @@ def get_long_running_output(pipeline_response): async def _revoke_access_initial( self, resource_group_name: str, disk_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1113,7 +1113,7 @@ async def _create_or_update_initial( disk_access: Union[_models.DiskAccess, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1310,7 +1310,7 @@ async def _update_initial( disk_access: Union[_models.DiskAccessUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1514,7 +1514,7 @@ async def get(self, resource_group_name: str, disk_access_name: str, **kwargs: A :rtype: ~azure.mgmt.compute.v2024_03_02.models.DiskAccess :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1559,7 +1559,7 @@ async def get(self, resource_group_name: str, disk_access_name: str, **kwargs: A async def _delete_initial( self, resource_group_name: str, disk_access_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1679,7 +1679,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-02")) cls: ClsType[_models.DiskAccessList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1755,7 +1755,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.DiskAccess"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-02")) cls: ClsType[_models.DiskAccessList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1831,7 +1831,7 @@ async def get_private_link_resources( :rtype: ~azure.mgmt.compute.v2024_03_02.models.PrivateLinkResourceListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1881,7 +1881,7 @@ async def _update_a_private_endpoint_connection_initial( # pylint: disable=name private_endpoint_connection: Union[_models.PrivateEndpointConnection, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2109,7 +2109,7 @@ async def get_a_private_endpoint_connection( :rtype: ~azure.mgmt.compute.v2024_03_02.models.PrivateEndpointConnection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2155,7 +2155,7 @@ async def get_a_private_endpoint_connection( async def _delete_a_private_endpoint_connection_initial( # pylint: disable=name-too-long self, resource_group_name: str, disk_access_name: str, private_endpoint_connection_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2286,7 +2286,7 @@ def list_private_endpoint_connections( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-02")) cls: ClsType[_models.PrivateEndpointConnectionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2376,7 +2376,7 @@ async def _create_or_update_initial( disk_encryption_set: Union[_models.DiskEncryptionSet, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2577,7 +2577,7 @@ async def _update_initial( disk_encryption_set: Union[_models.DiskEncryptionSetUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2788,7 +2788,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2024_03_02.models.DiskEncryptionSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2833,7 +2833,7 @@ async def get( async def _delete_initial( self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2955,7 +2955,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-02")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3031,7 +3031,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.DiskEncryptionSet"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-02")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3113,7 +3113,7 @@ def list_associated_resources( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-02")) cls: ClsType[_models.ResourceUriList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3221,7 +3221,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2024_03_02.models.DiskRestorePoint :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3290,7 +3290,7 @@ def list_by_restore_point( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-02")) cls: ClsType[_models.DiskRestorePointList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3362,7 +3362,7 @@ async def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3584,7 +3584,7 @@ async def _revoke_access_initial( disk_restore_point_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3726,7 +3726,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, snapshot_name: str, snapshot: Union[_models.Snapshot, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3917,7 +3917,7 @@ async def _update_initial( snapshot: Union[_models.SnapshotUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4121,7 +4121,7 @@ async def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) :rtype: ~azure.mgmt.compute.v2024_03_02.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4166,7 +4166,7 @@ async def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) async def _delete_initial( self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4284,7 +4284,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-02")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4360,7 +4360,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Snapshot"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-02")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4427,7 +4427,7 @@ async def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4622,7 +4622,7 @@ def get_long_running_output(pipeline_response): async def _revoke_access_initial( self, resource_group_name: str, snapshot_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_02/models/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_02/models/__init__.py index 697907ff3ad58..087321a1aa15d 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_02/models/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_02/models/__init__.py @@ -5,83 +5,94 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._models_py3 import AccessUri -from ._models_py3 import ApiError -from ._models_py3 import ApiErrorBase -from ._models_py3 import CopyCompletionError -from ._models_py3 import CreationData -from ._models_py3 import Disk -from ._models_py3 import DiskAccess -from ._models_py3 import DiskAccessList -from ._models_py3 import DiskAccessUpdate -from ._models_py3 import DiskEncryptionSet -from ._models_py3 import DiskEncryptionSetList -from ._models_py3 import DiskEncryptionSetUpdate -from ._models_py3 import DiskList -from ._models_py3 import DiskRestorePoint -from ._models_py3 import DiskRestorePointList -from ._models_py3 import DiskSecurityProfile -from ._models_py3 import DiskSku -from ._models_py3 import DiskUpdate -from ._models_py3 import Encryption -from ._models_py3 import EncryptionSetIdentity -from ._models_py3 import EncryptionSettingsCollection -from ._models_py3 import EncryptionSettingsElement -from ._models_py3 import ExtendedLocation -from ._models_py3 import GrantAccessData -from ._models_py3 import ImageDiskReference -from ._models_py3 import InnerError -from ._models_py3 import KeyForDiskEncryptionSet -from ._models_py3 import KeyVaultAndKeyReference -from ._models_py3 import KeyVaultAndSecretReference -from ._models_py3 import PrivateEndpoint -from ._models_py3 import PrivateEndpointConnection -from ._models_py3 import PrivateEndpointConnectionListResult -from ._models_py3 import PrivateLinkResource -from ._models_py3 import PrivateLinkResourceListResult -from ._models_py3 import PrivateLinkServiceConnectionState -from ._models_py3 import PropertyUpdatesInProgress -from ._models_py3 import ProxyOnlyResource -from ._models_py3 import PurchasePlan -from ._models_py3 import Resource -from ._models_py3 import ResourceUriList -from ._models_py3 import ResourceWithOptionalLocation -from ._models_py3 import ShareInfoElement -from ._models_py3 import Snapshot -from ._models_py3 import SnapshotList -from ._models_py3 import SnapshotSku -from ._models_py3 import SnapshotUpdate -from ._models_py3 import SourceVault -from ._models_py3 import SubResource -from ._models_py3 import SubResourceReadOnly -from ._models_py3 import SupportedCapabilities -from ._models_py3 import SystemData -from ._models_py3 import UserAssignedIdentitiesValue +from typing import TYPE_CHECKING -from ._compute_management_client_enums import AccessLevel -from ._compute_management_client_enums import Architecture -from ._compute_management_client_enums import CopyCompletionErrorReason -from ._compute_management_client_enums import DataAccessAuthMode -from ._compute_management_client_enums import DiskCreateOption -from ._compute_management_client_enums import DiskEncryptionSetIdentityType -from ._compute_management_client_enums import DiskEncryptionSetType -from ._compute_management_client_enums import DiskSecurityTypes -from ._compute_management_client_enums import DiskState -from ._compute_management_client_enums import DiskStorageAccountTypes -from ._compute_management_client_enums import EncryptionType -from ._compute_management_client_enums import ExtendedLocationTypes -from ._compute_management_client_enums import FileFormat -from ._compute_management_client_enums import HyperVGeneration -from ._compute_management_client_enums import NetworkAccessPolicy -from ._compute_management_client_enums import OperatingSystemTypes -from ._compute_management_client_enums import PrivateEndpointConnectionProvisioningState -from ._compute_management_client_enums import PrivateEndpointServiceConnectionStatus -from ._compute_management_client_enums import ProvisionedBandwidthCopyOption -from ._compute_management_client_enums import PublicNetworkAccess -from ._compute_management_client_enums import SnapshotStorageAccountTypes +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + + +from ._models_py3 import ( # type: ignore + AccessUri, + ApiError, + ApiErrorBase, + CopyCompletionError, + CreationData, + Disk, + DiskAccess, + DiskAccessList, + DiskAccessUpdate, + DiskEncryptionSet, + DiskEncryptionSetList, + DiskEncryptionSetUpdate, + DiskList, + DiskRestorePoint, + DiskRestorePointList, + DiskSecurityProfile, + DiskSku, + DiskUpdate, + Encryption, + EncryptionSetIdentity, + EncryptionSettingsCollection, + EncryptionSettingsElement, + ExtendedLocation, + GrantAccessData, + ImageDiskReference, + InnerError, + KeyForDiskEncryptionSet, + KeyVaultAndKeyReference, + KeyVaultAndSecretReference, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateEndpointConnectionListResult, + PrivateLinkResource, + PrivateLinkResourceListResult, + PrivateLinkServiceConnectionState, + PropertyUpdatesInProgress, + ProxyOnlyResource, + PurchasePlan, + Resource, + ResourceUriList, + ResourceWithOptionalLocation, + ShareInfoElement, + Snapshot, + SnapshotList, + SnapshotSku, + SnapshotUpdate, + SourceVault, + SubResource, + SubResourceReadOnly, + SupportedCapabilities, + SystemData, + UserAssignedIdentitiesValue, +) + +from ._compute_management_client_enums import ( # type: ignore + AccessLevel, + Architecture, + CopyCompletionErrorReason, + DataAccessAuthMode, + DiskCreateOption, + DiskEncryptionSetIdentityType, + DiskEncryptionSetType, + DiskSecurityTypes, + DiskState, + DiskStorageAccountTypes, + EncryptionType, + ExtendedLocationTypes, + FileFormat, + HyperVGeneration, + NetworkAccessPolicy, + OperatingSystemTypes, + PrivateEndpointConnectionProvisioningState, + PrivateEndpointServiceConnectionStatus, + ProvisionedBandwidthCopyOption, + PublicNetworkAccess, + SnapshotStorageAccountTypes, +) 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__ = [ @@ -159,5 +170,5 @@ "PublicNetworkAccess", "SnapshotStorageAccountTypes", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_02/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_02/models/_models_py3.py index f91e5c07a2393..22fde77e943dc 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_02/models/_models_py3.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_02/models/_models_py3.py @@ -1,5 +1,5 @@ -# 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. @@ -12,7 +12,6 @@ from ... import _serialization if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models @@ -171,7 +170,7 @@ def __init__( self.error_message = error_message -class CreationData(_serialization.Model): # pylint: disable=too-many-instance-attributes +class CreationData(_serialization.Model): """Data used when creating a disk. Variables are only populated by the server, and will be ignored when sending a request. @@ -370,7 +369,7 @@ def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kw self.tags = tags -class Disk(Resource): # pylint: disable=too-many-instance-attributes +class Disk(Resource): """Disk resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -872,7 +871,7 @@ def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> N self.tags = tags -class DiskEncryptionSet(Resource): # pylint: disable=too-many-instance-attributes +class DiskEncryptionSet(Resource): """disk encryption set resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -1173,7 +1172,7 @@ def __init__(self, **kwargs: Any) -> None: self.type = None -class DiskRestorePoint(ProxyOnlyResource): # pylint: disable=too-many-instance-attributes +class DiskRestorePoint(ProxyOnlyResource): """Properties of disk restore point. Variables are only populated by the server, and will be ignored when sending a request. @@ -1446,7 +1445,7 @@ def __init__(self, *, name: Optional[Union[str, "_models.DiskStorageAccountTypes self.tier = None -class DiskUpdate(_serialization.Model): # pylint: disable=too-many-instance-attributes +class DiskUpdate(_serialization.Model): """Disk update resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -2570,7 +2569,7 @@ def __init__(self, **kwargs: Any) -> None: self.vm_uri = None -class Snapshot(Resource): # pylint: disable=too-many-instance-attributes +class Snapshot(Resource): """Snapshot resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -2908,7 +2907,7 @@ def __init__( self.tier = None -class SnapshotUpdate(_serialization.Model): # pylint: disable=too-many-instance-attributes +class SnapshotUpdate(_serialization.Model): """Snapshot update resource. :ivar tags: Resource tags. diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_02/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_02/operations/__init__.py index 8ca1cc2598c3b..0e0c2d8aaf8d4 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_02/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_02/operations/__init__.py @@ -5,15 +5,21 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._operations import DisksOperations -from ._operations import DiskAccessesOperations -from ._operations import DiskEncryptionSetsOperations -from ._operations import DiskRestorePointOperations -from ._operations import SnapshotsOperations +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._operations import DisksOperations # type: ignore +from ._operations import DiskAccessesOperations # type: ignore +from ._operations import DiskEncryptionSetsOperations # type: ignore +from ._operations import DiskRestorePointOperations # type: ignore +from ._operations import SnapshotsOperations # 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__ = [ @@ -23,5 +29,5 @@ "DiskRestorePointOperations", "SnapshotsOperations", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_02/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_02/operations/_operations.py index 8023d86c5e592..edb0607d7879b 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_02/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_03_02/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. @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -36,7 +36,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, HttpResponse], T, Dict[str, Any]], Any]] @@ -1280,7 +1280,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.Disk, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1464,7 +1464,7 @@ def get_long_running_output(pipeline_response): def _update_initial( self, resource_group_name: str, disk_name: str, disk: Union[_models.DiskUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1659,7 +1659,7 @@ def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> _model :rtype: ~azure.mgmt.compute.v2024_03_02.models.Disk :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1702,7 +1702,7 @@ def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> _model return deserialized # type: ignore def _delete_initial(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1819,7 +1819,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-02")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1894,7 +1894,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Disk"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-02")) cls: ClsType[_models.DiskList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1961,7 +1961,7 @@ def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2151,7 +2151,7 @@ def get_long_running_output(pipeline_response): ) def _revoke_access_initial(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2282,7 +2282,7 @@ def _create_or_update_initial( disk_access: Union[_models.DiskAccess, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2476,7 +2476,7 @@ def _update_initial( disk_access: Union[_models.DiskAccessUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2677,7 +2677,7 @@ def get(self, resource_group_name: str, disk_access_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.compute.v2024_03_02.models.DiskAccess :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2720,7 +2720,7 @@ def get(self, resource_group_name: str, disk_access_name: str, **kwargs: Any) -> return deserialized # type: ignore def _delete_initial(self, resource_group_name: str, disk_access_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2837,7 +2837,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-02")) cls: ClsType[_models.DiskAccessList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2912,7 +2912,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.DiskAccess"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-02")) cls: ClsType[_models.DiskAccessList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2988,7 +2988,7 @@ def get_private_link_resources( :rtype: ~azure.mgmt.compute.v2024_03_02.models.PrivateLinkResourceListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3038,7 +3038,7 @@ def _update_a_private_endpoint_connection_initial( # pylint: disable=name-too-l private_endpoint_connection: Union[_models.PrivateEndpointConnection, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3266,7 +3266,7 @@ def get_a_private_endpoint_connection( :rtype: ~azure.mgmt.compute.v2024_03_02.models.PrivateEndpointConnection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3312,7 +3312,7 @@ def get_a_private_endpoint_connection( def _delete_a_private_endpoint_connection_initial( # pylint: disable=name-too-long self, resource_group_name: str, disk_access_name: str, private_endpoint_connection_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3443,7 +3443,7 @@ def list_private_endpoint_connections( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-02")) cls: ClsType[_models.PrivateEndpointConnectionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3533,7 +3533,7 @@ def _create_or_update_initial( disk_encryption_set: Union[_models.DiskEncryptionSet, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3731,7 +3731,7 @@ def _update_initial( disk_encryption_set: Union[_models.DiskEncryptionSetUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3937,7 +3937,7 @@ def get(self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: :rtype: ~azure.mgmt.compute.v2024_03_02.models.DiskEncryptionSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3982,7 +3982,7 @@ def get(self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: def _delete_initial( self, resource_group_name: str, disk_encryption_set_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4099,7 +4099,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-02")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4174,7 +4174,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.DiskEncryptionSet"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-02")) cls: ClsType[_models.DiskEncryptionSetList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4256,7 +4256,7 @@ def list_associated_resources( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-02")) cls: ClsType[_models.ResourceUriList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4364,7 +4364,7 @@ def get( :rtype: ~azure.mgmt.compute.v2024_03_02.models.DiskRestorePoint :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4432,7 +4432,7 @@ def list_by_restore_point( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-02")) cls: ClsType[_models.DiskRestorePointList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4504,7 +4504,7 @@ def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4723,7 +4723,7 @@ def _revoke_access_initial( disk_restore_point_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4865,7 +4865,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, snapshot_name: str, snapshot: Union[_models.Snapshot, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5053,7 +5053,7 @@ def _update_initial( snapshot: Union[_models.SnapshotUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5254,7 +5254,7 @@ def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> _m :rtype: ~azure.mgmt.compute.v2024_03_02.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5297,7 +5297,7 @@ def get(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> _m return deserialized # type: ignore def _delete_initial(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5414,7 +5414,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-02")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5489,7 +5489,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Snapshot"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-03-02")) cls: ClsType[_models.SnapshotList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5556,7 +5556,7 @@ def _grant_access_initial( grant_access_data: Union[_models.GrantAccessData, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5746,7 +5746,7 @@ def get_long_running_output(pipeline_response): ) def _revoke_access_initial(self, resource_group_name: str, snapshot_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_07_01/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_07_01/__init__.py index 3b1b6244b2375..ab7c46e8991db 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_07_01/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_07_01/__init__.py @@ -5,15 +5,21 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._compute_management_client import ComputeManagementClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._compute_management_client import ComputeManagementClient # 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__ = [ "ComputeManagementClient", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_07_01/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_07_01/_compute_management_client.py index ce88328e60c60..67e167d84a23e 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_07_01/_compute_management_client.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_07_01/_compute_management_client.py @@ -48,11 +48,10 @@ ) if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class ComputeManagementClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes +class ComputeManagementClient: # pylint: disable=too-many-instance-attributes """Compute Client. :ivar operations: Operations operations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_07_01/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_07_01/_configuration.py index fb6089897b8f7..22f72f6c21138 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_07_01/_configuration.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_07_01/_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 ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ComputeManagementClient. Note that all parameters used to create this instance are saved as instance diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_07_01/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_07_01/_version.py index d79b2760319c5..e5754a47ce68f 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_07_01/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_07_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "33.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_07_01/aio/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_07_01/aio/__init__.py index 0715f50185586..d3fd1ba93379a 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_07_01/aio/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_07_01/aio/__init__.py @@ -5,12 +5,18 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._compute_management_client import ComputeManagementClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._compute_management_client import ComputeManagementClient # 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__ = [ "ComputeManagementClient", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_07_01/aio/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_07_01/aio/_compute_management_client.py index 9e959467ea835..adc02c6df27a8 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_07_01/aio/_compute_management_client.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_07_01/aio/_compute_management_client.py @@ -48,11 +48,10 @@ ) if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class ComputeManagementClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes +class ComputeManagementClient: # pylint: disable=too-many-instance-attributes """Compute Client. :ivar operations: Operations operations diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_07_01/aio/_configuration.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_07_01/aio/_configuration.py index 5b63fdf3b5964..c8d72d0b6036d 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_07_01/aio/_configuration.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_07_01/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 ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ComputeManagementClient. Note that all parameters used to create this instance are saved as instance diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_07_01/aio/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_07_01/aio/operations/__init__.py index 3cc8e8e7a73a8..5cc9a11e23416 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_07_01/aio/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_07_01/aio/operations/__init__.py @@ -5,36 +5,42 @@ # Code generated by Microsoft (R) AutoRest 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 UsageOperations -from ._operations import VirtualMachineSizesOperations -from ._operations import VirtualMachineScaleSetsOperations -from ._operations import VirtualMachineScaleSetExtensionsOperations -from ._operations import VirtualMachineScaleSetRollingUpgradesOperations -from ._operations import VirtualMachineScaleSetVMExtensionsOperations -from ._operations import VirtualMachineScaleSetVMsOperations -from ._operations import VirtualMachineExtensionsOperations -from ._operations import VirtualMachinesOperations -from ._operations import VirtualMachineImagesOperations -from ._operations import VirtualMachineImagesEdgeZoneOperations -from ._operations import VirtualMachineExtensionImagesOperations -from ._operations import AvailabilitySetsOperations -from ._operations import ProximityPlacementGroupsOperations -from ._operations import DedicatedHostGroupsOperations -from ._operations import DedicatedHostsOperations -from ._operations import SshPublicKeysOperations -from ._operations import ImagesOperations -from ._operations import RestorePointCollectionsOperations -from ._operations import RestorePointsOperations -from ._operations import CapacityReservationGroupsOperations -from ._operations import CapacityReservationsOperations -from ._operations import LogAnalyticsOperations -from ._operations import VirtualMachineRunCommandsOperations -from ._operations import VirtualMachineScaleSetVMRunCommandsOperations +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 UsageOperations # type: ignore +from ._operations import VirtualMachineSizesOperations # type: ignore +from ._operations import VirtualMachineScaleSetsOperations # type: ignore +from ._operations import VirtualMachineScaleSetExtensionsOperations # type: ignore +from ._operations import VirtualMachineScaleSetRollingUpgradesOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMExtensionsOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMsOperations # type: ignore +from ._operations import VirtualMachineExtensionsOperations # type: ignore +from ._operations import VirtualMachinesOperations # type: ignore +from ._operations import VirtualMachineImagesOperations # type: ignore +from ._operations import VirtualMachineImagesEdgeZoneOperations # type: ignore +from ._operations import VirtualMachineExtensionImagesOperations # type: ignore +from ._operations import AvailabilitySetsOperations # type: ignore +from ._operations import ProximityPlacementGroupsOperations # type: ignore +from ._operations import DedicatedHostGroupsOperations # type: ignore +from ._operations import DedicatedHostsOperations # type: ignore +from ._operations import SshPublicKeysOperations # type: ignore +from ._operations import ImagesOperations # type: ignore +from ._operations import RestorePointCollectionsOperations # type: ignore +from ._operations import RestorePointsOperations # type: ignore +from ._operations import CapacityReservationGroupsOperations # type: ignore +from ._operations import CapacityReservationsOperations # type: ignore +from ._operations import LogAnalyticsOperations # type: ignore +from ._operations import VirtualMachineRunCommandsOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMRunCommandsOperations # 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__ = [ @@ -65,5 +71,5 @@ "VirtualMachineRunCommandsOperations", "VirtualMachineScaleSetVMRunCommandsOperations", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_07_01/aio/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_07_01/aio/operations/_operations.py index 99d1752327683..653214579aeb6 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_07_01/aio/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_07_01/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. @@ -8,21 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import ( - Any, - AsyncIterable, - AsyncIterator, - Callable, - Dict, - IO, - List, - Optional, - Type, - TypeVar, - Union, - cast, - overload, -) +from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, List, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -231,7 +217,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]] @@ -272,7 +258,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.ComputeOperationValue"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-07-01")) cls: ClsType[_models.ComputeOperationListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -369,7 +355,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.Usage"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-07-01")) cls: ClsType[_models.ListUsagesResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -469,7 +455,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.VirtualMa api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-07-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -570,7 +556,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> AsyncIterable["_mode api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-07-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -641,7 +627,7 @@ async def _create_or_update_initial( if_none_match: Optional[str] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -871,7 +857,7 @@ async def _update_initial( if_none_match: Optional[str] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1095,7 +1081,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, *, force_deletion: Optional[bool] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1224,7 +1210,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2024_07_01.models.VirtualMachineScaleSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1276,7 +1262,7 @@ async def _deallocate_initial( hibernate: Optional[bool] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1491,7 +1477,7 @@ async def _delete_instances_initial( force_deletion: Optional[bool] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1699,7 +1685,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2024_07_01.models.VirtualMachineScaleSetInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1759,7 +1745,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-07-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1838,7 +1824,7 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.VirtualMachineScaleS api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-07-01")) cls: ClsType[_models.VirtualMachineScaleSetListWithLinkResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1921,7 +1907,7 @@ def list_skus( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-07-01")) cls: ClsType[_models.VirtualMachineScaleSetListSkusResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1987,6 +1973,7 @@ async def get_next(next_link=None): def get_os_upgrade_history( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> AsyncIterable["_models.UpgradeOperationHistoricalStatusInfo"]: + # pylint: disable=line-too-long """Gets list of OS upgrades on a VM scale set instance. :param resource_group_name: The name of the resource group. Required. @@ -2005,7 +1992,7 @@ def get_os_upgrade_history( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-07-01")) cls: ClsType[_models.VirtualMachineScaleSetListOSUpgradeHistory] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2076,7 +2063,7 @@ async def _power_off_initial( skip_shutdown: bool = False, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2289,7 +2276,7 @@ async def _restart_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2478,7 +2465,7 @@ async def _start_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2663,7 +2650,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _reapply_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2778,7 +2765,7 @@ async def _redeploy_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2970,7 +2957,7 @@ async def _perform_maintenance_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3168,7 +3155,7 @@ async def _update_instances_initial( vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3354,7 +3341,7 @@ async def _reimage_initial( vm_scale_set_reimage_input: Optional[Union[_models.VirtualMachineScaleSetReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3547,7 +3534,7 @@ async def _reimage_all_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3739,7 +3726,7 @@ async def _approve_rolling_upgrade_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3958,7 +3945,7 @@ async def force_recovery_service_fabric_platform_update_domain_walk( # pylint: :rtype: ~azure.mgmt.compute.v2024_07_01.models.RecoveryWalkResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4004,7 +3991,7 @@ async def force_recovery_service_fabric_platform_update_domain_walk( # pylint: return deserialized # type: ignore @overload - async def convert_to_single_placement_group( # pylint: disable=inconsistent-return-statements + async def convert_to_single_placement_group( self, resource_group_name: str, vm_scale_set_name: str, @@ -4032,7 +4019,7 @@ async def convert_to_single_placement_group( # pylint: disable=inconsistent-ret """ @overload - async def convert_to_single_placement_group( # pylint: disable=inconsistent-return-statements + async def convert_to_single_placement_group( self, resource_group_name: str, vm_scale_set_name: str, @@ -4059,7 +4046,7 @@ async def convert_to_single_placement_group( # pylint: disable=inconsistent-ret """ @distributed_trace_async - async def convert_to_single_placement_group( # pylint: disable=inconsistent-return-statements + async def convert_to_single_placement_group( self, resource_group_name: str, vm_scale_set_name: str, @@ -4082,7 +4069,7 @@ async def convert_to_single_placement_group( # pylint: disable=inconsistent-ret :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4139,7 +4126,7 @@ async def _set_orchestration_service_state_initial( parameters: Union[_models.OrchestrationServiceStateInput, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4347,7 +4334,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtension, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4558,7 +4545,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtensionUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4765,7 +4752,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, vmss_extension_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4895,7 +4882,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2024_07_01.models.VirtualMachineScaleSetExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4961,7 +4948,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-07-01")) cls: ClsType[_models.VirtualMachineScaleSetExtensionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5047,7 +5034,7 @@ def __init__(self, *args, **kwargs) -> None: async def _cancel_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5151,7 +5138,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_os_upgrade_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5257,7 +5244,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_extension_upgrade_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5374,7 +5361,7 @@ async def get_latest( :rtype: ~azure.mgmt.compute.v2024_07_01.models.RollingUpgradeStatusInfo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5446,7 +5433,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetVMExtension, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5666,7 +5653,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetVMExtensionUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -5881,7 +5868,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, vm_extension_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6017,7 +6004,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2024_07_01.models.VirtualMachineScaleSetVMExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6086,7 +6073,7 @@ async def list( :rtype: ~azure.mgmt.compute.v2024_07_01.models.VirtualMachineScaleSetVMExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6163,7 +6150,7 @@ async def _reimage_initial( ] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6362,7 +6349,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _reimage_all_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6471,7 +6458,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _approve_rolling_upgrade_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6582,7 +6569,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _deallocate_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6700,7 +6687,7 @@ async def _update_initial( if_none_match: Optional[str] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6945,7 +6932,7 @@ async def _delete_initial( force_deletion: Optional[bool] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7087,7 +7074,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2024_07_01.models.VirtualMachineScaleSetVM :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7147,7 +7134,7 @@ async def get_instance_view( :rtype: ~azure.mgmt.compute.v2024_07_01.models.VirtualMachineScaleSetVMInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7229,7 +7216,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-07-01")) cls: ClsType[_models.VirtualMachineScaleSetVMListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7303,7 +7290,7 @@ async def _power_off_initial( skip_shutdown: bool = False, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7425,7 +7412,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _restart_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7533,7 +7520,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _start_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7641,7 +7628,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _redeploy_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7774,7 +7761,7 @@ async def retrieve_boot_diagnostics_data( :rtype: ~azure.mgmt.compute.v2024_07_01.models.RetrieveBootDiagnosticsDataResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7821,7 +7808,7 @@ async def retrieve_boot_diagnostics_data( async def _perform_maintenance_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7927,7 +7914,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace_async - async def simulate_eviction( # pylint: disable=inconsistent-return-statements + async def simulate_eviction( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> None: """The operation to simulate the eviction of spot virtual machine in a VM scale set. @@ -7942,7 +7929,7 @@ async def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7989,7 +7976,7 @@ async def _attach_detach_data_disks_initial( parameters: Union[_models.AttachDetachDataDisksRequest, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8203,7 +8190,7 @@ async def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8430,7 +8417,7 @@ async def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineExtension, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8640,7 +8627,7 @@ async def _update_initial( extension_parameters: Union[_models.VirtualMachineExtensionUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8846,7 +8833,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_name: str, vm_extension_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8976,7 +8963,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2024_07_01.models.VirtualMachineExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9036,7 +9023,7 @@ async def list( :rtype: ~azure.mgmt.compute.v2024_07_01.models.VirtualMachineExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9118,7 +9105,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> AsyncIterable["_mode api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-07-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9186,7 +9173,7 @@ async def _capture_initial( parameters: Union[_models.VirtualMachineCaptureParameters, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9387,7 +9374,7 @@ async def _create_or_update_initial( if_none_match: Optional[str] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9620,7 +9607,7 @@ async def _update_initial( if_none_match: Optional[str] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9843,7 +9830,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_name: str, *, force_deletion: Optional[bool] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9974,7 +9961,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2024_07_01.models.VirtualMachine :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10031,7 +10018,7 @@ async def instance_view( :rtype: ~azure.mgmt.compute.v2024_07_01.models.VirtualMachineInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10076,7 +10063,7 @@ async def instance_view( async def _convert_to_managed_disks_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10181,7 +10168,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _deallocate_initial( self, resource_group_name: str, vm_name: str, *, hibernate: Optional[bool] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10288,9 +10275,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace_async - async def generalize( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, vm_name: str, **kwargs: Any - ) -> None: + async def generalize(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> None: """Sets the OS state of the virtual machine to generalized. It is recommended to sysprep the virtual machine before performing this operation. For Windows, please refer to `Create a managed image of a generalized VM in Azure @@ -10306,7 +10291,7 @@ async def generalize( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10353,6 +10338,7 @@ def list( expand: Optional[Union[str, _models.ExpandTypeForListVMs]] = None, **kwargs: Any ) -> AsyncIterable["_models.VirtualMachine"]: + # pylint: disable=line-too-long """Lists all of the virtual machines in the specified resource group. Use the nextLink property in the response to get the next page of virtual machines. @@ -10378,7 +10364,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-07-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10450,6 +10436,7 @@ def list_all( expand: Optional[Union[str, _models.ExpandTypesForListVMs]] = None, **kwargs: Any ) -> AsyncIterable["_models.VirtualMachine"]: + # pylint: disable=line-too-long """Lists all of the virtual machines in the specified subscription. Use the nextLink property in the response to get the next page of virtual machines. @@ -10476,7 +10463,7 @@ def list_all( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-07-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10561,7 +10548,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-07-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10626,7 +10613,7 @@ async def get_next(next_link=None): async def _power_off_initial( self, resource_group_name: str, vm_name: str, *, skip_shutdown: bool = False, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10735,7 +10722,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _reapply_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10835,7 +10822,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _restart_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10935,7 +10922,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _start_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11035,7 +11022,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _redeploy_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11141,7 +11128,7 @@ async def _reimage_initial( parameters: Optional[Union[_models.VirtualMachineReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11360,7 +11347,7 @@ async def retrieve_boot_diagnostics_data( :rtype: ~azure.mgmt.compute.v2024_07_01.models.RetrieveBootDiagnosticsDataResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11406,7 +11393,7 @@ async def retrieve_boot_diagnostics_data( async def _perform_maintenance_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11508,9 +11495,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace_async - async def simulate_eviction( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, vm_name: str, **kwargs: Any - ) -> None: + async def simulate_eviction(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> None: """The operation to simulate the eviction of spot virtual machine. :param resource_group_name: The name of the resource group. Required. @@ -11521,7 +11506,7 @@ async def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11562,7 +11547,7 @@ async def simulate_eviction( # pylint: disable=inconsistent-return-statements async def _assess_patches_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11678,7 +11663,7 @@ async def _install_patches_initial( install_patches_input: Union[_models.VirtualMachineInstallPatchesParameters, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11876,7 +11861,7 @@ async def _attach_detach_data_disks_initial( parameters: Union[_models.AttachDetachDataDisksRequest, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12077,7 +12062,7 @@ async def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12305,7 +12290,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2024_07_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12384,7 +12369,7 @@ async def list( :rtype: list[~azure.mgmt.compute.v2024_07_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12445,7 +12430,7 @@ async def list_offers( :rtype: list[~azure.mgmt.compute.v2024_07_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12497,7 +12482,7 @@ async def list_publishers(self, location: str, **kwargs: Any) -> List[_models.Vi :rtype: list[~azure.mgmt.compute.v2024_07_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12554,7 +12539,7 @@ async def list_skus( :rtype: list[~azure.mgmt.compute.v2024_07_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12611,7 +12596,7 @@ async def list_by_edge_zone( :rtype: ~azure.mgmt.compute.v2024_07_01.models.VmImagesInEdgeZoneListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12696,7 +12681,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2024_07_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12781,7 +12766,7 @@ async def list( :rtype: list[~azure.mgmt.compute.v2024_07_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12846,7 +12831,7 @@ async def list_offers( :rtype: list[~azure.mgmt.compute.v2024_07_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12903,7 +12888,7 @@ async def list_publishers( :rtype: list[~azure.mgmt.compute.v2024_07_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12964,7 +12949,7 @@ async def list_skus( :rtype: list[~azure.mgmt.compute.v2024_07_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13047,7 +13032,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2024_07_01.models.VirtualMachineExtensionImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13105,7 +13090,7 @@ async def list_types( :rtype: list[~azure.mgmt.compute.v2024_07_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13177,7 +13162,7 @@ async def list_versions( :rtype: list[~azure.mgmt.compute.v2024_07_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13317,7 +13302,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2024_07_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13444,7 +13429,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2024_07_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13499,9 +13484,7 @@ async def update( return deserialized # type: ignore @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, availability_set_name: str, **kwargs: Any - ) -> None: + async def delete(self, resource_group_name: str, availability_set_name: str, **kwargs: Any) -> None: """Delete an availability set. :param resource_group_name: The name of the resource group. Required. @@ -13512,7 +13495,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13562,7 +13545,7 @@ async def get(self, resource_group_name: str, availability_set_name: str, **kwar :rtype: ~azure.mgmt.compute.v2024_07_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13624,7 +13607,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-07-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13702,7 +13685,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-07-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13785,7 +13768,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-07-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13943,7 +13926,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2024_07_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14073,7 +14056,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2024_07_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14128,9 +14111,7 @@ async def update( return deserialized # type: ignore @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, proximity_placement_group_name: str, **kwargs: Any - ) -> None: + async def delete(self, resource_group_name: str, proximity_placement_group_name: str, **kwargs: Any) -> None: """Delete a proximity placement group. :param resource_group_name: The name of the resource group. Required. @@ -14141,7 +14122,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14201,7 +14182,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2024_07_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14260,7 +14241,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Proximit api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-07-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14340,7 +14321,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-07-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14501,7 +14482,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2024_07_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14628,7 +14609,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2024_07_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14683,9 +14664,7 @@ async def update( return deserialized # type: ignore @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, host_group_name: str, **kwargs: Any - ) -> None: + async def delete(self, resource_group_name: str, host_group_name: str, **kwargs: Any) -> None: """Delete a dedicated host group. :param resource_group_name: The name of the resource group. Required. @@ -14696,7 +14675,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14758,7 +14737,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2024_07_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14821,7 +14800,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-07-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14898,7 +14877,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Dedicate api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-07-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14987,7 +14966,7 @@ async def _create_or_update_initial( parameters: Union[_models.DedicatedHost, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15191,7 +15170,7 @@ async def _update_initial( parameters: Union[_models.DedicatedHostUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15390,7 +15369,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15521,7 +15500,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2024_07_01.models.DedicatedHost :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15587,7 +15566,7 @@ def list_by_host_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-07-01")) cls: ClsType[_models.DedicatedHostListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15652,7 +15631,7 @@ async def get_next(next_link=None): async def _restart_initial( self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15763,7 +15742,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _redeploy_initial( self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15899,7 +15878,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-07-01")) cls: ClsType[_models.DedicatedHostSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16000,7 +15979,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.SshPubli api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-07-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16081,7 +16060,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-07-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16215,7 +16194,7 @@ async def create( :rtype: ~azure.mgmt.compute.v2024_07_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16343,7 +16322,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2024_07_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16398,9 +16377,7 @@ async def update( return deserialized # type: ignore @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, ssh_public_key_name: str, **kwargs: Any - ) -> None: + async def delete(self, resource_group_name: str, ssh_public_key_name: str, **kwargs: Any) -> None: """Delete an SSH public key. :param resource_group_name: The name of the resource group. Required. @@ -16411,7 +16388,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16463,7 +16440,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2024_07_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16585,7 +16562,7 @@ async def generate_key_pair( :rtype: ~azure.mgmt.compute.v2024_07_01.models.SshPublicKeyGenerateKeyPairResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16666,7 +16643,7 @@ def __init__(self, *args, **kwargs) -> None: async def _create_or_update_initial( self, resource_group_name: str, image_name: str, parameters: Union[_models.Image, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16848,7 +16825,7 @@ async def _update_initial( parameters: Union[_models.ImageUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17028,7 +17005,7 @@ def get_long_running_output(pipeline_response): ) async def _delete_initial(self, resource_group_name: str, image_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17143,7 +17120,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2024_07_01.models.Image :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17203,7 +17180,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-07-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17279,7 +17256,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Image"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-07-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17441,7 +17418,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2024_07_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17571,7 +17548,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2024_07_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17628,7 +17605,7 @@ async def update( async def _delete_initial( self, resource_group_name: str, restore_point_collection_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17754,7 +17731,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2024_07_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17815,7 +17792,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-07-01")) cls: ClsType[_models.RestorePointCollectionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17894,7 +17871,7 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.RestorePointCollecti api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-07-01")) cls: ClsType[_models.RestorePointCollectionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17983,7 +17960,7 @@ async def _create_initial( parameters: Union[_models.RestorePoint, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18182,7 +18159,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, restore_point_collection_name: str, restore_point_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18312,7 +18289,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2024_07_01.models.RestorePoint :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18456,7 +18433,7 @@ async def create_or_update( :rtype: ~azure.mgmt.compute.v2024_07_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18589,7 +18566,7 @@ async def update( :rtype: ~azure.mgmt.compute.v2024_07_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18644,9 +18621,7 @@ async def update( return deserialized # type: ignore @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, capacity_reservation_group_name: str, **kwargs: Any - ) -> None: + async def delete(self, resource_group_name: str, capacity_reservation_group_name: str, **kwargs: Any) -> None: """The operation to delete a capacity reservation group. This operation is allowed only if all the associated resources are disassociated from the reservation group and all capacity reservations under the reservation group have also been deleted. Please refer to @@ -18660,7 +18635,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18724,7 +18699,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2024_07_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18798,7 +18773,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-07-01")) cls: ClsType[_models.CapacityReservationGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18898,7 +18873,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-07-01")) cls: ClsType[_models.CapacityReservationGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18989,7 +18964,7 @@ async def _create_or_update_initial( parameters: Union[_models.CapacityReservation, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19199,7 +19174,7 @@ async def _update_initial( parameters: Union[_models.CapacityReservationUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19402,7 +19377,7 @@ async def _delete_initial( capacity_reservation_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19540,7 +19515,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2024_07_01.models.CapacityReservation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19606,7 +19581,7 @@ def list_by_capacity_reservation_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-07-01")) cls: ClsType[_models.CapacityReservationListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19692,7 +19667,7 @@ def __init__(self, *args, **kwargs) -> None: async def _export_request_rate_by_interval_initial( self, location: str, parameters: Union[_models.RequestRateByIntervalInput, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19870,7 +19845,7 @@ def get_long_running_output(pipeline_response): async def _export_throttled_requests_initial( self, location: str, parameters: Union[_models.ThrottledRequestsInput, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20081,7 +20056,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.RunComman api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-07-01")) cls: ClsType[_models.RunCommandListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20154,7 +20129,7 @@ async def get(self, location: str, command_id: str, **kwargs: Any) -> _models.Ru :rtype: ~azure.mgmt.compute.v2024_07_01.models.RunCommandDocument :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20204,7 +20179,7 @@ async def _create_or_update_initial( run_command: Union[_models.VirtualMachineRunCommand, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20413,7 +20388,7 @@ async def _update_initial( run_command: Union[_models.VirtualMachineRunCommandUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20618,7 +20593,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_name: str, run_command_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20748,7 +20723,7 @@ async def get_by_virtual_machine( :rtype: ~azure.mgmt.compute.v2024_07_01.models.VirtualMachineRunCommand :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20816,7 +20791,7 @@ def list_by_virtual_machine( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-07-01")) cls: ClsType[_models.VirtualMachineRunCommandsListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20909,7 +20884,7 @@ async def _create_or_update_initial( run_command: Union[_models.VirtualMachineRunCommand, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21127,7 +21102,7 @@ async def _update_initial( run_command: Union[_models.VirtualMachineRunCommandUpdate, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21340,7 +21315,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, run_command_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21476,7 +21451,7 @@ async def get( :rtype: ~azure.mgmt.compute.v2024_07_01.models.VirtualMachineRunCommand :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21553,7 +21528,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-07-01")) cls: ClsType[_models.VirtualMachineRunCommandsListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_07_01/models/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_07_01/models/__init__.py index 459e1c8d48425..671f80ca3ffcb 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_07_01/models/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_07_01/models/__init__.py @@ -5,373 +5,384 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._models_py3 import AdditionalCapabilities -from ._models_py3 import AdditionalUnattendContent -from ._models_py3 import AlternativeOption -from ._models_py3 import ApiEntityReference -from ._models_py3 import ApiError -from ._models_py3 import ApiErrorBase -from ._models_py3 import ApplicationProfile -from ._models_py3 import AttachDetachDataDisksRequest -from ._models_py3 import AutomaticOSUpgradePolicy -from ._models_py3 import AutomaticOSUpgradeProperties -from ._models_py3 import AutomaticRepairsPolicy -from ._models_py3 import AvailabilitySet -from ._models_py3 import AvailabilitySetListResult -from ._models_py3 import AvailabilitySetUpdate -from ._models_py3 import AvailablePatchSummary -from ._models_py3 import BillingProfile -from ._models_py3 import BootDiagnostics -from ._models_py3 import BootDiagnosticsInstanceView -from ._models_py3 import CapacityReservation -from ._models_py3 import CapacityReservationGroup -from ._models_py3 import CapacityReservationGroupInstanceView -from ._models_py3 import CapacityReservationGroupListResult -from ._models_py3 import CapacityReservationGroupUpdate -from ._models_py3 import CapacityReservationInstanceView -from ._models_py3 import CapacityReservationInstanceViewWithName -from ._models_py3 import CapacityReservationListResult -from ._models_py3 import CapacityReservationProfile -from ._models_py3 import CapacityReservationUpdate -from ._models_py3 import CapacityReservationUtilization -from ._models_py3 import ComputeOperationListResult -from ._models_py3 import ComputeOperationValue -from ._models_py3 import DataDisk -from ._models_py3 import DataDiskImage -from ._models_py3 import DataDisksToAttach -from ._models_py3 import DataDisksToDetach -from ._models_py3 import DedicatedHost -from ._models_py3 import DedicatedHostAllocatableVM -from ._models_py3 import DedicatedHostAvailableCapacity -from ._models_py3 import DedicatedHostGroup -from ._models_py3 import DedicatedHostGroupInstanceView -from ._models_py3 import DedicatedHostGroupListResult -from ._models_py3 import DedicatedHostGroupPropertiesAdditionalCapabilities -from ._models_py3 import DedicatedHostGroupUpdate -from ._models_py3 import DedicatedHostInstanceView -from ._models_py3 import DedicatedHostInstanceViewWithName -from ._models_py3 import DedicatedHostListResult -from ._models_py3 import DedicatedHostSizeListResult -from ._models_py3 import DedicatedHostUpdate -from ._models_py3 import DiagnosticsProfile -from ._models_py3 import DiffDiskSettings -from ._models_py3 import DisallowedConfiguration -from ._models_py3 import DiskEncryptionSetParameters -from ._models_py3 import DiskEncryptionSettings -from ._models_py3 import DiskInstanceView -from ._models_py3 import DiskRestorePointAttributes -from ._models_py3 import DiskRestorePointInstanceView -from ._models_py3 import DiskRestorePointReplicationStatus -from ._models_py3 import EncryptionIdentity -from ._models_py3 import EventGridAndResourceGraph -from ._models_py3 import ExtendedLocation -from ._models_py3 import HardwareProfile -from ._models_py3 import Image -from ._models_py3 import ImageDataDisk -from ._models_py3 import ImageDeprecationStatus -from ._models_py3 import ImageDisk -from ._models_py3 import ImageListResult -from ._models_py3 import ImageOSDisk -from ._models_py3 import ImageReference -from ._models_py3 import ImageStorageProfile -from ._models_py3 import ImageUpdate -from ._models_py3 import InnerError -from ._models_py3 import InstanceViewStatus -from ._models_py3 import KeyVaultKeyReference -from ._models_py3 import KeyVaultSecretReference -from ._models_py3 import LastPatchInstallationSummary -from ._models_py3 import LinuxConfiguration -from ._models_py3 import LinuxParameters -from ._models_py3 import LinuxPatchSettings -from ._models_py3 import LinuxVMGuestPatchAutomaticByPlatformSettings -from ._models_py3 import ListUsagesResult -from ._models_py3 import LogAnalyticsInputBase -from ._models_py3 import LogAnalyticsOperationResult -from ._models_py3 import LogAnalyticsOutput -from ._models_py3 import MaintenanceRedeployStatus -from ._models_py3 import ManagedDiskParameters -from ._models_py3 import NetworkInterfaceReference -from ._models_py3 import NetworkProfile -from ._models_py3 import OSDisk -from ._models_py3 import OSDiskImage -from ._models_py3 import OSImageNotificationProfile -from ._models_py3 import OSProfile -from ._models_py3 import OSProfileProvisioningData -from ._models_py3 import OrchestrationServiceStateInput -from ._models_py3 import OrchestrationServiceSummary -from ._models_py3 import PatchInstallationDetail -from ._models_py3 import PatchSettings -from ._models_py3 import Plan -from ._models_py3 import PriorityMixPolicy -from ._models_py3 import ProximityPlacementGroup -from ._models_py3 import ProximityPlacementGroupListResult -from ._models_py3 import ProximityPlacementGroupPropertiesIntent -from ._models_py3 import ProximityPlacementGroupUpdate -from ._models_py3 import ProxyAgentSettings -from ._models_py3 import ProxyResource -from ._models_py3 import PublicIPAddressSku -from ._models_py3 import PurchasePlan -from ._models_py3 import RecoveryWalkResponse -from ._models_py3 import RequestRateByIntervalInput -from ._models_py3 import ResiliencyPolicy -from ._models_py3 import ResilientVMCreationPolicy -from ._models_py3 import ResilientVMDeletionPolicy -from ._models_py3 import Resource -from ._models_py3 import ResourceSharingProfile -from ._models_py3 import ResourceWithOptionalLocation -from ._models_py3 import RestorePoint -from ._models_py3 import RestorePointCollection -from ._models_py3 import RestorePointCollectionListResult -from ._models_py3 import RestorePointCollectionSourceProperties -from ._models_py3 import RestorePointCollectionUpdate -from ._models_py3 import RestorePointEncryption -from ._models_py3 import RestorePointInstanceView -from ._models_py3 import RestorePointSourceMetadata -from ._models_py3 import RestorePointSourceVMDataDisk -from ._models_py3 import RestorePointSourceVMOSDisk -from ._models_py3 import RestorePointSourceVMStorageProfile -from ._models_py3 import RetrieveBootDiagnosticsDataResult -from ._models_py3 import RollbackStatusInfo -from ._models_py3 import RollingUpgradePolicy -from ._models_py3 import RollingUpgradeProgressInfo -from ._models_py3 import RollingUpgradeRunningStatus -from ._models_py3 import RollingUpgradeStatusInfo -from ._models_py3 import RunCommandDocument -from ._models_py3 import RunCommandDocumentBase -from ._models_py3 import RunCommandInput -from ._models_py3 import RunCommandInputParameter -from ._models_py3 import RunCommandListResult -from ._models_py3 import RunCommandManagedIdentity -from ._models_py3 import RunCommandParameterDefinition -from ._models_py3 import RunCommandResult -from ._models_py3 import ScaleInPolicy -from ._models_py3 import ScheduledEventsAdditionalPublishingTargets -from ._models_py3 import ScheduledEventsPolicy -from ._models_py3 import ScheduledEventsProfile -from ._models_py3 import SecurityPostureReference -from ._models_py3 import SecurityPostureReferenceUpdate -from ._models_py3 import SecurityProfile -from ._models_py3 import ServiceArtifactReference -from ._models_py3 import Sku -from ._models_py3 import SkuProfile -from ._models_py3 import SkuProfileVMSize -from ._models_py3 import SpotRestorePolicy -from ._models_py3 import SshConfiguration -from ._models_py3 import SshGenerateKeyPairInputParameters -from ._models_py3 import SshPublicKey -from ._models_py3 import SshPublicKeyGenerateKeyPairResult -from ._models_py3 import SshPublicKeyResource -from ._models_py3 import SshPublicKeyUpdateResource -from ._models_py3 import SshPublicKeysGroupListResult -from ._models_py3 import StorageProfile -from ._models_py3 import SubResource -from ._models_py3 import SubResourceReadOnly -from ._models_py3 import SubResourceWithColocationStatus -from ._models_py3 import SystemData -from ._models_py3 import TerminateNotificationProfile -from ._models_py3 import ThrottledRequestsInput -from ._models_py3 import UefiSettings -from ._models_py3 import UpdateResource -from ._models_py3 import UpgradeOperationHistoricalStatusInfo -from ._models_py3 import UpgradeOperationHistoricalStatusInfoProperties -from ._models_py3 import UpgradeOperationHistoryStatus -from ._models_py3 import UpgradePolicy -from ._models_py3 import Usage -from ._models_py3 import UsageName -from ._models_py3 import UserAssignedIdentitiesValue -from ._models_py3 import UserInitiatedReboot -from ._models_py3 import UserInitiatedRedeploy -from ._models_py3 import VMDiskSecurityProfile -from ._models_py3 import VMGalleryApplication -from ._models_py3 import VMScaleSetConvertToSinglePlacementGroupInput -from ._models_py3 import VMSizeProperties -from ._models_py3 import VaultCertificate -from ._models_py3 import VaultSecretGroup -from ._models_py3 import VirtualHardDisk -from ._models_py3 import VirtualMachine -from ._models_py3 import VirtualMachineAgentInstanceView -from ._models_py3 import VirtualMachineAssessPatchesResult -from ._models_py3 import VirtualMachineCaptureParameters -from ._models_py3 import VirtualMachineCaptureResult -from ._models_py3 import VirtualMachineExtension -from ._models_py3 import VirtualMachineExtensionHandlerInstanceView -from ._models_py3 import VirtualMachineExtensionImage -from ._models_py3 import VirtualMachineExtensionInstanceView -from ._models_py3 import VirtualMachineExtensionUpdate -from ._models_py3 import VirtualMachineExtensionsListResult -from ._models_py3 import VirtualMachineHealthStatus -from ._models_py3 import VirtualMachineIdentity -from ._models_py3 import VirtualMachineImage -from ._models_py3 import VirtualMachineImageFeature -from ._models_py3 import VirtualMachineImageResource -from ._models_py3 import VirtualMachineInstallPatchesParameters -from ._models_py3 import VirtualMachineInstallPatchesResult -from ._models_py3 import VirtualMachineInstanceView -from ._models_py3 import VirtualMachineIpTag -from ._models_py3 import VirtualMachineListResult -from ._models_py3 import VirtualMachineNetworkInterfaceConfiguration -from ._models_py3 import VirtualMachineNetworkInterfaceDnsSettingsConfiguration -from ._models_py3 import VirtualMachineNetworkInterfaceIPConfiguration -from ._models_py3 import VirtualMachinePatchStatus -from ._models_py3 import VirtualMachinePublicIPAddressConfiguration -from ._models_py3 import VirtualMachinePublicIPAddressDnsSettingsConfiguration -from ._models_py3 import VirtualMachineReimageParameters -from ._models_py3 import VirtualMachineRunCommand -from ._models_py3 import VirtualMachineRunCommandInstanceView -from ._models_py3 import VirtualMachineRunCommandScriptSource -from ._models_py3 import VirtualMachineRunCommandUpdate -from ._models_py3 import VirtualMachineRunCommandsListResult -from ._models_py3 import VirtualMachineScaleSet -from ._models_py3 import VirtualMachineScaleSetDataDisk -from ._models_py3 import VirtualMachineScaleSetExtension -from ._models_py3 import VirtualMachineScaleSetExtensionListResult -from ._models_py3 import VirtualMachineScaleSetExtensionProfile -from ._models_py3 import VirtualMachineScaleSetExtensionUpdate -from ._models_py3 import VirtualMachineScaleSetHardwareProfile -from ._models_py3 import VirtualMachineScaleSetIPConfiguration -from ._models_py3 import VirtualMachineScaleSetIdentity -from ._models_py3 import VirtualMachineScaleSetInstanceView -from ._models_py3 import VirtualMachineScaleSetInstanceViewStatusesSummary -from ._models_py3 import VirtualMachineScaleSetIpTag -from ._models_py3 import VirtualMachineScaleSetListOSUpgradeHistory -from ._models_py3 import VirtualMachineScaleSetListResult -from ._models_py3 import VirtualMachineScaleSetListSkusResult -from ._models_py3 import VirtualMachineScaleSetListWithLinkResult -from ._models_py3 import VirtualMachineScaleSetManagedDiskParameters -from ._models_py3 import VirtualMachineScaleSetNetworkConfiguration -from ._models_py3 import VirtualMachineScaleSetNetworkConfigurationDnsSettings -from ._models_py3 import VirtualMachineScaleSetNetworkProfile -from ._models_py3 import VirtualMachineScaleSetOSDisk -from ._models_py3 import VirtualMachineScaleSetOSProfile -from ._models_py3 import VirtualMachineScaleSetPublicIPAddressConfiguration -from ._models_py3 import VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings -from ._models_py3 import VirtualMachineScaleSetReimageParameters -from ._models_py3 import VirtualMachineScaleSetSku -from ._models_py3 import VirtualMachineScaleSetSkuCapacity -from ._models_py3 import VirtualMachineScaleSetStorageProfile -from ._models_py3 import VirtualMachineScaleSetUpdate -from ._models_py3 import VirtualMachineScaleSetUpdateIPConfiguration -from ._models_py3 import VirtualMachineScaleSetUpdateNetworkConfiguration -from ._models_py3 import VirtualMachineScaleSetUpdateNetworkProfile -from ._models_py3 import VirtualMachineScaleSetUpdateOSDisk -from ._models_py3 import VirtualMachineScaleSetUpdateOSProfile -from ._models_py3 import VirtualMachineScaleSetUpdatePublicIPAddressConfiguration -from ._models_py3 import VirtualMachineScaleSetUpdateStorageProfile -from ._models_py3 import VirtualMachineScaleSetUpdateVMProfile -from ._models_py3 import VirtualMachineScaleSetVM -from ._models_py3 import VirtualMachineScaleSetVMExtension -from ._models_py3 import VirtualMachineScaleSetVMExtensionUpdate -from ._models_py3 import VirtualMachineScaleSetVMExtensionsListResult -from ._models_py3 import VirtualMachineScaleSetVMExtensionsSummary -from ._models_py3 import VirtualMachineScaleSetVMInstanceIDs -from ._models_py3 import VirtualMachineScaleSetVMInstanceRequiredIDs -from ._models_py3 import VirtualMachineScaleSetVMInstanceView -from ._models_py3 import VirtualMachineScaleSetVMListResult -from ._models_py3 import VirtualMachineScaleSetVMNetworkProfileConfiguration -from ._models_py3 import VirtualMachineScaleSetVMProfile -from ._models_py3 import VirtualMachineScaleSetVMProtectionPolicy -from ._models_py3 import VirtualMachineScaleSetVMReimageParameters -from ._models_py3 import VirtualMachineSize -from ._models_py3 import VirtualMachineSizeListResult -from ._models_py3 import VirtualMachineSoftwarePatchProperties -from ._models_py3 import VirtualMachineStatusCodeCount -from ._models_py3 import VirtualMachineUpdate -from ._models_py3 import VmImagesInEdgeZoneListResult -from ._models_py3 import WinRMConfiguration -from ._models_py3 import WinRMListener -from ._models_py3 import WindowsConfiguration -from ._models_py3 import WindowsParameters -from ._models_py3 import WindowsVMGuestPatchAutomaticByPlatformSettings +from typing import TYPE_CHECKING -from ._compute_management_client_enums import AllocationStrategy -from ._compute_management_client_enums import AlternativeType -from ._compute_management_client_enums import ArchitectureTypes -from ._compute_management_client_enums import AvailabilitySetSkuTypes -from ._compute_management_client_enums import CachingTypes -from ._compute_management_client_enums import CapacityReservationGroupInstanceViewTypes -from ._compute_management_client_enums import CapacityReservationInstanceViewTypes -from ._compute_management_client_enums import ConsistencyModeTypes -from ._compute_management_client_enums import DedicatedHostLicenseTypes -from ._compute_management_client_enums import DeleteOptions -from ._compute_management_client_enums import DiffDiskOptions -from ._compute_management_client_enums import DiffDiskPlacement -from ._compute_management_client_enums import DiskControllerTypes -from ._compute_management_client_enums import DiskCreateOptionTypes -from ._compute_management_client_enums import DiskDeleteOptionTypes -from ._compute_management_client_enums import DiskDetachOptionTypes -from ._compute_management_client_enums import DomainNameLabelScopeTypes -from ._compute_management_client_enums import ExecutionState -from ._compute_management_client_enums import ExpandTypeForListVMs -from ._compute_management_client_enums import ExpandTypesForGetCapacityReservationGroups -from ._compute_management_client_enums import ExpandTypesForGetVMScaleSets -from ._compute_management_client_enums import ExpandTypesForListVMs -from ._compute_management_client_enums import ExtendedLocationTypes -from ._compute_management_client_enums import HyperVGeneration -from ._compute_management_client_enums import HyperVGenerationType -from ._compute_management_client_enums import HyperVGenerationTypes -from ._compute_management_client_enums import IPVersion -from ._compute_management_client_enums import IPVersions -from ._compute_management_client_enums import ImageState -from ._compute_management_client_enums import InstanceViewTypes -from ._compute_management_client_enums import IntervalInMins -from ._compute_management_client_enums import LinuxPatchAssessmentMode -from ._compute_management_client_enums import LinuxVMGuestPatchAutomaticByPlatformRebootSetting -from ._compute_management_client_enums import LinuxVMGuestPatchMode -from ._compute_management_client_enums import MaintenanceOperationResultCodeTypes -from ._compute_management_client_enums import Mode -from ._compute_management_client_enums import NetworkApiVersion -from ._compute_management_client_enums import NetworkInterfaceAuxiliaryMode -from ._compute_management_client_enums import NetworkInterfaceAuxiliarySku -from ._compute_management_client_enums import OperatingSystemStateTypes -from ._compute_management_client_enums import OperatingSystemType -from ._compute_management_client_enums import OperatingSystemTypes -from ._compute_management_client_enums import OrchestrationMode -from ._compute_management_client_enums import OrchestrationServiceNames -from ._compute_management_client_enums import OrchestrationServiceState -from ._compute_management_client_enums import OrchestrationServiceStateAction -from ._compute_management_client_enums import PatchAssessmentState -from ._compute_management_client_enums import PatchInstallationState -from ._compute_management_client_enums import PatchOperationStatus -from ._compute_management_client_enums import ProtocolTypes -from ._compute_management_client_enums import ProximityPlacementGroupType -from ._compute_management_client_enums import PublicIPAddressSkuName -from ._compute_management_client_enums import PublicIPAddressSkuTier -from ._compute_management_client_enums import PublicIPAllocationMethod -from ._compute_management_client_enums import RepairAction -from ._compute_management_client_enums import ResourceIdOptionsForGetCapacityReservationGroups -from ._compute_management_client_enums import ResourceIdentityType -from ._compute_management_client_enums import RestorePointCollectionExpandOptions -from ._compute_management_client_enums import RestorePointEncryptionType -from ._compute_management_client_enums import RestorePointExpandOptions -from ._compute_management_client_enums import RollingUpgradeActionType -from ._compute_management_client_enums import RollingUpgradeStatusCode -from ._compute_management_client_enums import SecurityEncryptionTypes -from ._compute_management_client_enums import SecurityTypes -from ._compute_management_client_enums import SettingNames -from ._compute_management_client_enums import SshEncryptionTypes -from ._compute_management_client_enums import StatusLevelTypes -from ._compute_management_client_enums import StorageAccountTypes -from ._compute_management_client_enums import UpgradeMode -from ._compute_management_client_enums import UpgradeOperationInvoker -from ._compute_management_client_enums import UpgradeState -from ._compute_management_client_enums import VMGuestPatchClassificationLinux -from ._compute_management_client_enums import VMGuestPatchClassificationWindows -from ._compute_management_client_enums import VMGuestPatchRebootBehavior -from ._compute_management_client_enums import VMGuestPatchRebootSetting -from ._compute_management_client_enums import VMGuestPatchRebootStatus -from ._compute_management_client_enums import VirtualMachineEvictionPolicyTypes -from ._compute_management_client_enums import VirtualMachinePriorityTypes -from ._compute_management_client_enums import VirtualMachineScaleSetScaleInRules -from ._compute_management_client_enums import VirtualMachineScaleSetSkuScaleType -from ._compute_management_client_enums import VirtualMachineSizeTypes -from ._compute_management_client_enums import VmDiskTypes -from ._compute_management_client_enums import WindowsPatchAssessmentMode -from ._compute_management_client_enums import WindowsVMGuestPatchAutomaticByPlatformRebootSetting -from ._compute_management_client_enums import WindowsVMGuestPatchMode -from ._compute_management_client_enums import ZonalPlatformFaultDomainAlignMode +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + + +from ._models_py3 import ( # type: ignore + AdditionalCapabilities, + AdditionalUnattendContent, + AlternativeOption, + ApiEntityReference, + ApiError, + ApiErrorBase, + ApplicationProfile, + AttachDetachDataDisksRequest, + AutomaticOSUpgradePolicy, + AutomaticOSUpgradeProperties, + AutomaticRepairsPolicy, + AvailabilitySet, + AvailabilitySetListResult, + AvailabilitySetUpdate, + AvailablePatchSummary, + BillingProfile, + BootDiagnostics, + BootDiagnosticsInstanceView, + CapacityReservation, + CapacityReservationGroup, + CapacityReservationGroupInstanceView, + CapacityReservationGroupListResult, + CapacityReservationGroupUpdate, + CapacityReservationInstanceView, + CapacityReservationInstanceViewWithName, + CapacityReservationListResult, + CapacityReservationProfile, + CapacityReservationUpdate, + CapacityReservationUtilization, + ComputeOperationListResult, + ComputeOperationValue, + DataDisk, + DataDiskImage, + DataDisksToAttach, + DataDisksToDetach, + DedicatedHost, + DedicatedHostAllocatableVM, + DedicatedHostAvailableCapacity, + DedicatedHostGroup, + DedicatedHostGroupInstanceView, + DedicatedHostGroupListResult, + DedicatedHostGroupPropertiesAdditionalCapabilities, + DedicatedHostGroupUpdate, + DedicatedHostInstanceView, + DedicatedHostInstanceViewWithName, + DedicatedHostListResult, + DedicatedHostSizeListResult, + DedicatedHostUpdate, + DiagnosticsProfile, + DiffDiskSettings, + DisallowedConfiguration, + DiskEncryptionSetParameters, + DiskEncryptionSettings, + DiskInstanceView, + DiskRestorePointAttributes, + DiskRestorePointInstanceView, + DiskRestorePointReplicationStatus, + EncryptionIdentity, + EventGridAndResourceGraph, + ExtendedLocation, + HardwareProfile, + Image, + ImageDataDisk, + ImageDeprecationStatus, + ImageDisk, + ImageListResult, + ImageOSDisk, + ImageReference, + ImageStorageProfile, + ImageUpdate, + InnerError, + InstanceViewStatus, + KeyVaultKeyReference, + KeyVaultSecretReference, + LastPatchInstallationSummary, + LinuxConfiguration, + LinuxParameters, + LinuxPatchSettings, + LinuxVMGuestPatchAutomaticByPlatformSettings, + ListUsagesResult, + LogAnalyticsInputBase, + LogAnalyticsOperationResult, + LogAnalyticsOutput, + MaintenanceRedeployStatus, + ManagedDiskParameters, + NetworkInterfaceReference, + NetworkProfile, + OSDisk, + OSDiskImage, + OSImageNotificationProfile, + OSProfile, + OSProfileProvisioningData, + OrchestrationServiceStateInput, + OrchestrationServiceSummary, + PatchInstallationDetail, + PatchSettings, + Plan, + PriorityMixPolicy, + ProximityPlacementGroup, + ProximityPlacementGroupListResult, + ProximityPlacementGroupPropertiesIntent, + ProximityPlacementGroupUpdate, + ProxyAgentSettings, + ProxyResource, + PublicIPAddressSku, + PurchasePlan, + RecoveryWalkResponse, + RequestRateByIntervalInput, + ResiliencyPolicy, + ResilientVMCreationPolicy, + ResilientVMDeletionPolicy, + Resource, + ResourceSharingProfile, + ResourceWithOptionalLocation, + RestorePoint, + RestorePointCollection, + RestorePointCollectionListResult, + RestorePointCollectionSourceProperties, + RestorePointCollectionUpdate, + RestorePointEncryption, + RestorePointInstanceView, + RestorePointSourceMetadata, + RestorePointSourceVMDataDisk, + RestorePointSourceVMOSDisk, + RestorePointSourceVMStorageProfile, + RetrieveBootDiagnosticsDataResult, + RollbackStatusInfo, + RollingUpgradePolicy, + RollingUpgradeProgressInfo, + RollingUpgradeRunningStatus, + RollingUpgradeStatusInfo, + RunCommandDocument, + RunCommandDocumentBase, + RunCommandInput, + RunCommandInputParameter, + RunCommandListResult, + RunCommandManagedIdentity, + RunCommandParameterDefinition, + RunCommandResult, + ScaleInPolicy, + ScheduledEventsAdditionalPublishingTargets, + ScheduledEventsPolicy, + ScheduledEventsProfile, + SecurityPostureReference, + SecurityPostureReferenceUpdate, + SecurityProfile, + ServiceArtifactReference, + Sku, + SkuProfile, + SkuProfileVMSize, + SpotRestorePolicy, + SshConfiguration, + SshGenerateKeyPairInputParameters, + SshPublicKey, + SshPublicKeyGenerateKeyPairResult, + SshPublicKeyResource, + SshPublicKeyUpdateResource, + SshPublicKeysGroupListResult, + StorageProfile, + SubResource, + SubResourceReadOnly, + SubResourceWithColocationStatus, + SystemData, + TerminateNotificationProfile, + ThrottledRequestsInput, + UefiSettings, + UpdateResource, + UpgradeOperationHistoricalStatusInfo, + UpgradeOperationHistoricalStatusInfoProperties, + UpgradeOperationHistoryStatus, + UpgradePolicy, + Usage, + UsageName, + UserAssignedIdentitiesValue, + UserInitiatedReboot, + UserInitiatedRedeploy, + VMDiskSecurityProfile, + VMGalleryApplication, + VMScaleSetConvertToSinglePlacementGroupInput, + VMSizeProperties, + VaultCertificate, + VaultSecretGroup, + VirtualHardDisk, + VirtualMachine, + VirtualMachineAgentInstanceView, + VirtualMachineAssessPatchesResult, + VirtualMachineCaptureParameters, + VirtualMachineCaptureResult, + VirtualMachineExtension, + VirtualMachineExtensionHandlerInstanceView, + VirtualMachineExtensionImage, + VirtualMachineExtensionInstanceView, + VirtualMachineExtensionUpdate, + VirtualMachineExtensionsListResult, + VirtualMachineHealthStatus, + VirtualMachineIdentity, + VirtualMachineImage, + VirtualMachineImageFeature, + VirtualMachineImageResource, + VirtualMachineInstallPatchesParameters, + VirtualMachineInstallPatchesResult, + VirtualMachineInstanceView, + VirtualMachineIpTag, + VirtualMachineListResult, + VirtualMachineNetworkInterfaceConfiguration, + VirtualMachineNetworkInterfaceDnsSettingsConfiguration, + VirtualMachineNetworkInterfaceIPConfiguration, + VirtualMachinePatchStatus, + VirtualMachinePublicIPAddressConfiguration, + VirtualMachinePublicIPAddressDnsSettingsConfiguration, + VirtualMachineReimageParameters, + VirtualMachineRunCommand, + VirtualMachineRunCommandInstanceView, + VirtualMachineRunCommandScriptSource, + VirtualMachineRunCommandUpdate, + VirtualMachineRunCommandsListResult, + VirtualMachineScaleSet, + VirtualMachineScaleSetDataDisk, + VirtualMachineScaleSetExtension, + VirtualMachineScaleSetExtensionListResult, + VirtualMachineScaleSetExtensionProfile, + VirtualMachineScaleSetExtensionUpdate, + VirtualMachineScaleSetHardwareProfile, + VirtualMachineScaleSetIPConfiguration, + VirtualMachineScaleSetIdentity, + VirtualMachineScaleSetInstanceView, + VirtualMachineScaleSetInstanceViewStatusesSummary, + VirtualMachineScaleSetIpTag, + VirtualMachineScaleSetListOSUpgradeHistory, + VirtualMachineScaleSetListResult, + VirtualMachineScaleSetListSkusResult, + VirtualMachineScaleSetListWithLinkResult, + VirtualMachineScaleSetManagedDiskParameters, + VirtualMachineScaleSetNetworkConfiguration, + VirtualMachineScaleSetNetworkConfigurationDnsSettings, + VirtualMachineScaleSetNetworkProfile, + VirtualMachineScaleSetOSDisk, + VirtualMachineScaleSetOSProfile, + VirtualMachineScaleSetPublicIPAddressConfiguration, + VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings, + VirtualMachineScaleSetReimageParameters, + VirtualMachineScaleSetSku, + VirtualMachineScaleSetSkuCapacity, + VirtualMachineScaleSetStorageProfile, + VirtualMachineScaleSetUpdate, + VirtualMachineScaleSetUpdateIPConfiguration, + VirtualMachineScaleSetUpdateNetworkConfiguration, + VirtualMachineScaleSetUpdateNetworkProfile, + VirtualMachineScaleSetUpdateOSDisk, + VirtualMachineScaleSetUpdateOSProfile, + VirtualMachineScaleSetUpdatePublicIPAddressConfiguration, + VirtualMachineScaleSetUpdateStorageProfile, + VirtualMachineScaleSetUpdateVMProfile, + VirtualMachineScaleSetVM, + VirtualMachineScaleSetVMExtension, + VirtualMachineScaleSetVMExtensionUpdate, + VirtualMachineScaleSetVMExtensionsListResult, + VirtualMachineScaleSetVMExtensionsSummary, + VirtualMachineScaleSetVMInstanceIDs, + VirtualMachineScaleSetVMInstanceRequiredIDs, + VirtualMachineScaleSetVMInstanceView, + VirtualMachineScaleSetVMListResult, + VirtualMachineScaleSetVMNetworkProfileConfiguration, + VirtualMachineScaleSetVMProfile, + VirtualMachineScaleSetVMProtectionPolicy, + VirtualMachineScaleSetVMReimageParameters, + VirtualMachineSize, + VirtualMachineSizeListResult, + VirtualMachineSoftwarePatchProperties, + VirtualMachineStatusCodeCount, + VirtualMachineUpdate, + VmImagesInEdgeZoneListResult, + WinRMConfiguration, + WinRMListener, + WindowsConfiguration, + WindowsParameters, + WindowsVMGuestPatchAutomaticByPlatformSettings, +) + +from ._compute_management_client_enums import ( # type: ignore + AllocationStrategy, + AlternativeType, + ArchitectureTypes, + AvailabilitySetSkuTypes, + CachingTypes, + CapacityReservationGroupInstanceViewTypes, + CapacityReservationInstanceViewTypes, + ConsistencyModeTypes, + DedicatedHostLicenseTypes, + DeleteOptions, + DiffDiskOptions, + DiffDiskPlacement, + DiskControllerTypes, + DiskCreateOptionTypes, + DiskDeleteOptionTypes, + DiskDetachOptionTypes, + DomainNameLabelScopeTypes, + ExecutionState, + ExpandTypeForListVMs, + ExpandTypesForGetCapacityReservationGroups, + ExpandTypesForGetVMScaleSets, + ExpandTypesForListVMs, + ExtendedLocationTypes, + HyperVGeneration, + HyperVGenerationType, + HyperVGenerationTypes, + IPVersion, + IPVersions, + ImageState, + InstanceViewTypes, + IntervalInMins, + LinuxPatchAssessmentMode, + LinuxVMGuestPatchAutomaticByPlatformRebootSetting, + LinuxVMGuestPatchMode, + MaintenanceOperationResultCodeTypes, + Mode, + NetworkApiVersion, + NetworkInterfaceAuxiliaryMode, + NetworkInterfaceAuxiliarySku, + OperatingSystemStateTypes, + OperatingSystemType, + OperatingSystemTypes, + OrchestrationMode, + OrchestrationServiceNames, + OrchestrationServiceState, + OrchestrationServiceStateAction, + PatchAssessmentState, + PatchInstallationState, + PatchOperationStatus, + ProtocolTypes, + ProximityPlacementGroupType, + PublicIPAddressSkuName, + PublicIPAddressSkuTier, + PublicIPAllocationMethod, + RepairAction, + ResourceIdOptionsForGetCapacityReservationGroups, + ResourceIdentityType, + RestorePointCollectionExpandOptions, + RestorePointEncryptionType, + RestorePointExpandOptions, + RollingUpgradeActionType, + RollingUpgradeStatusCode, + SecurityEncryptionTypes, + SecurityTypes, + SettingNames, + SshEncryptionTypes, + StatusLevelTypes, + StorageAccountTypes, + UpgradeMode, + UpgradeOperationInvoker, + UpgradeState, + VMGuestPatchClassificationLinux, + VMGuestPatchClassificationWindows, + VMGuestPatchRebootBehavior, + VMGuestPatchRebootSetting, + VMGuestPatchRebootStatus, + VirtualMachineEvictionPolicyTypes, + VirtualMachinePriorityTypes, + VirtualMachineScaleSetScaleInRules, + VirtualMachineScaleSetSkuScaleType, + VirtualMachineSizeTypes, + VmDiskTypes, + WindowsPatchAssessmentMode, + WindowsVMGuestPatchAutomaticByPlatformRebootSetting, + WindowsVMGuestPatchMode, + ZonalPlatformFaultDomainAlignMode, +) 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__ = [ @@ -739,5 +750,5 @@ "WindowsVMGuestPatchMode", "ZonalPlatformFaultDomainAlignMode", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_07_01/models/_compute_management_client_enums.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_07_01/models/_compute_management_client_enums.py index 7d0ce35d15ce8..55da0686cef47 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_07_01/models/_compute_management_client_enums.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_07_01/models/_compute_management_client_enums.py @@ -166,8 +166,8 @@ class DiskDetachOptionTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): detachment attempt of the data disk did not complete due to an unexpected failure from the virtual machine and the disk is still not released then use force-detach as a last resort option to detach the disk forcibly from the VM. All writes might not have been flushed when - using this detach behavior. **This feature is still in preview** mode. To force-detach a data - disk update toBeDetached to 'true' along with setting detachOption: 'ForceDetach'. + using this detach behavior. To force-detach a data disk update toBeDetached to 'true' along + with setting detachOption: 'ForceDetach'. """ FORCE_DETACH = "ForceDetach" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_07_01/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_07_01/models/_models_py3.py index d263c207a55b8..ddd5cda6d12bb 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_07_01/models/_models_py3.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_07_01/models/_models_py3.py @@ -1,5 +1,5 @@ -# 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. @@ -16,10 +16,9 @@ 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 if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object @@ -526,7 +525,7 @@ def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kw self.tags = tags -class AvailabilitySet(Resource): # pylint: disable=too-many-instance-attributes +class AvailabilitySet(Resource): """Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see `Availability sets @@ -963,7 +962,7 @@ def __init__(self, **kwargs: Any) -> None: self.status = None -class CapacityReservation(Resource): # pylint: disable=too-many-instance-attributes +class CapacityReservation(Resource): """Specifies information about the capacity reservation. Variables are only populated by the server, and will be ignored when sending a request. @@ -1653,7 +1652,7 @@ def __init__(self, **kwargs: Any) -> None: self.provider = None -class DataDisk(_serialization.Model): # pylint: disable=too-many-instance-attributes +class DataDisk(_serialization.Model): """Describes a data disk. Variables are only populated by the server, and will be ignored when sending a request. @@ -1715,9 +1714,8 @@ class DataDisk(_serialization.Model): # pylint: disable=too-many-instance-attri previous detachment attempt of the data disk did not complete due to an unexpected failure from the virtual machine and the disk is still not released then use force-detach as a last resort option to detach the disk forcibly from the VM. All writes might not have been flushed when - using this detach behavior. **This feature is still in preview** mode and is not supported for - VirtualMachineScaleSet. To force-detach a data disk update toBeDetached to 'true' along with - setting detachOption: 'ForceDetach'. "ForceDetach" + using this detach behavior. To force-detach a data disk update toBeDetached to 'true' along + with setting detachOption: 'ForceDetach'. "ForceDetach" :vartype detach_option: str or ~azure.mgmt.compute.v2024_07_01.models.DiskDetachOptionTypes :ivar delete_option: Specifies whether data disk should be deleted or detached upon VM deletion. Possible values are: **Delete.** If this value is used, the data disk is deleted when @@ -1817,9 +1815,8 @@ def __init__( previous detachment attempt of the data disk did not complete due to an unexpected failure from the virtual machine and the disk is still not released then use force-detach as a last resort option to detach the disk forcibly from the VM. All writes might not have been flushed when - using this detach behavior. **This feature is still in preview** mode and is not supported for - VirtualMachineScaleSet. To force-detach a data disk update toBeDetached to 'true' along with - setting detachOption: 'ForceDetach'. "ForceDetach" + using this detach behavior. To force-detach a data disk update toBeDetached to 'true' along + with setting detachOption: 'ForceDetach'. "ForceDetach" :paramtype detach_option: str or ~azure.mgmt.compute.v2024_07_01.models.DiskDetachOptionTypes :keyword delete_option: Specifies whether data disk should be deleted or detached upon VM deletion. Possible values are: **Delete.** If this value is used, the data disk is deleted when @@ -1995,7 +1992,7 @@ def __init__( self.detach_option = detach_option -class DedicatedHost(Resource): # pylint: disable=too-many-instance-attributes +class DedicatedHost(Resource): """Specifies information about the Dedicated host. Variables are only populated by the server, and will be ignored when sending a request. @@ -2173,7 +2170,7 @@ def __init__( self.allocatable_v_ms = allocatable_v_ms -class DedicatedHostGroup(Resource): # pylint: disable=too-many-instance-attributes +class DedicatedHostGroup(Resource): """Specifies information about the dedicated host group that the dedicated hosts should be assigned to. Currently, a dedicated host can only be added to a dedicated host group at creation time. An existing dedicated host cannot be added to another dedicated host group. @@ -2607,7 +2604,7 @@ def __init__(self, *, value: Optional[List[str]] = None, **kwargs: Any) -> None: self.value = value -class DedicatedHostUpdate(UpdateResource): # pylint: disable=too-many-instance-attributes +class DedicatedHostUpdate(UpdateResource): """Specifies information about the dedicated host. Only tags, autoReplaceOnFailure and licenseType may be updated. @@ -4111,7 +4108,7 @@ def __init__(self, *, secret_url: str, source_vault: "_models.SubResource", **kw self.source_vault = source_vault -class LastPatchInstallationSummary(_serialization.Model): # pylint: disable=too-many-instance-attributes +class LastPatchInstallationSummary(_serialization.Model): """Describes the properties of the last installed patch summary. Variables are only populated by the server, and will be ignored when sending a request. @@ -4890,7 +4887,7 @@ def __init__(self, **kwargs: Any) -> None: self.service_state = None -class OSDisk(_serialization.Model): # pylint: disable=too-many-instance-attributes +class OSDisk(_serialization.Model): """Specifies information about the operating system disk used by the virtual machine. For more information about disks, see `About disks and VHDs for Azure virtual machines `_. @@ -5579,7 +5576,7 @@ def __init__( self.regular_priority_percentage_above_base = regular_priority_percentage_above_base -class ProximityPlacementGroup(Resource): # pylint: disable=too-many-instance-attributes +class ProximityPlacementGroup(Resource): """Specifies information about the proximity placement group. Variables are only populated by the server, and will be ignored when sending a request. @@ -8922,7 +8919,7 @@ def __init__(self, *, uri: Optional[str] = None, **kwargs: Any) -> None: self.uri = uri -class VirtualMachine(Resource): # pylint: disable=too-many-instance-attributes +class VirtualMachine(Resource): """Describes a Virtual Machine. Variables are only populated by the server, and will be ignored when sending a request. @@ -9516,7 +9513,7 @@ def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylin self.resources = None -class VirtualMachineExtension(ResourceWithOptionalLocation): # pylint: disable=too-many-instance-attributes +class VirtualMachineExtension(ResourceWithOptionalLocation): """Describes a Virtual Machine Extension. Variables are only populated by the server, and will be ignored when sending a request. @@ -9882,7 +9879,7 @@ def __init__(self, *, value: Optional[List["_models.VirtualMachineExtension"]] = self.value = value -class VirtualMachineExtensionUpdate(UpdateResource): # pylint: disable=too-many-instance-attributes +class VirtualMachineExtensionUpdate(UpdateResource): """Describes a Virtual Machine Extension. :ivar tags: Resource tags. @@ -10144,7 +10141,7 @@ def __init__( self.extended_location = extended_location -class VirtualMachineImage(VirtualMachineImageResource): # pylint: disable=too-many-instance-attributes +class VirtualMachineImage(VirtualMachineImageResource): """Describes a Virtual Machine Image. All required parameters must be populated in order to send to server. @@ -10369,7 +10366,7 @@ def __init__( self.linux_parameters = linux_parameters -class VirtualMachineInstallPatchesResult(_serialization.Model): # pylint: disable=too-many-instance-attributes +class VirtualMachineInstallPatchesResult(_serialization.Model): """The result summary of an installation operation. Variables are only populated by the server, and will be ignored when sending a request. @@ -10459,7 +10456,7 @@ def __init__(self, **kwargs: Any) -> None: self.error = None -class VirtualMachineInstanceView(_serialization.Model): # pylint: disable=too-many-instance-attributes +class VirtualMachineInstanceView(_serialization.Model): """The instance view of a virtual machine. Variables are only populated by the server, and will be ignored when sending a request. @@ -10671,9 +10668,7 @@ def __init__( self.next_link = next_link -class VirtualMachineNetworkInterfaceConfiguration( - _serialization.Model -): # pylint: disable=too-many-instance-attributes,name-too-long +class VirtualMachineNetworkInterfaceConfiguration(_serialization.Model): # pylint: disable=name-too-long """Describes a virtual machine network interface configurations. All required parameters must be populated in order to send to server. @@ -11202,7 +11197,7 @@ def __init__( self.os_profile = os_profile -class VirtualMachineRunCommand(Resource): # pylint: disable=too-many-instance-attributes +class VirtualMachineRunCommand(Resource): """Describes a Virtual Machine run command. Variables are only populated by the server, and will be ignored when sending a request. @@ -11577,7 +11572,7 @@ def __init__( self.next_link = next_link -class VirtualMachineRunCommandUpdate(UpdateResource): # pylint: disable=too-many-instance-attributes +class VirtualMachineRunCommandUpdate(UpdateResource): """Describes a Virtual Machine run command. Variables are only populated by the server, and will be ignored when sending a request. @@ -11761,7 +11756,7 @@ def __init__( self.treat_failure_as_deployment_failure = treat_failure_as_deployment_failure -class VirtualMachineScaleSet(Resource): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSet(Resource): """Describes a Virtual Machine Scale Set. Variables are only populated by the server, and will be ignored when sending a request. @@ -12206,7 +12201,7 @@ def __init__( self.delete_option = delete_option -class VirtualMachineScaleSetExtension(SubResourceReadOnly): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetExtension(SubResourceReadOnly): """Describes a Virtual Machine Scale Set Extension. Variables are only populated by the server, and will be ignored when sending a request. @@ -12426,7 +12421,7 @@ def __init__( self.extensions_time_budget = extensions_time_budget -class VirtualMachineScaleSetExtensionUpdate(SubResourceReadOnly): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetExtensionUpdate(SubResourceReadOnly): """Describes a Virtual Machine Scale Set Extension. Variables are only populated by the server, and will be ignored when sending a request. @@ -13078,9 +13073,7 @@ def __init__( self.security_profile = security_profile -class VirtualMachineScaleSetNetworkConfiguration( - _serialization.Model -): # pylint: disable=too-many-instance-attributes,name-too-long +class VirtualMachineScaleSetNetworkConfiguration(_serialization.Model): # pylint: disable=name-too-long """Describes a virtual machine scale set network profile's network configurations. All required parameters must be populated in order to send to server. @@ -13283,7 +13276,7 @@ def __init__( self.network_api_version = network_api_version -class VirtualMachineScaleSetOSDisk(_serialization.Model): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetOSDisk(_serialization.Model): """Describes a virtual machine scale set operating system disk. All required parameters must be populated in order to send to server. @@ -13983,7 +13976,7 @@ def __init__( self.disk_controller_type = disk_controller_type -class VirtualMachineScaleSetUpdate(UpdateResource): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetUpdate(UpdateResource): """Describes a Virtual Machine Scale Set. :ivar tags: Resource tags. @@ -14293,9 +14286,7 @@ def __init__( self.load_balancer_inbound_nat_pools = load_balancer_inbound_nat_pools -class VirtualMachineScaleSetUpdateNetworkConfiguration( - _serialization.Model -): # pylint: disable=too-many-instance-attributes,name-too-long +class VirtualMachineScaleSetUpdateNetworkConfiguration(_serialization.Model): # pylint: disable=name-too-long """Describes a virtual machine scale set network profile's network configurations. :ivar name: The network configuration name. @@ -14734,7 +14725,7 @@ def __init__( self.disk_controller_type = disk_controller_type -class VirtualMachineScaleSetUpdateVMProfile(_serialization.Model): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetUpdateVMProfile(_serialization.Model): """Describes a virtual machine scale set virtual machine profile. :ivar os_profile: The virtual machine scale set OS profile. @@ -14856,7 +14847,7 @@ def __init__( self.hardware_profile = hardware_profile -class VirtualMachineScaleSetVM(Resource): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetVM(Resource): """Describes a virtual machine scale set virtual machine. Variables are only populated by the server, and will be ignored when sending a request. @@ -15126,7 +15117,7 @@ def __init__( # pylint: disable=too-many-locals self.time_created = None -class VirtualMachineScaleSetVMExtension(SubResourceReadOnly): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetVMExtension(SubResourceReadOnly): """Describes a VMSS VM Extension. Variables are only populated by the server, and will be ignored when sending a request. @@ -15338,7 +15329,7 @@ def __init__(self, **kwargs: Any) -> None: self.statuses_summary = None -class VirtualMachineScaleSetVMExtensionUpdate(SubResourceReadOnly): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetVMExtensionUpdate(SubResourceReadOnly): """Describes a VMSS VM Extension. Variables are only populated by the server, and will be ignored when sending a request. @@ -15518,7 +15509,7 @@ def __init__(self, *, instance_ids: List[str], **kwargs: Any) -> None: self.instance_ids = instance_ids -class VirtualMachineScaleSetVMInstanceView(_serialization.Model): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetVMInstanceView(_serialization.Model): """The instance view of a virtual machine scale set VM. Variables are only populated by the server, and will be ignored when sending a request. @@ -15739,7 +15730,7 @@ def __init__( self.network_interface_configurations = network_interface_configurations -class VirtualMachineScaleSetVMProfile(_serialization.Model): # pylint: disable=too-many-instance-attributes +class VirtualMachineScaleSetVMProfile(_serialization.Model): """Describes a virtual machine scale set virtual machine profile. Variables are only populated by the server, and will be ignored when sending a request. @@ -16190,7 +16181,7 @@ def __init__(self, **kwargs: Any) -> None: self.count = None -class VirtualMachineUpdate(UpdateResource): # pylint: disable=too-many-instance-attributes +class VirtualMachineUpdate(UpdateResource): """Describes a Virtual Machine Update. Variables are only populated by the server, and will be ignored when sending a request. diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_07_01/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_07_01/operations/__init__.py index 3cc8e8e7a73a8..5cc9a11e23416 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_07_01/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_07_01/operations/__init__.py @@ -5,36 +5,42 @@ # Code generated by Microsoft (R) AutoRest 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 UsageOperations -from ._operations import VirtualMachineSizesOperations -from ._operations import VirtualMachineScaleSetsOperations -from ._operations import VirtualMachineScaleSetExtensionsOperations -from ._operations import VirtualMachineScaleSetRollingUpgradesOperations -from ._operations import VirtualMachineScaleSetVMExtensionsOperations -from ._operations import VirtualMachineScaleSetVMsOperations -from ._operations import VirtualMachineExtensionsOperations -from ._operations import VirtualMachinesOperations -from ._operations import VirtualMachineImagesOperations -from ._operations import VirtualMachineImagesEdgeZoneOperations -from ._operations import VirtualMachineExtensionImagesOperations -from ._operations import AvailabilitySetsOperations -from ._operations import ProximityPlacementGroupsOperations -from ._operations import DedicatedHostGroupsOperations -from ._operations import DedicatedHostsOperations -from ._operations import SshPublicKeysOperations -from ._operations import ImagesOperations -from ._operations import RestorePointCollectionsOperations -from ._operations import RestorePointsOperations -from ._operations import CapacityReservationGroupsOperations -from ._operations import CapacityReservationsOperations -from ._operations import LogAnalyticsOperations -from ._operations import VirtualMachineRunCommandsOperations -from ._operations import VirtualMachineScaleSetVMRunCommandsOperations +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 UsageOperations # type: ignore +from ._operations import VirtualMachineSizesOperations # type: ignore +from ._operations import VirtualMachineScaleSetsOperations # type: ignore +from ._operations import VirtualMachineScaleSetExtensionsOperations # type: ignore +from ._operations import VirtualMachineScaleSetRollingUpgradesOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMExtensionsOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMsOperations # type: ignore +from ._operations import VirtualMachineExtensionsOperations # type: ignore +from ._operations import VirtualMachinesOperations # type: ignore +from ._operations import VirtualMachineImagesOperations # type: ignore +from ._operations import VirtualMachineImagesEdgeZoneOperations # type: ignore +from ._operations import VirtualMachineExtensionImagesOperations # type: ignore +from ._operations import AvailabilitySetsOperations # type: ignore +from ._operations import ProximityPlacementGroupsOperations # type: ignore +from ._operations import DedicatedHostGroupsOperations # type: ignore +from ._operations import DedicatedHostsOperations # type: ignore +from ._operations import SshPublicKeysOperations # type: ignore +from ._operations import ImagesOperations # type: ignore +from ._operations import RestorePointCollectionsOperations # type: ignore +from ._operations import RestorePointsOperations # type: ignore +from ._operations import CapacityReservationGroupsOperations # type: ignore +from ._operations import CapacityReservationsOperations # type: ignore +from ._operations import LogAnalyticsOperations # type: ignore +from ._operations import VirtualMachineRunCommandsOperations # type: ignore +from ._operations import VirtualMachineScaleSetVMRunCommandsOperations # 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__ = [ @@ -65,5 +71,5 @@ "VirtualMachineRunCommandsOperations", "VirtualMachineScaleSetVMRunCommandsOperations", ] -__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/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_07_01/operations/_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_07_01/operations/_operations.py index 18ce4d2782ecc..72f937dab6a7c 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_07_01/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2024_07_01/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. @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from io import IOBase import sys -from typing import Any, Callable, Dict, IO, Iterable, Iterator, List, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Iterable, Iterator, List, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( @@ -36,7 +36,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, HttpResponse], T, Dict[str, Any]], Any]] @@ -6275,7 +6275,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.ComputeOperationValue"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-07-01")) cls: ClsType[_models.ComputeOperationListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6372,7 +6372,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.Usage"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-07-01")) cls: ClsType[_models.ListUsagesResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6471,7 +6471,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.VirtualMachine api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-07-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6572,7 +6572,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> Iterable["_models.Vi api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-07-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6643,7 +6643,7 @@ def _create_or_update_initial( if_none_match: Optional[str] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -6873,7 +6873,7 @@ def _update_initial( if_none_match: Optional[str] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7097,7 +7097,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, *, force_deletion: Optional[bool] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7226,7 +7226,7 @@ def get( :rtype: ~azure.mgmt.compute.v2024_07_01.models.VirtualMachineScaleSet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7278,7 +7278,7 @@ def _deallocate_initial( hibernate: Optional[bool] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7493,7 +7493,7 @@ def _delete_instances_initial( force_deletion: Optional[bool] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7701,7 +7701,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2024_07_01.models.VirtualMachineScaleSetInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7761,7 +7761,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Vir api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-07-01")) cls: ClsType[_models.VirtualMachineScaleSetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7840,7 +7840,7 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.VirtualMachineScaleSet"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-07-01")) cls: ClsType[_models.VirtualMachineScaleSetListWithLinkResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -7923,7 +7923,7 @@ def list_skus( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-07-01")) cls: ClsType[_models.VirtualMachineScaleSetListSkusResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8007,7 +8007,7 @@ def get_os_upgrade_history( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-07-01")) cls: ClsType[_models.VirtualMachineScaleSetListOSUpgradeHistory] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8078,7 +8078,7 @@ def _power_off_initial( skip_shutdown: bool = False, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8291,7 +8291,7 @@ def _restart_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8480,7 +8480,7 @@ def _start_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8663,7 +8663,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _reapply_initial(self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8776,7 +8776,7 @@ def _redeploy_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -8968,7 +8968,7 @@ def _perform_maintenance_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9166,7 +9166,7 @@ def _update_instances_initial( vm_instance_i_ds: Union[_models.VirtualMachineScaleSetVMInstanceRequiredIDs, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9352,7 +9352,7 @@ def _reimage_initial( vm_scale_set_reimage_input: Optional[Union[_models.VirtualMachineScaleSetReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9545,7 +9545,7 @@ def _reimage_all_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9737,7 +9737,7 @@ def _approve_rolling_upgrade_initial( vm_instance_i_ds: Optional[Union[_models.VirtualMachineScaleSetVMInstanceIDs, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -9956,7 +9956,7 @@ def force_recovery_service_fabric_platform_update_domain_walk( # pylint: disabl :rtype: ~azure.mgmt.compute.v2024_07_01.models.RecoveryWalkResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10002,7 +10002,7 @@ def force_recovery_service_fabric_platform_update_domain_walk( # pylint: disabl return deserialized # type: ignore @overload - def convert_to_single_placement_group( # pylint: disable=inconsistent-return-statements + def convert_to_single_placement_group( self, resource_group_name: str, vm_scale_set_name: str, @@ -10030,7 +10030,7 @@ def convert_to_single_placement_group( # pylint: disable=inconsistent-return-st """ @overload - def convert_to_single_placement_group( # pylint: disable=inconsistent-return-statements + def convert_to_single_placement_group( self, resource_group_name: str, vm_scale_set_name: str, @@ -10080,7 +10080,7 @@ def convert_to_single_placement_group( # pylint: disable=inconsistent-return-st :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10137,7 +10137,7 @@ def _set_orchestration_service_state_initial( parameters: Union[_models.OrchestrationServiceStateInput, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10345,7 +10345,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtension, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10556,7 +10556,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetExtensionUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10763,7 +10763,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, vmss_extension_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10893,7 +10893,7 @@ def get( :rtype: ~azure.mgmt.compute.v2024_07_01.models.VirtualMachineScaleSetExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -10959,7 +10959,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-07-01")) cls: ClsType[_models.VirtualMachineScaleSetExtensionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11043,7 +11043,7 @@ def __init__(self, *args, **kwargs): self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") def _cancel_initial(self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11145,7 +11145,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_os_upgrade_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11251,7 +11251,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_extension_upgrade_initial( self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11368,7 +11368,7 @@ def get_latest( :rtype: ~azure.mgmt.compute.v2024_07_01.models.RollingUpgradeStatusInfo :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11440,7 +11440,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetVMExtension, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11660,7 +11660,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineScaleSetVMExtensionUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -11875,7 +11875,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, vm_extension_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12011,7 +12011,7 @@ def get( :rtype: ~azure.mgmt.compute.v2024_07_01.models.VirtualMachineScaleSetVMExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12080,7 +12080,7 @@ def list( :rtype: ~azure.mgmt.compute.v2024_07_01.models.VirtualMachineScaleSetVMExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12157,7 +12157,7 @@ def _reimage_initial( ] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12356,7 +12356,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _reimage_all_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12465,7 +12465,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _approve_rolling_upgrade_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12576,7 +12576,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _deallocate_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12694,7 +12694,7 @@ def _update_initial( if_none_match: Optional[str] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -12939,7 +12939,7 @@ def _delete_initial( force_deletion: Optional[bool] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13081,7 +13081,7 @@ def get( :rtype: ~azure.mgmt.compute.v2024_07_01.models.VirtualMachineScaleSetVM :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13141,7 +13141,7 @@ def get_instance_view( :rtype: ~azure.mgmt.compute.v2024_07_01.models.VirtualMachineScaleSetVMInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13223,7 +13223,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-07-01")) cls: ClsType[_models.VirtualMachineScaleSetVMListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13297,7 +13297,7 @@ def _power_off_initial( skip_shutdown: bool = False, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13419,7 +13419,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _restart_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13527,7 +13527,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _start_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13635,7 +13635,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _redeploy_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13768,7 +13768,7 @@ def retrieve_boot_diagnostics_data( :rtype: ~azure.mgmt.compute.v2024_07_01.models.RetrieveBootDiagnosticsDataResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13815,7 +13815,7 @@ def retrieve_boot_diagnostics_data( def _perform_maintenance_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13936,7 +13936,7 @@ def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -13983,7 +13983,7 @@ def _attach_detach_data_disks_initial( parameters: Union[_models.AttachDetachDataDisksRequest, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14194,7 +14194,7 @@ def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14418,7 +14418,7 @@ def _create_or_update_initial( extension_parameters: Union[_models.VirtualMachineExtension, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14628,7 +14628,7 @@ def _update_initial( extension_parameters: Union[_models.VirtualMachineExtensionUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14834,7 +14834,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_name: str, vm_extension_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -14964,7 +14964,7 @@ def get( :rtype: ~azure.mgmt.compute.v2024_07_01.models.VirtualMachineExtension :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15024,7 +15024,7 @@ def list( :rtype: ~azure.mgmt.compute.v2024_07_01.models.VirtualMachineExtensionsListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15105,7 +15105,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> Iterable["_models.Vi api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-07-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15173,7 +15173,7 @@ def _capture_initial( parameters: Union[_models.VirtualMachineCaptureParameters, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15374,7 +15374,7 @@ def _create_or_update_initial( if_none_match: Optional[str] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15604,7 +15604,7 @@ def _update_initial( if_none_match: Optional[str] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15824,7 +15824,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_name: str, *, force_deletion: Optional[bool] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -15955,7 +15955,7 @@ def get( :rtype: ~azure.mgmt.compute.v2024_07_01.models.VirtualMachine :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16012,7 +16012,7 @@ def instance_view( :rtype: ~azure.mgmt.compute.v2024_07_01.models.VirtualMachineInstanceView :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16057,7 +16057,7 @@ def instance_view( def _convert_to_managed_disks_initial( self, resource_group_name: str, vm_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16160,7 +16160,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _deallocate_initial( self, resource_group_name: str, vm_name: str, *, hibernate: Optional[bool] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16285,7 +16285,7 @@ def generalize( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16332,6 +16332,7 @@ def list( expand: Optional[Union[str, _models.ExpandTypeForListVMs]] = None, **kwargs: Any ) -> Iterable["_models.VirtualMachine"]: + # pylint: disable=line-too-long """Lists all of the virtual machines in the specified resource group. Use the nextLink property in the response to get the next page of virtual machines. @@ -16356,7 +16357,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-07-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16428,6 +16429,7 @@ def list_all( expand: Optional[Union[str, _models.ExpandTypesForListVMs]] = None, **kwargs: Any ) -> Iterable["_models.VirtualMachine"]: + # pylint: disable=line-too-long """Lists all of the virtual machines in the specified subscription. Use the nextLink property in the response to get the next page of virtual machines. @@ -16453,7 +16455,7 @@ def list_all( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-07-01")) cls: ClsType[_models.VirtualMachineListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16537,7 +16539,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-07-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16602,7 +16604,7 @@ def get_next(next_link=None): def _power_off_initial( self, resource_group_name: str, vm_name: str, *, skip_shutdown: bool = False, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16711,7 +16713,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _reapply_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16811,7 +16813,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _restart_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -16911,7 +16913,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _start_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17011,7 +17013,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _redeploy_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17117,7 +17119,7 @@ def _reimage_initial( parameters: Optional[Union[_models.VirtualMachineReimageParameters, IO[bytes]]] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17336,7 +17338,7 @@ def retrieve_boot_diagnostics_data( :rtype: ~azure.mgmt.compute.v2024_07_01.models.RetrieveBootDiagnosticsDataResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17380,7 +17382,7 @@ def retrieve_boot_diagnostics_data( return deserialized # type: ignore def _perform_maintenance_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17493,7 +17495,7 @@ def simulate_eviction( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17532,7 +17534,7 @@ def simulate_eviction( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore def _assess_patches_initial(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17648,7 +17650,7 @@ def _install_patches_initial( install_patches_input: Union[_models.VirtualMachineInstallPatchesParameters, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -17846,7 +17848,7 @@ def _attach_detach_data_disks_initial( parameters: Union[_models.AttachDetachDataDisksRequest, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18044,7 +18046,7 @@ def _run_command_initial( parameters: Union[_models.RunCommandInput, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18269,7 +18271,7 @@ def get( :rtype: ~azure.mgmt.compute.v2024_07_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18348,7 +18350,7 @@ def list( :rtype: list[~azure.mgmt.compute.v2024_07_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18409,7 +18411,7 @@ def list_offers( :rtype: list[~azure.mgmt.compute.v2024_07_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18461,7 +18463,7 @@ def list_publishers(self, location: str, **kwargs: Any) -> List[_models.VirtualM :rtype: list[~azure.mgmt.compute.v2024_07_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18518,7 +18520,7 @@ def list_skus( :rtype: list[~azure.mgmt.compute.v2024_07_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18573,7 +18575,7 @@ def list_by_edge_zone(self, location: str, edge_zone: str, **kwargs: Any) -> _mo :rtype: ~azure.mgmt.compute.v2024_07_01.models.VmImagesInEdgeZoneListResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18658,7 +18660,7 @@ def get( :rtype: ~azure.mgmt.compute.v2024_07_01.models.VirtualMachineImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18743,7 +18745,7 @@ def list( :rtype: list[~azure.mgmt.compute.v2024_07_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18808,7 +18810,7 @@ def list_offers( :rtype: list[~azure.mgmt.compute.v2024_07_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18865,7 +18867,7 @@ def list_publishers( :rtype: list[~azure.mgmt.compute.v2024_07_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -18926,7 +18928,7 @@ def list_skus( :rtype: list[~azure.mgmt.compute.v2024_07_01.models.VirtualMachineImageResource] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19009,7 +19011,7 @@ def get( :rtype: ~azure.mgmt.compute.v2024_07_01.models.VirtualMachineExtensionImage :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19067,7 +19069,7 @@ def list_types( :rtype: list[~azure.mgmt.compute.v2024_07_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19139,7 +19141,7 @@ def list_versions( :rtype: list[~azure.mgmt.compute.v2024_07_01.models.VirtualMachineExtensionImage] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19279,7 +19281,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2024_07_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19406,7 +19408,7 @@ def update( :rtype: ~azure.mgmt.compute.v2024_07_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19474,7 +19476,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19524,7 +19526,7 @@ def get(self, resource_group_name: str, availability_set_name: str, **kwargs: An :rtype: ~azure.mgmt.compute.v2024_07_01.models.AvailabilitySet :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19585,7 +19587,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-07-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19662,7 +19664,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Ava api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-07-01")) cls: ClsType[_models.AvailabilitySetListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19744,7 +19746,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-07-01")) cls: ClsType[_models.VirtualMachineSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -19902,7 +19904,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2024_07_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20032,7 +20034,7 @@ def update( :rtype: ~azure.mgmt.compute.v2024_07_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20100,7 +20102,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20160,7 +20162,7 @@ def get( :rtype: ~azure.mgmt.compute.v2024_07_01.models.ProximityPlacementGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20219,7 +20221,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.ProximityPlac api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-07-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20299,7 +20301,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-07-01")) cls: ClsType[_models.ProximityPlacementGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20460,7 +20462,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2024_07_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20587,7 +20589,7 @@ def update( :rtype: ~azure.mgmt.compute.v2024_07_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20655,7 +20657,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20717,7 +20719,7 @@ def get( :rtype: ~azure.mgmt.compute.v2024_07_01.models.DedicatedHostGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20777,7 +20779,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-07-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20853,7 +20855,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.DedicatedHost api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-07-01")) cls: ClsType[_models.DedicatedHostGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -20942,7 +20944,7 @@ def _create_or_update_initial( parameters: Union[_models.DedicatedHost, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21143,7 +21145,7 @@ def _update_initial( parameters: Union[_models.DedicatedHostUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21339,7 +21341,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21470,7 +21472,7 @@ def get( :rtype: ~azure.mgmt.compute.v2024_07_01.models.DedicatedHost :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21535,7 +21537,7 @@ def list_by_host_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-07-01")) cls: ClsType[_models.DedicatedHostListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21600,7 +21602,7 @@ def get_next(next_link=None): def _restart_initial( self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21711,7 +21713,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _redeploy_initial( self, resource_group_name: str, host_group_name: str, host_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21847,7 +21849,7 @@ def list_available_sizes( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-07-01")) cls: ClsType[_models.DedicatedHostSizeListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -21948,7 +21950,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.SshPublicKeyR api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-07-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22029,7 +22031,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-07-01")) cls: ClsType[_models.SshPublicKeysGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22163,7 +22165,7 @@ def create( :rtype: ~azure.mgmt.compute.v2024_07_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22291,7 +22293,7 @@ def update( :rtype: ~azure.mgmt.compute.v2024_07_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22359,7 +22361,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22409,7 +22411,7 @@ def get(self, resource_group_name: str, ssh_public_key_name: str, **kwargs: Any) :rtype: ~azure.mgmt.compute.v2024_07_01.models.SshPublicKeyResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22531,7 +22533,7 @@ def generate_key_pair( :rtype: ~azure.mgmt.compute.v2024_07_01.models.SshPublicKeyGenerateKeyPairResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22612,7 +22614,7 @@ def __init__(self, *args, **kwargs): def _create_or_update_initial( self, resource_group_name: str, image_name: str, parameters: Union[_models.Image, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22794,7 +22796,7 @@ def _update_initial( parameters: Union[_models.ImageUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -22974,7 +22976,7 @@ def get_long_running_output(pipeline_response): ) def _delete_initial(self, resource_group_name: str, image_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23089,7 +23091,7 @@ def get( :rtype: ~azure.mgmt.compute.v2024_07_01.models.Image :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23149,7 +23151,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-07-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23225,7 +23227,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Image"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-07-01")) cls: ClsType[_models.ImageListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23387,7 +23389,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2024_07_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23517,7 +23519,7 @@ def update( :rtype: ~azure.mgmt.compute.v2024_07_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23574,7 +23576,7 @@ def update( def _delete_initial( self, resource_group_name: str, restore_point_collection_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23700,7 +23702,7 @@ def get( :rtype: ~azure.mgmt.compute.v2024_07_01.models.RestorePointCollection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23761,7 +23763,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Res api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-07-01")) cls: ClsType[_models.RestorePointCollectionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23840,7 +23842,7 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.RestorePointCollection"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-07-01")) cls: ClsType[_models.RestorePointCollectionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -23929,7 +23931,7 @@ def _create_initial( parameters: Union[_models.RestorePoint, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24128,7 +24130,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, restore_point_collection_name: str, restore_point_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24258,7 +24260,7 @@ def get( :rtype: ~azure.mgmt.compute.v2024_07_01.models.RestorePoint :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24402,7 +24404,7 @@ def create_or_update( :rtype: ~azure.mgmt.compute.v2024_07_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24535,7 +24537,7 @@ def update( :rtype: ~azure.mgmt.compute.v2024_07_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24606,7 +24608,7 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24670,7 +24672,7 @@ def get( :rtype: ~azure.mgmt.compute.v2024_07_01.models.CapacityReservationGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24744,7 +24746,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-07-01")) cls: ClsType[_models.CapacityReservationGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24844,7 +24846,7 @@ def list_by_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-07-01")) cls: ClsType[_models.CapacityReservationGroupListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -24935,7 +24937,7 @@ def _create_or_update_initial( parameters: Union[_models.CapacityReservation, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25145,7 +25147,7 @@ def _update_initial( parameters: Union[_models.CapacityReservationUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25348,7 +25350,7 @@ def _delete_initial( capacity_reservation_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25486,7 +25488,7 @@ def get( :rtype: ~azure.mgmt.compute.v2024_07_01.models.CapacityReservation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25552,7 +25554,7 @@ def list_by_capacity_reservation_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-07-01")) cls: ClsType[_models.CapacityReservationListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25638,7 +25640,7 @@ def __init__(self, *args, **kwargs): def _export_request_rate_by_interval_initial( self, location: str, parameters: Union[_models.RequestRateByIntervalInput, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -25815,7 +25817,7 @@ def get_long_running_output(pipeline_response): def _export_throttled_requests_initial( self, location: str, parameters: Union[_models.ThrottledRequestsInput, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26025,7 +26027,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.RunCommandDocu api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-07-01")) cls: ClsType[_models.RunCommandListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26098,7 +26100,7 @@ def get(self, location: str, command_id: str, **kwargs: Any) -> _models.RunComma :rtype: ~azure.mgmt.compute.v2024_07_01.models.RunCommandDocument :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26148,7 +26150,7 @@ def _create_or_update_initial( run_command: Union[_models.VirtualMachineRunCommand, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26357,7 +26359,7 @@ def _update_initial( run_command: Union[_models.VirtualMachineRunCommandUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26562,7 +26564,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_name: str, run_command_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26692,7 +26694,7 @@ def get_by_virtual_machine( :rtype: ~azure.mgmt.compute.v2024_07_01.models.VirtualMachineRunCommand :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26760,7 +26762,7 @@ def list_by_virtual_machine( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-07-01")) cls: ClsType[_models.VirtualMachineRunCommandsListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -26853,7 +26855,7 @@ def _create_or_update_initial( run_command: Union[_models.VirtualMachineRunCommand, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -27071,7 +27073,7 @@ def _update_initial( run_command: Union[_models.VirtualMachineRunCommandUpdate, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -27284,7 +27286,7 @@ def get_long_running_output(pipeline_response): def _delete_initial( self, resource_group_name: str, vm_scale_set_name: str, instance_id: str, run_command_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -27420,7 +27422,7 @@ def get( :rtype: ~azure.mgmt.compute.v2024_07_01.models.VirtualMachineRunCommand :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -27497,7 +27499,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-07-01")) cls: ClsType[_models.VirtualMachineRunCommandsListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/availability_set_examples/availability_set_create.py b/sdk/compute/azure-mgmt-compute/generated_samples/availability_set_examples/availability_set_create.py index e59906381fbea..72a85899d3f56 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/availability_set_examples/availability_set_create.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/availability_set_examples/availability_set_create.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/availability_set_examples/availability_set_create_with_scheduled_event_profile.py b/sdk/compute/azure-mgmt-compute/generated_samples/availability_set_examples/availability_set_create_with_scheduled_event_profile.py index 06ad5e2478a91..c514af34b7c2c 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/availability_set_examples/availability_set_create_with_scheduled_event_profile.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/availability_set_examples/availability_set_create_with_scheduled_event_profile.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/availability_set_examples/availability_set_update_maximum_set_gen.py b/sdk/compute/azure-mgmt-compute/generated_samples/availability_set_examples/availability_set_update_maximum_set_gen.py index 25403361a93b1..66af5f21671c9 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/availability_set_examples/availability_set_update_maximum_set_gen.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/availability_set_examples/availability_set_update_maximum_set_gen.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/capacity_reservation_examples/capacity_reservation_create_or_update.py b/sdk/compute/azure-mgmt-compute/generated_samples/capacity_reservation_examples/capacity_reservation_create_or_update.py index 4b885ebbc3252..915e4351f6d54 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/capacity_reservation_examples/capacity_reservation_create_or_update.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/capacity_reservation_examples/capacity_reservation_create_or_update.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/capacity_reservation_examples/capacity_reservation_group_create_or_update.py b/sdk/compute/azure-mgmt-compute/generated_samples/capacity_reservation_examples/capacity_reservation_group_create_or_update.py index 829440fa65e85..8f19b53bb0a17 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/capacity_reservation_examples/capacity_reservation_group_create_or_update.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/capacity_reservation_examples/capacity_reservation_group_create_or_update.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/capacity_reservation_examples/capacity_reservation_group_update_maximum_set_gen.py b/sdk/compute/azure-mgmt-compute/generated_samples/capacity_reservation_examples/capacity_reservation_group_update_maximum_set_gen.py index d0d4e098008a0..bc4e5bf87ed55 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/capacity_reservation_examples/capacity_reservation_group_update_maximum_set_gen.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/capacity_reservation_examples/capacity_reservation_group_update_maximum_set_gen.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/capacity_reservation_examples/capacity_reservation_update_maximum_set_gen.py b/sdk/compute/azure-mgmt-compute/generated_samples/capacity_reservation_examples/capacity_reservation_update_maximum_set_gen.py index bb27e451b93e3..8cd4dab1a7a9c 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/capacity_reservation_examples/capacity_reservation_update_maximum_set_gen.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/capacity_reservation_examples/capacity_reservation_update_maximum_set_gen.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/dedicated_host_examples/dedicated_host_create_or_update.py b/sdk/compute/azure-mgmt-compute/generated_samples/dedicated_host_examples/dedicated_host_create_or_update.py index 136c5126a0245..ae9d79a3a9bd6 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/dedicated_host_examples/dedicated_host_create_or_update.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/dedicated_host_examples/dedicated_host_create_or_update.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/dedicated_host_examples/dedicated_host_group_create_or_update.py b/sdk/compute/azure-mgmt-compute/generated_samples/dedicated_host_examples/dedicated_host_group_create_or_update.py index 6582783f9cda3..345c26be1df0f 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/dedicated_host_examples/dedicated_host_group_create_or_update.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/dedicated_host_examples/dedicated_host_group_create_or_update.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/dedicated_host_examples/dedicated_host_group_create_or_update_with_ultra_ssd.py b/sdk/compute/azure-mgmt-compute/generated_samples/dedicated_host_examples/dedicated_host_group_create_or_update_with_ultra_ssd.py index 6f8d80c15e7f8..948a04e0c3d55 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/dedicated_host_examples/dedicated_host_group_create_or_update_with_ultra_ssd.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/dedicated_host_examples/dedicated_host_group_create_or_update_with_ultra_ssd.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/dedicated_host_examples/dedicated_host_group_update_maximum_set_gen.py b/sdk/compute/azure-mgmt-compute/generated_samples/dedicated_host_examples/dedicated_host_group_update_maximum_set_gen.py index 3a6b9062ce09f..bce743848ea2c 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/dedicated_host_examples/dedicated_host_group_update_maximum_set_gen.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/dedicated_host_examples/dedicated_host_group_update_maximum_set_gen.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/dedicated_host_examples/dedicated_host_update_maximum_set_gen.py b/sdk/compute/azure-mgmt-compute/generated_samples/dedicated_host_examples/dedicated_host_update_maximum_set_gen.py index 33a95f18d77c9..5382622ea4d00 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/dedicated_host_examples/dedicated_host_update_maximum_set_gen.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/dedicated_host_examples/dedicated_host_update_maximum_set_gen.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/dedicated_host_examples/dedicated_host_update_resize.py b/sdk/compute/azure-mgmt-compute/generated_samples/dedicated_host_examples/dedicated_host_update_resize.py index 1f84a3d9058c4..a28e387a01176 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/dedicated_host_examples/dedicated_host_update_resize.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/dedicated_host_examples/dedicated_host_update_resize.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/image_examples/image_create_data_disk_from_ablob_included.py b/sdk/compute/azure-mgmt-compute/generated_samples/image_examples/image_create_data_disk_from_ablob_included.py index e6629e7dfa2f0..cf90d53198b33 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/image_examples/image_create_data_disk_from_ablob_included.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/image_examples/image_create_data_disk_from_ablob_included.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/image_examples/image_create_data_disk_from_amanaged_disk_included.py b/sdk/compute/azure-mgmt-compute/generated_samples/image_examples/image_create_data_disk_from_amanaged_disk_included.py index 5774e57b4e2e5..eeba1fef83da5 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/image_examples/image_create_data_disk_from_amanaged_disk_included.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/image_examples/image_create_data_disk_from_amanaged_disk_included.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/image_examples/image_create_data_disk_from_asnapshot_included.py b/sdk/compute/azure-mgmt-compute/generated_samples/image_examples/image_create_data_disk_from_asnapshot_included.py index b9ec0c11a35c5..ad6b56284a503 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/image_examples/image_create_data_disk_from_asnapshot_included.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/image_examples/image_create_data_disk_from_asnapshot_included.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/image_examples/image_create_from_ablob.py b/sdk/compute/azure-mgmt-compute/generated_samples/image_examples/image_create_from_ablob.py index 8ec50dba6c3db..1d821e161f207 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/image_examples/image_create_from_ablob.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/image_examples/image_create_from_ablob.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/image_examples/image_create_from_ablob_with_disk_encryption_set.py b/sdk/compute/azure-mgmt-compute/generated_samples/image_examples/image_create_from_ablob_with_disk_encryption_set.py index 1f95fb9a275d6..831b7528fa66c 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/image_examples/image_create_from_ablob_with_disk_encryption_set.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/image_examples/image_create_from_ablob_with_disk_encryption_set.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/image_examples/image_create_from_amanaged_disk.py b/sdk/compute/azure-mgmt-compute/generated_samples/image_examples/image_create_from_amanaged_disk.py index edb9de79a0d93..18eb18ebab126 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/image_examples/image_create_from_amanaged_disk.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/image_examples/image_create_from_amanaged_disk.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/image_examples/image_create_from_amanaged_disk_with_disk_encryption_set.py b/sdk/compute/azure-mgmt-compute/generated_samples/image_examples/image_create_from_amanaged_disk_with_disk_encryption_set.py index 8fb2831f165b0..ba1590096e2a8 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/image_examples/image_create_from_amanaged_disk_with_disk_encryption_set.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/image_examples/image_create_from_amanaged_disk_with_disk_encryption_set.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/image_examples/image_create_from_asnapshot.py b/sdk/compute/azure-mgmt-compute/generated_samples/image_examples/image_create_from_asnapshot.py index 0573feb4f11da..55b516e97b7b8 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/image_examples/image_create_from_asnapshot.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/image_examples/image_create_from_asnapshot.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/image_examples/image_create_from_asnapshot_with_disk_encryption_set.py b/sdk/compute/azure-mgmt-compute/generated_samples/image_examples/image_create_from_asnapshot_with_disk_encryption_set.py index 36b58a5189f8f..2e261dbe940f3 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/image_examples/image_create_from_asnapshot_with_disk_encryption_set.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/image_examples/image_create_from_asnapshot_with_disk_encryption_set.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/image_examples/image_create_from_avm.py b/sdk/compute/azure-mgmt-compute/generated_samples/image_examples/image_create_from_avm.py index 7413db312c165..43b53e1dc856f 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/image_examples/image_create_from_avm.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/image_examples/image_create_from_avm.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/image_examples/image_update.py b/sdk/compute/azure-mgmt-compute/generated_samples/image_examples/image_update.py index 7a3aa5c85c84e..83d39ed6cc7ea 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/image_examples/image_update.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/image_examples/image_update.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/log_analytic_examples/log_analytics_request_rate_by_interval.py b/sdk/compute/azure-mgmt-compute/generated_samples/log_analytic_examples/log_analytics_request_rate_by_interval.py index f3b9316d61d19..e9abef5fcb1f5 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/log_analytic_examples/log_analytics_request_rate_by_interval.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/log_analytic_examples/log_analytics_request_rate_by_interval.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/log_analytic_examples/log_analytics_throttled_requests.py b/sdk/compute/azure-mgmt-compute/generated_samples/log_analytic_examples/log_analytics_throttled_requests.py index 7f815d99daa0a..74a470f6d57b3 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/log_analytic_examples/log_analytics_throttled_requests.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/log_analytic_examples/log_analytics_throttled_requests.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/proximity_placement_group_examples/proximity_placement_group_create_or_update.py b/sdk/compute/azure-mgmt-compute/generated_samples/proximity_placement_group_examples/proximity_placement_group_create_or_update.py index a2dba2f1e82c0..b0ecdae5eaae9 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/proximity_placement_group_examples/proximity_placement_group_create_or_update.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/proximity_placement_group_examples/proximity_placement_group_create_or_update.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/proximity_placement_group_examples/proximity_placement_group_patch.py b/sdk/compute/azure-mgmt-compute/generated_samples/proximity_placement_group_examples/proximity_placement_group_patch.py index 805b2f4e5b569..e6af5617d54a8 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/proximity_placement_group_examples/proximity_placement_group_patch.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/proximity_placement_group_examples/proximity_placement_group_patch.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/restore_point_examples/restore_point_collection_create_or_update.py b/sdk/compute/azure-mgmt-compute/generated_samples/restore_point_examples/restore_point_collection_create_or_update.py index 4e1c2bf75b782..9af6ac3f1ea04 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/restore_point_examples/restore_point_collection_create_or_update.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/restore_point_examples/restore_point_collection_create_or_update.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/restore_point_examples/restore_point_collection_create_or_update_for_cross_region_copy.py b/sdk/compute/azure-mgmt-compute/generated_samples/restore_point_examples/restore_point_collection_create_or_update_for_cross_region_copy.py index 81e66ca887a3c..48050053b9af1 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/restore_point_examples/restore_point_collection_create_or_update_for_cross_region_copy.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/restore_point_examples/restore_point_collection_create_or_update_for_cross_region_copy.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/restore_point_examples/restore_point_collection_update_maximum_set_gen.py b/sdk/compute/azure-mgmt-compute/generated_samples/restore_point_examples/restore_point_collection_update_maximum_set_gen.py index bfcf4ee1bf7fb..6e80fb0d24635 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/restore_point_examples/restore_point_collection_update_maximum_set_gen.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/restore_point_examples/restore_point_collection_update_maximum_set_gen.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/restore_point_examples/restore_point_copy_between_regions.py b/sdk/compute/azure-mgmt-compute/generated_samples/restore_point_examples/restore_point_copy_between_regions.py index c9d98f2fd3227..0c003388a1f9c 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/restore_point_examples/restore_point_copy_between_regions.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/restore_point_examples/restore_point_copy_between_regions.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/restore_point_examples/restore_point_create.py b/sdk/compute/azure-mgmt-compute/generated_samples/restore_point_examples/restore_point_create.py index 94191265fd641..2d51e2b7a61bc 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/restore_point_examples/restore_point_create.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/restore_point_examples/restore_point_create.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/run_command_examples/virtual_machine_run_command.py b/sdk/compute/azure-mgmt-compute/generated_samples/run_command_examples/virtual_machine_run_command.py index 1472e08f7e447..bef67181c2e37 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/run_command_examples/virtual_machine_run_command.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/run_command_examples/virtual_machine_run_command.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/run_command_examples/virtual_machine_run_command_create_or_update.py b/sdk/compute/azure-mgmt-compute/generated_samples/run_command_examples/virtual_machine_run_command_create_or_update.py index 4fcafc8135eb2..c252a0820046b 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/run_command_examples/virtual_machine_run_command_create_or_update.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/run_command_examples/virtual_machine_run_command_create_or_update.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/run_command_examples/virtual_machine_run_command_update.py b/sdk/compute/azure-mgmt-compute/generated_samples/run_command_examples/virtual_machine_run_command_update.py index fc5c416a6ab69..7ef579b697738 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/run_command_examples/virtual_machine_run_command_update.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/run_command_examples/virtual_machine_run_command_update.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/run_command_examples/virtual_machine_scale_set_vm_run_command.py b/sdk/compute/azure-mgmt-compute/generated_samples/run_command_examples/virtual_machine_scale_set_vm_run_command.py index bef0254a9f9a6..0726f74ca05f3 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/run_command_examples/virtual_machine_scale_set_vm_run_command.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/run_command_examples/virtual_machine_scale_set_vm_run_command.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/run_command_examples/virtual_machine_scale_set_vm_run_command_create_or_update.py b/sdk/compute/azure-mgmt-compute/generated_samples/run_command_examples/virtual_machine_scale_set_vm_run_command_create_or_update.py index 6ced1cdb20b09..e12a17861fc0a 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/run_command_examples/virtual_machine_scale_set_vm_run_command_create_or_update.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/run_command_examples/virtual_machine_scale_set_vm_run_command_create_or_update.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/run_command_examples/virtual_machine_scale_set_vm_run_command_update.py b/sdk/compute/azure-mgmt-compute/generated_samples/run_command_examples/virtual_machine_scale_set_vm_run_command_update.py index 673f8c0982e9f..781760136e539 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/run_command_examples/virtual_machine_scale_set_vm_run_command_update.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/run_command_examples/virtual_machine_scale_set_vm_run_command_update.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/ssh_public_key_examples/ssh_public_key_create.py b/sdk/compute/azure-mgmt-compute/generated_samples/ssh_public_key_examples/ssh_public_key_create.py index 4a9032d5d8fb4..63f9b60a6d41c 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/ssh_public_key_examples/ssh_public_key_create.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/ssh_public_key_examples/ssh_public_key_create.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/ssh_public_key_examples/ssh_public_key_update_maximum_set_gen.py b/sdk/compute/azure-mgmt-compute/generated_samples/ssh_public_key_examples/ssh_public_key_update_maximum_set_gen.py index fe4899526d301..5b603ddc58927 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/ssh_public_key_examples/ssh_public_key_update_maximum_set_gen.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/ssh_public_key_examples/ssh_public_key_update_maximum_set_gen.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_attach_detach_data_disks_maximum_set_gen.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_attach_detach_data_disks_maximum_set_gen.py index d3d6a4003c1c5..e825a3b5aec31 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_attach_detach_data_disks_maximum_set_gen.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_attach_detach_data_disks_maximum_set_gen.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_attach_detach_data_disks_minimum_set_gen.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_attach_detach_data_disks_minimum_set_gen.py index d9b2d5ac7ac4b..0585407dd2fd2 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_attach_detach_data_disks_minimum_set_gen.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_attach_detach_data_disks_minimum_set_gen.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_capture_maximum_set_gen.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_capture_maximum_set_gen.py index cc340690ad75f..c3278f0f3d68c 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_capture_maximum_set_gen.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_capture_maximum_set_gen.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_capture_minimum_set_gen.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_capture_minimum_set_gen.py index 372056bf79d30..2d6b826f8c9e7 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_capture_minimum_set_gen.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_capture_minimum_set_gen.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_custom_image_vm_from_an_unmanaged_generalized_os_image.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_custom_image_vm_from_an_unmanaged_generalized_os_image.py index 3197dcedec855..40da2b3d8821a 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_custom_image_vm_from_an_unmanaged_generalized_os_image.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_custom_image_vm_from_an_unmanaged_generalized_os_image.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_from_acommunity_gallery_image.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_from_acommunity_gallery_image.py index dd0319be40070..8ccdbcca2aa64 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_from_acommunity_gallery_image.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_from_acommunity_gallery_image.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_from_acustom_image.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_from_acustom_image.py index 1abecd17a477c..93d7f03158bd1 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_from_acustom_image.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_from_acustom_image.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_from_ageneralized_shared_image.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_from_ageneralized_shared_image.py index fa8492346603a..7ccc94140edf2 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_from_ageneralized_shared_image.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_from_ageneralized_shared_image.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_from_ashared_gallery_image.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_from_ashared_gallery_image.py index 229336cd3ccbb..d01d42e1cac7a 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_from_ashared_gallery_image.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_from_ashared_gallery_image.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_from_aspecialized_shared_image.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_from_aspecialized_shared_image.py index 5b8cbd8e79748..94d04bcd13cdc 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_from_aspecialized_shared_image.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_from_aspecialized_shared_image.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_in_an_availability_set.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_in_an_availability_set.py index 2a2aa52f4c740..16e164acff5d9 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_in_an_availability_set.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_in_an_availability_set.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_in_avmss_with_customer_assigned_platform_fault_domain.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_in_avmss_with_customer_assigned_platform_fault_domain.py index f9aabb637460d..583ca775cdd64 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_in_avmss_with_customer_assigned_platform_fault_domain.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_in_avmss_with_customer_assigned_platform_fault_domain.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_linux_vm_with_automatic_by_platform_settings.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_linux_vm_with_automatic_by_platform_settings.py index fc521baf764a8..43d816eb3718e 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_linux_vm_with_automatic_by_platform_settings.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_linux_vm_with_automatic_by_platform_settings.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_linux_vm_with_patch_setting_assessment_mode_of_image_default.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_linux_vm_with_patch_setting_assessment_mode_of_image_default.py index be6077e3a529f..b8203f056a8f7 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_linux_vm_with_patch_setting_assessment_mode_of_image_default.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_linux_vm_with_patch_setting_assessment_mode_of_image_default.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_linux_vm_with_patch_setting_mode_of_image_default.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_linux_vm_with_patch_setting_mode_of_image_default.py index 0ad2e25ecc81d..ad090a7f115b9 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_linux_vm_with_patch_setting_mode_of_image_default.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_linux_vm_with_patch_setting_mode_of_image_default.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_linux_vm_with_patch_setting_modes_of_automatic_by_platform.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_linux_vm_with_patch_setting_modes_of_automatic_by_platform.py index 0d0151f8793d9..b788880206632 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_linux_vm_with_patch_setting_modes_of_automatic_by_platform.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_linux_vm_with_patch_setting_modes_of_automatic_by_platform.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_platform_image_vm_with_unmanaged_os_and_data_disks.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_platform_image_vm_with_unmanaged_os_and_data_disks.py index df55ce6730a28..ca452b8c44538 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_platform_image_vm_with_unmanaged_os_and_data_disks.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_platform_image_vm_with_unmanaged_os_and_data_disks.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_windows_vm_with_automatic_by_platform_settings.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_windows_vm_with_automatic_by_platform_settings.py index e111df276ebc5..6567f7490d646 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_windows_vm_with_automatic_by_platform_settings.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_windows_vm_with_automatic_by_platform_settings.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_windows_vm_with_patch_setting_assessment_mode_of_image_default.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_windows_vm_with_patch_setting_assessment_mode_of_image_default.py index 701d27b386bc8..3767860eab8b6 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_windows_vm_with_patch_setting_assessment_mode_of_image_default.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_windows_vm_with_patch_setting_assessment_mode_of_image_default.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_windows_vm_with_patch_setting_mode_of_automatic_by_os.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_windows_vm_with_patch_setting_mode_of_automatic_by_os.py index d244d436440a5..5de4d51d023ef 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_windows_vm_with_patch_setting_mode_of_automatic_by_os.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_windows_vm_with_patch_setting_mode_of_automatic_by_os.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_windows_vm_with_patch_setting_mode_of_automatic_by_platform_and_enable_hot_patching_true.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_windows_vm_with_patch_setting_mode_of_automatic_by_platform_and_enable_hot_patching_true.py index 87de5d0e4c751..5cfb05dd056bb 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_windows_vm_with_patch_setting_mode_of_automatic_by_platform_and_enable_hot_patching_true.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_windows_vm_with_patch_setting_mode_of_automatic_by_platform_and_enable_hot_patching_true.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_windows_vm_with_patch_setting_mode_of_manual.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_windows_vm_with_patch_setting_mode_of_manual.py index 4689e59cc9243..e5728e4bd9310 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_windows_vm_with_patch_setting_mode_of_manual.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_windows_vm_with_patch_setting_mode_of_manual.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_windows_vm_with_patch_setting_modes_of_automatic_by_platform.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_windows_vm_with_patch_setting_modes_of_automatic_by_platform.py index 62ffb4dbc3f47..0deb21ece28f3 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_windows_vm_with_patch_setting_modes_of_automatic_by_platform.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_windows_vm_with_patch_setting_modes_of_automatic_by_platform.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_adiff_os_disk.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_adiff_os_disk.py index 915689a2ff125..e170c658dc629 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_adiff_os_disk.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_adiff_os_disk.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_adiff_os_disk_using_diff_disk_placement_as_cache_disk.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_adiff_os_disk_using_diff_disk_placement_as_cache_disk.py index 0345a2b13bf96..4774889aa3d26 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_adiff_os_disk_using_diff_disk_placement_as_cache_disk.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_adiff_os_disk_using_diff_disk_placement_as_cache_disk.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_adiff_os_disk_using_diff_disk_placement_as_nvme_disk.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_adiff_os_disk_using_diff_disk_placement_as_nvme_disk.py index c28d115978944..e313d71806670 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_adiff_os_disk_using_diff_disk_placement_as_nvme_disk.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_adiff_os_disk_using_diff_disk_placement_as_nvme_disk.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_adiff_os_disk_using_diff_disk_placement_as_resource_disk.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_adiff_os_disk_using_diff_disk_placement_as_resource_disk.py index b03716e9049aa..0219a3bce01f6 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_adiff_os_disk_using_diff_disk_placement_as_resource_disk.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_adiff_os_disk_using_diff_disk_placement_as_resource_disk.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_amarketplace_image_plan.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_amarketplace_image_plan.py index c8be68aee9ca0..8a01973ae774c 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_amarketplace_image_plan.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_amarketplace_image_plan.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_application_profile.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_application_profile.py index 9241eada78f65..1ceb50ee2a848 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_application_profile.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_application_profile.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_boot_diagnostics.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_boot_diagnostics.py index 8dc3ff558fac0..9af0442ccf29a 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_boot_diagnostics.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_boot_diagnostics.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_capacity_reservation.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_capacity_reservation.py index b0d0d2a6bc2df..1772f7ecffa13 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_capacity_reservation.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_capacity_reservation.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_data_disks_from_source_resource.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_data_disks_from_source_resource.py index 47cbb69ec611a..f7e334a1faf92 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_data_disks_from_source_resource.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_data_disks_from_source_resource.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_disk_controller_type.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_disk_controller_type.py index e64801328fad3..97cda70444bf4 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_disk_controller_type.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_disk_controller_type.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_disk_encryption_set_resource.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_disk_encryption_set_resource.py index 7b9290d14ad87..3f3bafc167273 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_disk_encryption_set_resource.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_disk_encryption_set_resource.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_empty_data_disks.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_empty_data_disks.py index 49c1745f9e555..ddc36356a51ee 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_empty_data_disks.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_empty_data_disks.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_encryption_at_host.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_encryption_at_host.py index caeb9aff9954c..377514e280f1b 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_encryption_at_host.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_encryption_at_host.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_encryption_identity.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_encryption_identity.py index 764ff1f6cf1c5..8c5d65028c1d2 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_encryption_identity.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_encryption_identity.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_extensions_time_budget.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_extensions_time_budget.py index 52ba60a34ea8c..fc0373a23914b 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_extensions_time_budget.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_extensions_time_budget.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_hibernation_enabled.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_hibernation_enabled.py index e4e90d49a78b8..6008cdd8facdc 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_hibernation_enabled.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_hibernation_enabled.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_managed_boot_diagnostics.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_managed_boot_diagnostics.py index 1c16415866eee..1baf9f3b60294 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_managed_boot_diagnostics.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_managed_boot_diagnostics.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_network_interface_configuration.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_network_interface_configuration.py index 7d6dee1ededad..76d697ed7531a 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_network_interface_configuration.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_network_interface_configuration.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_network_interface_configuration_dns_settings.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_network_interface_configuration_dns_settings.py index 408625e202b81..a9ee6626ee1a2 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_network_interface_configuration_dns_settings.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_network_interface_configuration_dns_settings.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_password_authentication.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_password_authentication.py index 73c64a64cf5e4..16864de0bb9e8 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_password_authentication.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_password_authentication.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_premium_storage.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_premium_storage.py index 0a79de016393c..fb1b43cfdbf5b 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_premium_storage.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_premium_storage.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_proxy_agent_settings.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_proxy_agent_settings.py index 51d0b100ed40a..e10f65df9f909 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_proxy_agent_settings.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_proxy_agent_settings.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_scheduled_events_profile.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_scheduled_events_profile.py index 74b7df43ca5c7..88037e196196c 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_scheduled_events_profile.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_scheduled_events_profile.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_security_type_confidential_vm.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_security_type_confidential_vm.py index 9759236c84fd1..005171a0d14cb 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_security_type_confidential_vm.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_security_type_confidential_vm.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_security_type_confidential_vm_with_customer_managed_keys.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_security_type_confidential_vm_with_customer_managed_keys.py index 44caedb1a8e10..f2bcb558a6bb5 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_security_type_confidential_vm_with_customer_managed_keys.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_security_type_confidential_vm_with_customer_managed_keys.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_security_type_confidential_vm_with_non_persisted_tpm.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_security_type_confidential_vm_with_non_persisted_tpm.py index 0b99c88995b4f..79f5a938b580f 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_security_type_confidential_vm_with_non_persisted_tpm.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_security_type_confidential_vm_with_non_persisted_tpm.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_ssh_authentication.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_ssh_authentication.py index df60201441fb0..89a5d6303a1a6 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_ssh_authentication.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_ssh_authentication.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_uefi_settings.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_uefi_settings.py index 34a33f1412a72..c5e231c098710 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_uefi_settings.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_uefi_settings.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_user_data.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_user_data.py index 41459606fcdb9..b94ad0593cec6 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_user_data.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_user_data.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_vm_size_properties.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_vm_size_properties.py index abadee9615dbd..91da252d79e85 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_vm_size_properties.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_create_with_vm_size_properties.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_extension_create_or_update_maximum_set_gen.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_extension_create_or_update_maximum_set_gen.py index e678beaff8562..abf595c5c0af1 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_extension_create_or_update_maximum_set_gen.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_extension_create_or_update_maximum_set_gen.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_extension_create_or_update_minimum_set_gen.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_extension_create_or_update_minimum_set_gen.py index 61d1c33167f19..c98c7ae61dad8 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_extension_create_or_update_minimum_set_gen.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_extension_create_or_update_minimum_set_gen.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_extension_update.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_extension_update.py index 10d28b3ec18fb..36915b40ce32d 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_extension_update.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_extension_update.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_install_patches.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_install_patches.py index 5b319818c4096..10eed81ac9fca 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_install_patches.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_install_patches.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_update_detach_data_disk_using_to_be_detached_property.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_update_detach_data_disk_using_to_be_detached_property.py index 5a29a034431de..9ace93e5e5242 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_update_detach_data_disk_using_to_be_detached_property.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_update_detach_data_disk_using_to_be_detached_property.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_update_force_detach_data_disk.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_update_force_detach_data_disk.py index 8690bbfad4c77..e1fb1744ee5ce 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_update_force_detach_data_disk.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_examples/virtual_machine_update_force_detach_data_disk.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_convert_to_single_placement_group_maximum_set_gen.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_convert_to_single_placement_group_maximum_set_gen.py index f3e1716d17b87..5402bd5051c1c 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_convert_to_single_placement_group_maximum_set_gen.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_convert_to_single_placement_group_maximum_set_gen.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_a_with_diff_os_disk_using_diff_disk_placement.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_a_with_diff_os_disk_using_diff_disk_placement.py index 352a4f7ee31da..0eba98d600140 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_a_with_diff_os_disk_using_diff_disk_placement.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_a_with_diff_os_disk_using_diff_disk_placement.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_a_with_diff_os_disk_using_diff_disk_placement_as_nvme_disk.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_a_with_diff_os_disk_using_diff_disk_placement_as_nvme_disk.py index 7fc4cf015b5e0..f6be0c20ffb8d 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_a_with_diff_os_disk_using_diff_disk_placement_as_nvme_disk.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_a_with_diff_os_disk_using_diff_disk_placement_as_nvme_disk.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_custom_image_from_an_unmanaged_generalized_os_image.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_custom_image_from_an_unmanaged_generalized_os_image.py index 5a804184d4c35..fe87a105bc8b0 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_custom_image_from_an_unmanaged_generalized_os_image.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_custom_image_from_an_unmanaged_generalized_os_image.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_from_acustom_image.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_from_acustom_image.py index 306413e23e870..c636f2a4d5361 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_from_acustom_image.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_from_acustom_image.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_from_ageneralized_shared_image.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_from_ageneralized_shared_image.py index 640bd1a6be9ef..5e9bf0458c94e 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_from_ageneralized_shared_image.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_from_ageneralized_shared_image.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_from_aspecialized_shared_image.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_from_aspecialized_shared_image.py index a04e614b9d373..6b05f3c60c876 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_from_aspecialized_shared_image.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_from_aspecialized_shared_image.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_from_with_disable_tcp_state_tracking_network_interface.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_from_with_disable_tcp_state_tracking_network_interface.py index b41a22118d6fd..787787e7c55e7 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_from_with_disable_tcp_state_tracking_network_interface.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_from_with_disable_tcp_state_tracking_network_interface.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_from_with_fpga_network_interface.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_from_with_fpga_network_interface.py index a77b240d17850..fdefd200e2645 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_from_with_fpga_network_interface.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_from_with_fpga_network_interface.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_from_with_network_interface_with_dns_settings.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_from_with_network_interface_with_dns_settings.py index 152201067f714..4c9325cecd197 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_from_with_network_interface_with_dns_settings.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_from_with_network_interface_with_dns_settings.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_platform_image_with_unmanaged_os_disks.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_platform_image_with_unmanaged_os_disks.py index 7053c51bbfd5f..0263b3c8ebaa8 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_platform_image_with_unmanaged_os_disks.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_platform_image_with_unmanaged_os_disks.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_amarketplace_image_plan.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_amarketplace_image_plan.py index d619046c6aa58..66b46f15ad9af 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_amarketplace_image_plan.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_amarketplace_image_plan.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_application_profile.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_application_profile.py index 5d186aae7679b..da88dc8a74803 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_application_profile.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_application_profile.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_automatic_repairs.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_automatic_repairs.py index eda5c83723956..9d9f7dbc146a4 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_automatic_repairs.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_automatic_repairs.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_azure_application_gateway.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_azure_application_gateway.py index fbb08d282f9f5..af2ab27571e53 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_azure_application_gateway.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_azure_application_gateway.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_azure_load_balancer.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_azure_load_balancer.py index efc0621743099..1db5629b255a0 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_azure_load_balancer.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_azure_load_balancer.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_boot_diagnostics.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_boot_diagnostics.py index 453491b1a7a23..5c71b07ec3858 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_boot_diagnostics.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_boot_diagnostics.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_capacity_reservation.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_capacity_reservation.py index b97ccdaf83ed1..08b55f5872e8f 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_capacity_reservation.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_capacity_reservation.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_diff_os_disk.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_diff_os_disk.py index dfc6a12a63b4c..ec6be793e0719 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_diff_os_disk.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_diff_os_disk.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_disk_controller_type.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_disk_controller_type.py index 9cc2496167238..a92c24cae81ce 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_disk_controller_type.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_disk_controller_type.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_disk_encryption_set_resource.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_disk_encryption_set_resource.py index 24f65375870ff..d43ad3c1fe117 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_disk_encryption_set_resource.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_disk_encryption_set_resource.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_empty_data_disks_on_each_vm.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_empty_data_disks_on_each_vm.py index bf7b83f09de85..87e88bce902db 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_empty_data_disks_on_each_vm.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_empty_data_disks_on_each_vm.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_encryption_at_host.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_encryption_at_host.py index 7a4219902619b..2fd251b257481 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_encryption_at_host.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_encryption_at_host.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_extensions_suppress_failures_enabled.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_extensions_suppress_failures_enabled.py index 4f9f90892b796..cee93e0e41089 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_extensions_suppress_failures_enabled.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_extensions_suppress_failures_enabled.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_extensions_time_budget.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_extensions_time_budget.py index ef8b34e5bbd00..c5411df92413f 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_extensions_time_budget.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_extensions_time_budget.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_managed_boot_diagnostics.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_managed_boot_diagnostics.py index 7e346e5e23dd9..ef6862249b470 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_managed_boot_diagnostics.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_managed_boot_diagnostics.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_os_image_scheduled_event_enabled.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_os_image_scheduled_event_enabled.py index 2b5f3ecc58264..ac00930b72e27 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_os_image_scheduled_event_enabled.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_os_image_scheduled_event_enabled.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_password_authentication.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_password_authentication.py index 76dda32079ac2..db7230c291e1f 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_password_authentication.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_password_authentication.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_premium_storage.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_premium_storage.py index 648d478e33d65..3c0279682e383 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_premium_storage.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_premium_storage.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_priority_mix_policy.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_priority_mix_policy.py index f8e5917ffcace..801af039599e8 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_priority_mix_policy.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_priority_mix_policy.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_protected_settings_from_key_vault.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_protected_settings_from_key_vault.py index c2aaed7e9c047..31c90ee91fd50 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_protected_settings_from_key_vault.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_protected_settings_from_key_vault.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_proxy_agent_settings.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_proxy_agent_settings.py index 71eca03bfbfd3..c5fdc13c92ab8 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_proxy_agent_settings.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_proxy_agent_settings.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_resilient_vm_creation_policy.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_resilient_vm_creation_policy.py index 3129513768042..beec39bfe58e5 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_resilient_vm_creation_policy.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_resilient_vm_creation_policy.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_resilient_vm_deletion_policy.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_resilient_vm_deletion_policy.py index 6d6c21a1fd591..e7eade5a02ec2 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_resilient_vm_deletion_policy.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_resilient_vm_deletion_policy.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_scale_in_policy.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_scale_in_policy.py index 884666c9e987b..ac47a023a9a17 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_scale_in_policy.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_scale_in_policy.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_security_posture_reference.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_security_posture_reference.py index d64d0bd4e4a54..de0c3c1088dae 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_security_posture_reference.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_security_posture_reference.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_security_type_confidential_vm.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_security_type_confidential_vm.py index 93baaf0be8a13..d9e0a5918ff5a 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_security_type_confidential_vm.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_security_type_confidential_vm.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_security_type_confidential_vm_with_non_persisted_tpm.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_security_type_confidential_vm_with_non_persisted_tpm.py index 5bd1e652509c8..7f987ea87d7e9 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_security_type_confidential_vm_with_non_persisted_tpm.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_security_type_confidential_vm_with_non_persisted_tpm.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_service_artifact_reference.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_service_artifact_reference.py index c86534481ae96..77f5a0c5ac07c 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_service_artifact_reference.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_service_artifact_reference.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_sku_profile.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_sku_profile.py index ec56929da5bf6..27e08d8a1b713 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_sku_profile.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_sku_profile.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_spot_restore_policy.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_spot_restore_policy.py index 6855d22b3117d..5aeff461a0488 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_spot_restore_policy.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_spot_restore_policy.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_ssh_authentication.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_ssh_authentication.py index fee03449a2dcf..8e49fee4298bf 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_ssh_authentication.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_ssh_authentication.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_terminate_scheduled_event_enabled.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_terminate_scheduled_event_enabled.py index ee3101235cd0b..874e87f0c3205 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_terminate_scheduled_event_enabled.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_terminate_scheduled_event_enabled.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_uefi_settings.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_uefi_settings.py index e0ced3c14f3d7..e5b0c4f66917c 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_uefi_settings.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_uefi_settings.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_user_data.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_user_data.py index b9789fc9d3c03..7dbb052c7507c 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_user_data.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_user_data.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_vm_size_properties.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_vm_size_properties.py index d22d7f042c34f..e219a4b618b73 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_vm_size_properties.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_vm_size_properties.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_vms_in_different_zones.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_vms_in_different_zones.py index 880228cc5a0bc..42875cd34197b 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_vms_in_different_zones.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_vms_in_different_zones.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_zonal_platform_fault_domain_align_mode.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_zonal_platform_fault_domain_align_mode.py index fb1c3e4d82bc2..f03921ebbaa9d 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_zonal_platform_fault_domain_align_mode.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_create_with_zonal_platform_fault_domain_align_mode.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_extension_create_or_update_maximum_set_gen.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_extension_create_or_update_maximum_set_gen.py index 219eebff11cca..2079e5a8465ca 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_extension_create_or_update_maximum_set_gen.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_extension_create_or_update_maximum_set_gen.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_extension_update_maximum_set_gen.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_extension_update_maximum_set_gen.py index d0b53bcb419a7..e45fcc55fb79b 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_extension_update_maximum_set_gen.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_extension_update_maximum_set_gen.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_force_recovery_service_fabric_platform_update_domain_walk_maximum_set_gen.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_force_recovery_service_fabric_platform_update_domain_walk_maximum_set_gen.py index 3b87ff1f70dd5..87d9258df4333 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_force_recovery_service_fabric_platform_update_domain_walk_maximum_set_gen.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_force_recovery_service_fabric_platform_update_domain_walk_maximum_set_gen.py @@ -33,6 +33,7 @@ def main(): response = client.virtual_machine_scale_sets.force_recovery_service_fabric_platform_update_domain_walk( resource_group_name="rgcompute", vm_scale_set_name="aaaaaaaaaaaaaaaa", + platform_update_domain=30, ) print(response) diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_force_recovery_service_fabric_platform_update_domain_walk_minimum_set_gen.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_force_recovery_service_fabric_platform_update_domain_walk_minimum_set_gen.py index bca15fbe65a23..982ff38c0cdf7 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_force_recovery_service_fabric_platform_update_domain_walk_minimum_set_gen.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_force_recovery_service_fabric_platform_update_domain_walk_minimum_set_gen.py @@ -33,6 +33,7 @@ def main(): response = client.virtual_machine_scale_sets.force_recovery_service_fabric_platform_update_domain_walk( resource_group_name="rgcompute", vm_scale_set_name="aaaaaaaaaaaa", + platform_update_domain=9, ) print(response) diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_set_orchestration_service_state_maximum_set_gen.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_set_orchestration_service_state_maximum_set_gen.py index fce3220b3d47e..a515ff891fa0b 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_set_orchestration_service_state_maximum_set_gen.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_set_orchestration_service_state_maximum_set_gen.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_set_orchestration_service_state_minimum_set_gen.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_set_orchestration_service_state_minimum_set_gen.py index 05de74c4a5f2a..af0fd9ffa20ff 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_set_orchestration_service_state_minimum_set_gen.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_set_orchestration_service_state_minimum_set_gen.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_update_maximum_set_gen.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_update_maximum_set_gen.py index d1e55660a8508..a6129bf002831 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_update_maximum_set_gen.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_update_maximum_set_gen.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_vm_attach_detach_data_disks_maximum_set_gen.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_vm_attach_detach_data_disks_maximum_set_gen.py index 2846d22f07832..0a3a68fbbc4d3 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_vm_attach_detach_data_disks_maximum_set_gen.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_vm_attach_detach_data_disks_maximum_set_gen.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_vm_attach_detach_data_disks_minimum_set_gen.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_vm_attach_detach_data_disks_minimum_set_gen.py index 868f5ccf4f346..2054da76a5853 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_vm_attach_detach_data_disks_minimum_set_gen.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_vm_attach_detach_data_disks_minimum_set_gen.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_vm_extension_create.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_vm_extension_create.py index b001d9b290903..e681a3f78c14d 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_vm_extension_create.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_vm_extension_create.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_vm_extension_update.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_vm_extension_update.py index 3647dc6c9819e..a6f4c1672b19d 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_vm_extension_update.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_vm_extension_update.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_vm_update_maximum_set_gen.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_vm_update_maximum_set_gen.py index 9cef821c59e87..b0cff2b02db56 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_vm_update_maximum_set_gen.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_vm_update_maximum_set_gen.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_vm_update_minimum_set_gen.py b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_vm_update_minimum_set_gen.py index 932b809368ce0..fa9efc7d21e92 100644 --- a/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_vm_update_minimum_set_gen.py +++ b/sdk/compute/azure-mgmt-compute/generated_samples/virtual_machine_scale_set_examples/virtual_machine_scale_set_vm_update_minimum_set_gen.py @@ -6,8 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, IO, Union - from azure.identity import DefaultAzureCredential from azure.mgmt.compute import ComputeManagementClient diff --git a/sdk/compute/azure-mgmt-compute/generated_tests/conftest.py b/sdk/compute/azure-mgmt-compute/generated_tests/conftest.py index 7dc9f0100aa3c..c36a70b6cce18 100644 --- a/sdk/compute/azure-mgmt-compute/generated_tests/conftest.py +++ b/sdk/compute/azure-mgmt-compute/generated_tests/conftest.py @@ -18,7 +18,7 @@ load_dotenv() -# aovid record sensitive identity information in recordings +# For security, please avoid record sensitive identity information in recordings @pytest.fixture(scope="session", autouse=True) def add_sanitizers(test_proxy): computemanagement_subscription_id = os.environ.get("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") diff --git a/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_availability_sets_operations.py b/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_availability_sets_operations.py index 0d27938772e08..23e675ddbe930 100644 --- a/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_availability_sets_operations.py +++ b/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_availability_sets_operations.py @@ -20,7 +20,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_create_or_update(self, resource_group): + def test_availability_sets_create_or_update(self, resource_group): response = self.client.availability_sets.create_or_update( resource_group_name=resource_group.name, availability_set_name="str", @@ -58,7 +58,7 @@ def test_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_update(self, resource_group): + def test_availability_sets_update(self, resource_group): response = self.client.availability_sets.update( resource_group_name=resource_group.name, availability_set_name="str", @@ -92,7 +92,7 @@ def test_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_delete(self, resource_group): + def test_availability_sets_delete(self, resource_group): response = self.client.availability_sets.delete( resource_group_name=resource_group.name, availability_set_name="str", @@ -104,7 +104,7 @@ def test_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_availability_sets_get(self, resource_group): response = self.client.availability_sets.get( resource_group_name=resource_group.name, availability_set_name="str", @@ -116,7 +116,7 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_subscription(self, resource_group): + def test_availability_sets_list_by_subscription(self, resource_group): response = self.client.availability_sets.list_by_subscription( api_version="2024-07-01", ) @@ -126,7 +126,7 @@ def test_list_by_subscription(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_availability_sets_list(self, resource_group): response = self.client.availability_sets.list( resource_group_name=resource_group.name, api_version="2024-07-01", @@ -137,7 +137,7 @@ def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_available_sizes(self, resource_group): + def test_availability_sets_list_available_sizes(self, resource_group): response = self.client.availability_sets.list_available_sizes( resource_group_name=resource_group.name, availability_set_name="str", diff --git a/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_availability_sets_operations_async.py b/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_availability_sets_operations_async.py index 201dcffa3791d..80e789b1a678c 100644 --- a/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_availability_sets_operations_async.py +++ b/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_availability_sets_operations_async.py @@ -21,7 +21,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_create_or_update(self, resource_group): + async def test_availability_sets_create_or_update(self, resource_group): response = await self.client.availability_sets.create_or_update( resource_group_name=resource_group.name, availability_set_name="str", @@ -59,7 +59,7 @@ async def test_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_update(self, resource_group): + async def test_availability_sets_update(self, resource_group): response = await self.client.availability_sets.update( resource_group_name=resource_group.name, availability_set_name="str", @@ -93,7 +93,7 @@ async def test_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_delete(self, resource_group): + async def test_availability_sets_delete(self, resource_group): response = await self.client.availability_sets.delete( resource_group_name=resource_group.name, availability_set_name="str", @@ -105,7 +105,7 @@ async def test_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_availability_sets_get(self, resource_group): response = await self.client.availability_sets.get( resource_group_name=resource_group.name, availability_set_name="str", @@ -117,7 +117,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_subscription(self, resource_group): + async def test_availability_sets_list_by_subscription(self, resource_group): response = self.client.availability_sets.list_by_subscription( api_version="2024-07-01", ) @@ -127,7 +127,7 @@ async def test_list_by_subscription(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_availability_sets_list(self, resource_group): response = self.client.availability_sets.list( resource_group_name=resource_group.name, api_version="2024-07-01", @@ -138,7 +138,7 @@ async def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_available_sizes(self, resource_group): + async def test_availability_sets_list_available_sizes(self, resource_group): response = self.client.availability_sets.list_available_sizes( resource_group_name=resource_group.name, availability_set_name="str", diff --git a/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_capacity_reservation_groups_operations.py b/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_capacity_reservation_groups_operations.py index 074893d684d85..3d01c9032d374 100644 --- a/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_capacity_reservation_groups_operations.py +++ b/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_capacity_reservation_groups_operations.py @@ -20,7 +20,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_create_or_update(self, resource_group): + def test_capacity_reservation_groups_create_or_update(self, resource_group): response = self.client.capacity_reservation_groups.create_or_update( resource_group_name=resource_group.name, capacity_reservation_group_name="str", @@ -61,7 +61,7 @@ def test_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_update(self, resource_group): + def test_capacity_reservation_groups_update(self, resource_group): response = self.client.capacity_reservation_groups.update( resource_group_name=resource_group.name, capacity_reservation_group_name="str", @@ -97,7 +97,7 @@ def test_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_delete(self, resource_group): + def test_capacity_reservation_groups_delete(self, resource_group): response = self.client.capacity_reservation_groups.delete( resource_group_name=resource_group.name, capacity_reservation_group_name="str", @@ -109,7 +109,7 @@ def test_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_capacity_reservation_groups_get(self, resource_group): response = self.client.capacity_reservation_groups.get( resource_group_name=resource_group.name, capacity_reservation_group_name="str", @@ -121,7 +121,7 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_resource_group(self, resource_group): + def test_capacity_reservation_groups_list_by_resource_group(self, resource_group): response = self.client.capacity_reservation_groups.list_by_resource_group( resource_group_name=resource_group.name, api_version="2024-07-01", @@ -132,7 +132,7 @@ def test_list_by_resource_group(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_subscription(self, resource_group): + def test_capacity_reservation_groups_list_by_subscription(self, resource_group): response = self.client.capacity_reservation_groups.list_by_subscription( api_version="2024-07-01", ) diff --git a/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_capacity_reservation_groups_operations_async.py b/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_capacity_reservation_groups_operations_async.py index 35e7123b442d2..e28bd05f9ab97 100644 --- a/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_capacity_reservation_groups_operations_async.py +++ b/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_capacity_reservation_groups_operations_async.py @@ -21,7 +21,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_create_or_update(self, resource_group): + async def test_capacity_reservation_groups_create_or_update(self, resource_group): response = await self.client.capacity_reservation_groups.create_or_update( resource_group_name=resource_group.name, capacity_reservation_group_name="str", @@ -62,7 +62,7 @@ async def test_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_update(self, resource_group): + async def test_capacity_reservation_groups_update(self, resource_group): response = await self.client.capacity_reservation_groups.update( resource_group_name=resource_group.name, capacity_reservation_group_name="str", @@ -98,7 +98,7 @@ async def test_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_delete(self, resource_group): + async def test_capacity_reservation_groups_delete(self, resource_group): response = await self.client.capacity_reservation_groups.delete( resource_group_name=resource_group.name, capacity_reservation_group_name="str", @@ -110,7 +110,7 @@ async def test_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_capacity_reservation_groups_get(self, resource_group): response = await self.client.capacity_reservation_groups.get( resource_group_name=resource_group.name, capacity_reservation_group_name="str", @@ -122,7 +122,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_resource_group(self, resource_group): + async def test_capacity_reservation_groups_list_by_resource_group(self, resource_group): response = self.client.capacity_reservation_groups.list_by_resource_group( resource_group_name=resource_group.name, api_version="2024-07-01", @@ -133,7 +133,7 @@ async def test_list_by_resource_group(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_subscription(self, resource_group): + async def test_capacity_reservation_groups_list_by_subscription(self, resource_group): response = self.client.capacity_reservation_groups.list_by_subscription( api_version="2024-07-01", ) diff --git a/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_capacity_reservations_operations.py b/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_capacity_reservations_operations.py index b9cf3c11c669b..980e9c6ff7187 100644 --- a/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_capacity_reservations_operations.py +++ b/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_capacity_reservations_operations.py @@ -20,7 +20,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_create_or_update(self, resource_group): + def test_capacity_reservations_begin_create_or_update(self, resource_group): response = self.client.capacity_reservations.begin_create_or_update( resource_group_name=resource_group.name, capacity_reservation_group_name="str", @@ -60,7 +60,7 @@ def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_update(self, resource_group): + def test_capacity_reservations_begin_update(self, resource_group): response = self.client.capacity_reservations.begin_update( resource_group_name=resource_group.name, capacity_reservation_group_name="str", @@ -95,7 +95,7 @@ def test_begin_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete(self, resource_group): + def test_capacity_reservations_begin_delete(self, resource_group): response = self.client.capacity_reservations.begin_delete( resource_group_name=resource_group.name, capacity_reservation_group_name="str", @@ -108,7 +108,7 @@ def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_capacity_reservations_get(self, resource_group): response = self.client.capacity_reservations.get( resource_group_name=resource_group.name, capacity_reservation_group_name="str", @@ -121,7 +121,7 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_capacity_reservation_group(self, resource_group): + def test_capacity_reservations_list_by_capacity_reservation_group(self, resource_group): response = self.client.capacity_reservations.list_by_capacity_reservation_group( resource_group_name=resource_group.name, capacity_reservation_group_name="str", diff --git a/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_capacity_reservations_operations_async.py b/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_capacity_reservations_operations_async.py index 035e5a4f574a6..1dab0f7b7a346 100644 --- a/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_capacity_reservations_operations_async.py +++ b/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_capacity_reservations_operations_async.py @@ -21,7 +21,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_create_or_update(self, resource_group): + async def test_capacity_reservations_begin_create_or_update(self, resource_group): response = await ( await self.client.capacity_reservations.begin_create_or_update( resource_group_name=resource_group.name, @@ -63,7 +63,7 @@ async def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_update(self, resource_group): + async def test_capacity_reservations_begin_update(self, resource_group): response = await ( await self.client.capacity_reservations.begin_update( resource_group_name=resource_group.name, @@ -100,7 +100,7 @@ async def test_begin_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete(self, resource_group): + async def test_capacity_reservations_begin_delete(self, resource_group): response = await ( await self.client.capacity_reservations.begin_delete( resource_group_name=resource_group.name, @@ -115,7 +115,7 @@ async def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_capacity_reservations_get(self, resource_group): response = await self.client.capacity_reservations.get( resource_group_name=resource_group.name, capacity_reservation_group_name="str", @@ -128,7 +128,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_capacity_reservation_group(self, resource_group): + async def test_capacity_reservations_list_by_capacity_reservation_group(self, resource_group): response = self.client.capacity_reservations.list_by_capacity_reservation_group( resource_group_name=resource_group.name, capacity_reservation_group_name="str", diff --git a/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_dedicated_host_groups_operations.py b/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_dedicated_host_groups_operations.py index 4071d9cfacbb9..5a84c31f1a3af 100644 --- a/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_dedicated_host_groups_operations.py +++ b/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_dedicated_host_groups_operations.py @@ -20,7 +20,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_create_or_update(self, resource_group): + def test_dedicated_host_groups_create_or_update(self, resource_group): response = self.client.dedicated_host_groups.create_or_update( resource_group_name=resource_group.name, host_group_name="str", @@ -62,7 +62,7 @@ def test_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_update(self, resource_group): + def test_dedicated_host_groups_update(self, resource_group): response = self.client.dedicated_host_groups.update( resource_group_name=resource_group.name, host_group_name="str", @@ -100,7 +100,7 @@ def test_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_delete(self, resource_group): + def test_dedicated_host_groups_delete(self, resource_group): response = self.client.dedicated_host_groups.delete( resource_group_name=resource_group.name, host_group_name="str", @@ -112,7 +112,7 @@ def test_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_dedicated_host_groups_get(self, resource_group): response = self.client.dedicated_host_groups.get( resource_group_name=resource_group.name, host_group_name="str", @@ -124,7 +124,7 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_resource_group(self, resource_group): + def test_dedicated_host_groups_list_by_resource_group(self, resource_group): response = self.client.dedicated_host_groups.list_by_resource_group( resource_group_name=resource_group.name, api_version="2024-07-01", @@ -135,7 +135,7 @@ def test_list_by_resource_group(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_subscription(self, resource_group): + def test_dedicated_host_groups_list_by_subscription(self, resource_group): response = self.client.dedicated_host_groups.list_by_subscription( api_version="2024-07-01", ) diff --git a/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_dedicated_host_groups_operations_async.py b/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_dedicated_host_groups_operations_async.py index 46021037d8d20..c0348ff8a9196 100644 --- a/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_dedicated_host_groups_operations_async.py +++ b/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_dedicated_host_groups_operations_async.py @@ -21,7 +21,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_create_or_update(self, resource_group): + async def test_dedicated_host_groups_create_or_update(self, resource_group): response = await self.client.dedicated_host_groups.create_or_update( resource_group_name=resource_group.name, host_group_name="str", @@ -63,7 +63,7 @@ async def test_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_update(self, resource_group): + async def test_dedicated_host_groups_update(self, resource_group): response = await self.client.dedicated_host_groups.update( resource_group_name=resource_group.name, host_group_name="str", @@ -101,7 +101,7 @@ async def test_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_delete(self, resource_group): + async def test_dedicated_host_groups_delete(self, resource_group): response = await self.client.dedicated_host_groups.delete( resource_group_name=resource_group.name, host_group_name="str", @@ -113,7 +113,7 @@ async def test_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_dedicated_host_groups_get(self, resource_group): response = await self.client.dedicated_host_groups.get( resource_group_name=resource_group.name, host_group_name="str", @@ -125,7 +125,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_resource_group(self, resource_group): + async def test_dedicated_host_groups_list_by_resource_group(self, resource_group): response = self.client.dedicated_host_groups.list_by_resource_group( resource_group_name=resource_group.name, api_version="2024-07-01", @@ -136,7 +136,7 @@ async def test_list_by_resource_group(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_subscription(self, resource_group): + async def test_dedicated_host_groups_list_by_subscription(self, resource_group): response = self.client.dedicated_host_groups.list_by_subscription( api_version="2024-07-01", ) diff --git a/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_dedicated_hosts_operations.py b/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_dedicated_hosts_operations.py index 2948709070a05..01fe8d816cc31 100644 --- a/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_dedicated_hosts_operations.py +++ b/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_dedicated_hosts_operations.py @@ -20,7 +20,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_create_or_update(self, resource_group): + def test_dedicated_hosts_begin_create_or_update(self, resource_group): response = self.client.dedicated_hosts.begin_create_or_update( resource_group_name=resource_group.name, host_group_name="str", @@ -62,7 +62,7 @@ def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_update(self, resource_group): + def test_dedicated_hosts_begin_update(self, resource_group): response = self.client.dedicated_hosts.begin_update( resource_group_name=resource_group.name, host_group_name="str", @@ -100,7 +100,7 @@ def test_begin_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete(self, resource_group): + def test_dedicated_hosts_begin_delete(self, resource_group): response = self.client.dedicated_hosts.begin_delete( resource_group_name=resource_group.name, host_group_name="str", @@ -113,7 +113,7 @@ def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_dedicated_hosts_get(self, resource_group): response = self.client.dedicated_hosts.get( resource_group_name=resource_group.name, host_group_name="str", @@ -126,7 +126,7 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_host_group(self, resource_group): + def test_dedicated_hosts_list_by_host_group(self, resource_group): response = self.client.dedicated_hosts.list_by_host_group( resource_group_name=resource_group.name, host_group_name="str", @@ -138,7 +138,7 @@ def test_list_by_host_group(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_restart(self, resource_group): + def test_dedicated_hosts_begin_restart(self, resource_group): response = self.client.dedicated_hosts.begin_restart( resource_group_name=resource_group.name, host_group_name="str", @@ -151,7 +151,7 @@ def test_begin_restart(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_redeploy(self, resource_group): + def test_dedicated_hosts_begin_redeploy(self, resource_group): response = self.client.dedicated_hosts.begin_redeploy( resource_group_name=resource_group.name, host_group_name="str", @@ -164,7 +164,7 @@ def test_begin_redeploy(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_available_sizes(self, resource_group): + def test_dedicated_hosts_list_available_sizes(self, resource_group): response = self.client.dedicated_hosts.list_available_sizes( resource_group_name=resource_group.name, host_group_name="str", diff --git a/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_dedicated_hosts_operations_async.py b/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_dedicated_hosts_operations_async.py index 56d413b4144c7..981a2921a3e8f 100644 --- a/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_dedicated_hosts_operations_async.py +++ b/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_dedicated_hosts_operations_async.py @@ -21,7 +21,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_create_or_update(self, resource_group): + async def test_dedicated_hosts_begin_create_or_update(self, resource_group): response = await ( await self.client.dedicated_hosts.begin_create_or_update( resource_group_name=resource_group.name, @@ -65,7 +65,7 @@ async def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_update(self, resource_group): + async def test_dedicated_hosts_begin_update(self, resource_group): response = await ( await self.client.dedicated_hosts.begin_update( resource_group_name=resource_group.name, @@ -105,7 +105,7 @@ async def test_begin_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete(self, resource_group): + async def test_dedicated_hosts_begin_delete(self, resource_group): response = await ( await self.client.dedicated_hosts.begin_delete( resource_group_name=resource_group.name, @@ -120,7 +120,7 @@ async def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_dedicated_hosts_get(self, resource_group): response = await self.client.dedicated_hosts.get( resource_group_name=resource_group.name, host_group_name="str", @@ -133,7 +133,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_host_group(self, resource_group): + async def test_dedicated_hosts_list_by_host_group(self, resource_group): response = self.client.dedicated_hosts.list_by_host_group( resource_group_name=resource_group.name, host_group_name="str", @@ -145,7 +145,7 @@ async def test_list_by_host_group(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_restart(self, resource_group): + async def test_dedicated_hosts_begin_restart(self, resource_group): response = await ( await self.client.dedicated_hosts.begin_restart( resource_group_name=resource_group.name, @@ -160,7 +160,7 @@ async def test_begin_restart(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_redeploy(self, resource_group): + async def test_dedicated_hosts_begin_redeploy(self, resource_group): response = await ( await self.client.dedicated_hosts.begin_redeploy( resource_group_name=resource_group.name, @@ -175,7 +175,7 @@ async def test_begin_redeploy(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_available_sizes(self, resource_group): + async def test_dedicated_hosts_list_available_sizes(self, resource_group): response = self.client.dedicated_hosts.list_available_sizes( resource_group_name=resource_group.name, host_group_name="str", diff --git a/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_images_operations.py b/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_images_operations.py index b2f16134833eb..6b3abf1583341 100644 --- a/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_images_operations.py +++ b/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_images_operations.py @@ -20,7 +20,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_create_or_update(self, resource_group): + def test_images_begin_create_or_update(self, resource_group): response = self.client.images.begin_create_or_update( resource_group_name=resource_group.name, image_name="str", @@ -69,7 +69,7 @@ def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_update(self, resource_group): + def test_images_begin_update(self, resource_group): response = self.client.images.begin_update( resource_group_name=resource_group.name, image_name="str", @@ -113,7 +113,7 @@ def test_begin_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete(self, resource_group): + def test_images_begin_delete(self, resource_group): response = self.client.images.begin_delete( resource_group_name=resource_group.name, image_name="str", @@ -125,7 +125,7 @@ def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_images_get(self, resource_group): response = self.client.images.get( resource_group_name=resource_group.name, image_name="str", @@ -137,7 +137,7 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_resource_group(self, resource_group): + def test_images_list_by_resource_group(self, resource_group): response = self.client.images.list_by_resource_group( resource_group_name=resource_group.name, api_version="2024-07-01", @@ -148,7 +148,7 @@ def test_list_by_resource_group(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_images_list(self, resource_group): response = self.client.images.list( api_version="2024-07-01", ) diff --git a/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_images_operations_async.py b/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_images_operations_async.py index f20a855b9cb02..16a710ea66f06 100644 --- a/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_images_operations_async.py +++ b/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_images_operations_async.py @@ -21,7 +21,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_create_or_update(self, resource_group): + async def test_images_begin_create_or_update(self, resource_group): response = await ( await self.client.images.begin_create_or_update( resource_group_name=resource_group.name, @@ -72,7 +72,7 @@ async def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_update(self, resource_group): + async def test_images_begin_update(self, resource_group): response = await ( await self.client.images.begin_update( resource_group_name=resource_group.name, @@ -118,7 +118,7 @@ async def test_begin_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete(self, resource_group): + async def test_images_begin_delete(self, resource_group): response = await ( await self.client.images.begin_delete( resource_group_name=resource_group.name, @@ -132,7 +132,7 @@ async def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_images_get(self, resource_group): response = await self.client.images.get( resource_group_name=resource_group.name, image_name="str", @@ -144,7 +144,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_resource_group(self, resource_group): + async def test_images_list_by_resource_group(self, resource_group): response = self.client.images.list_by_resource_group( resource_group_name=resource_group.name, api_version="2024-07-01", @@ -155,7 +155,7 @@ async def test_list_by_resource_group(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_images_list(self, resource_group): response = self.client.images.list( api_version="2024-07-01", ) diff --git a/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_log_analytics_operations.py b/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_log_analytics_operations.py index bfed9385fdbdf..93aaf3d53b134 100644 --- a/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_log_analytics_operations.py +++ b/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_log_analytics_operations.py @@ -20,7 +20,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_export_request_rate_by_interval(self, resource_group): + def test_log_analytics_begin_export_request_rate_by_interval(self, resource_group): response = self.client.log_analytics.begin_export_request_rate_by_interval( location="str", parameters={ @@ -42,7 +42,7 @@ def test_begin_export_request_rate_by_interval(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_export_throttled_requests(self, resource_group): + def test_log_analytics_begin_export_throttled_requests(self, resource_group): response = self.client.log_analytics.begin_export_throttled_requests( location="str", parameters={ diff --git a/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_log_analytics_operations_async.py b/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_log_analytics_operations_async.py index d42d2e97af226..5ef27f9e34f44 100644 --- a/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_log_analytics_operations_async.py +++ b/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_log_analytics_operations_async.py @@ -21,7 +21,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_export_request_rate_by_interval(self, resource_group): + async def test_log_analytics_begin_export_request_rate_by_interval(self, resource_group): response = await ( await self.client.log_analytics.begin_export_request_rate_by_interval( location="str", @@ -45,7 +45,7 @@ async def test_begin_export_request_rate_by_interval(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_export_throttled_requests(self, resource_group): + async def test_log_analytics_begin_export_throttled_requests(self, resource_group): response = await ( await self.client.log_analytics.begin_export_throttled_requests( location="str", diff --git a/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_operations.py b/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_operations.py index 66759fe5dc588..8ac1b2772b591 100644 --- a/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_operations.py +++ b/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_operations.py @@ -20,7 +20,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_operations_list(self, resource_group): response = self.client.operations.list( api_version="2024-07-01", ) diff --git a/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_operations_async.py b/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_operations_async.py index a87bb7cd2f14b..e5fa673bdb2ac 100644 --- a/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_operations_async.py +++ b/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_operations_async.py @@ -21,7 +21,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_operations_list(self, resource_group): response = self.client.operations.list( api_version="2024-07-01", ) diff --git a/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_proximity_placement_groups_operations.py b/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_proximity_placement_groups_operations.py index 9eb96259d91ce..0bf0829c978be 100644 --- a/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_proximity_placement_groups_operations.py +++ b/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_proximity_placement_groups_operations.py @@ -20,7 +20,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_create_or_update(self, resource_group): + def test_proximity_placement_groups_create_or_update(self, resource_group): response = self.client.proximity_placement_groups.create_or_update( resource_group_name=resource_group.name, proximity_placement_group_name="str", @@ -85,7 +85,7 @@ def test_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_update(self, resource_group): + def test_proximity_placement_groups_update(self, resource_group): response = self.client.proximity_placement_groups.update( resource_group_name=resource_group.name, proximity_placement_group_name="str", @@ -98,7 +98,7 @@ def test_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_delete(self, resource_group): + def test_proximity_placement_groups_delete(self, resource_group): response = self.client.proximity_placement_groups.delete( resource_group_name=resource_group.name, proximity_placement_group_name="str", @@ -110,7 +110,7 @@ def test_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_proximity_placement_groups_get(self, resource_group): response = self.client.proximity_placement_groups.get( resource_group_name=resource_group.name, proximity_placement_group_name="str", @@ -122,7 +122,7 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_subscription(self, resource_group): + def test_proximity_placement_groups_list_by_subscription(self, resource_group): response = self.client.proximity_placement_groups.list_by_subscription( api_version="2024-07-01", ) @@ -132,7 +132,7 @@ def test_list_by_subscription(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_resource_group(self, resource_group): + def test_proximity_placement_groups_list_by_resource_group(self, resource_group): response = self.client.proximity_placement_groups.list_by_resource_group( resource_group_name=resource_group.name, api_version="2024-07-01", diff --git a/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_proximity_placement_groups_operations_async.py b/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_proximity_placement_groups_operations_async.py index 4cf1782a9b2c6..a60d0aaff0d54 100644 --- a/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_proximity_placement_groups_operations_async.py +++ b/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_proximity_placement_groups_operations_async.py @@ -21,7 +21,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_create_or_update(self, resource_group): + async def test_proximity_placement_groups_create_or_update(self, resource_group): response = await self.client.proximity_placement_groups.create_or_update( resource_group_name=resource_group.name, proximity_placement_group_name="str", @@ -86,7 +86,7 @@ async def test_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_update(self, resource_group): + async def test_proximity_placement_groups_update(self, resource_group): response = await self.client.proximity_placement_groups.update( resource_group_name=resource_group.name, proximity_placement_group_name="str", @@ -99,7 +99,7 @@ async def test_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_delete(self, resource_group): + async def test_proximity_placement_groups_delete(self, resource_group): response = await self.client.proximity_placement_groups.delete( resource_group_name=resource_group.name, proximity_placement_group_name="str", @@ -111,7 +111,7 @@ async def test_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_proximity_placement_groups_get(self, resource_group): response = await self.client.proximity_placement_groups.get( resource_group_name=resource_group.name, proximity_placement_group_name="str", @@ -123,7 +123,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_subscription(self, resource_group): + async def test_proximity_placement_groups_list_by_subscription(self, resource_group): response = self.client.proximity_placement_groups.list_by_subscription( api_version="2024-07-01", ) @@ -133,7 +133,7 @@ async def test_list_by_subscription(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_resource_group(self, resource_group): + async def test_proximity_placement_groups_list_by_resource_group(self, resource_group): response = self.client.proximity_placement_groups.list_by_resource_group( resource_group_name=resource_group.name, api_version="2024-07-01", diff --git a/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_restore_point_collections_operations.py b/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_restore_point_collections_operations.py index 08023097d17c7..31f5ff08b8b66 100644 --- a/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_restore_point_collections_operations.py +++ b/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_restore_point_collections_operations.py @@ -20,7 +20,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_create_or_update(self, resource_group): + def test_restore_point_collections_create_or_update(self, resource_group): response = self.client.restore_point_collections.create_or_update( resource_group_name=resource_group.name, restore_point_collection_name="str", @@ -203,7 +203,7 @@ def test_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_update(self, resource_group): + def test_restore_point_collections_update(self, resource_group): response = self.client.restore_point_collections.update( resource_group_name=resource_group.name, restore_point_collection_name="str", @@ -382,7 +382,7 @@ def test_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete(self, resource_group): + def test_restore_point_collections_begin_delete(self, resource_group): response = self.client.restore_point_collections.begin_delete( resource_group_name=resource_group.name, restore_point_collection_name="str", @@ -394,7 +394,7 @@ def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_restore_point_collections_get(self, resource_group): response = self.client.restore_point_collections.get( resource_group_name=resource_group.name, restore_point_collection_name="str", @@ -406,7 +406,7 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_restore_point_collections_list(self, resource_group): response = self.client.restore_point_collections.list( resource_group_name=resource_group.name, api_version="2024-07-01", @@ -417,7 +417,7 @@ def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_all(self, resource_group): + def test_restore_point_collections_list_all(self, resource_group): response = self.client.restore_point_collections.list_all( api_version="2024-07-01", ) diff --git a/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_restore_point_collections_operations_async.py b/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_restore_point_collections_operations_async.py index aea5773e26cb4..c0c62061774a2 100644 --- a/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_restore_point_collections_operations_async.py +++ b/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_restore_point_collections_operations_async.py @@ -21,7 +21,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_create_or_update(self, resource_group): + async def test_restore_point_collections_create_or_update(self, resource_group): response = await self.client.restore_point_collections.create_or_update( resource_group_name=resource_group.name, restore_point_collection_name="str", @@ -204,7 +204,7 @@ async def test_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_update(self, resource_group): + async def test_restore_point_collections_update(self, resource_group): response = await self.client.restore_point_collections.update( resource_group_name=resource_group.name, restore_point_collection_name="str", @@ -383,7 +383,7 @@ async def test_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete(self, resource_group): + async def test_restore_point_collections_begin_delete(self, resource_group): response = await ( await self.client.restore_point_collections.begin_delete( resource_group_name=resource_group.name, @@ -397,7 +397,7 @@ async def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_restore_point_collections_get(self, resource_group): response = await self.client.restore_point_collections.get( resource_group_name=resource_group.name, restore_point_collection_name="str", @@ -409,7 +409,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_restore_point_collections_list(self, resource_group): response = self.client.restore_point_collections.list( resource_group_name=resource_group.name, api_version="2024-07-01", @@ -420,7 +420,7 @@ async def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_all(self, resource_group): + async def test_restore_point_collections_list_all(self, resource_group): response = self.client.restore_point_collections.list_all( api_version="2024-07-01", ) diff --git a/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_restore_points_operations.py b/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_restore_points_operations.py index 69dacbb9410b9..54cb1e9f633fa 100644 --- a/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_restore_points_operations.py +++ b/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_restore_points_operations.py @@ -20,7 +20,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_create(self, resource_group): + def test_restore_points_begin_create(self, resource_group): response = self.client.restore_points.begin_create( resource_group_name=resource_group.name, restore_point_collection_name="str", @@ -189,7 +189,7 @@ def test_begin_create(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete(self, resource_group): + def test_restore_points_begin_delete(self, resource_group): response = self.client.restore_points.begin_delete( resource_group_name=resource_group.name, restore_point_collection_name="str", @@ -202,7 +202,7 @@ def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_restore_points_get(self, resource_group): response = self.client.restore_points.get( resource_group_name=resource_group.name, restore_point_collection_name="str", diff --git a/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_restore_points_operations_async.py b/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_restore_points_operations_async.py index 606f91fa63173..4ee549aec41c1 100644 --- a/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_restore_points_operations_async.py +++ b/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_restore_points_operations_async.py @@ -21,7 +21,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_create(self, resource_group): + async def test_restore_points_begin_create(self, resource_group): response = await ( await self.client.restore_points.begin_create( resource_group_name=resource_group.name, @@ -195,7 +195,7 @@ async def test_begin_create(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete(self, resource_group): + async def test_restore_points_begin_delete(self, resource_group): response = await ( await self.client.restore_points.begin_delete( resource_group_name=resource_group.name, @@ -210,7 +210,7 @@ async def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_restore_points_get(self, resource_group): response = await self.client.restore_points.get( resource_group_name=resource_group.name, restore_point_collection_name="str", diff --git a/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_ssh_public_keys_operations.py b/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_ssh_public_keys_operations.py index 8a9dc769eab0f..8a471d311f2d9 100644 --- a/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_ssh_public_keys_operations.py +++ b/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_ssh_public_keys_operations.py @@ -20,7 +20,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_subscription(self, resource_group): + def test_ssh_public_keys_list_by_subscription(self, resource_group): response = self.client.ssh_public_keys.list_by_subscription( api_version="2024-07-01", ) @@ -30,7 +30,7 @@ def test_list_by_subscription(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_resource_group(self, resource_group): + def test_ssh_public_keys_list_by_resource_group(self, resource_group): response = self.client.ssh_public_keys.list_by_resource_group( resource_group_name=resource_group.name, api_version="2024-07-01", @@ -41,7 +41,7 @@ def test_list_by_resource_group(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_create(self, resource_group): + def test_ssh_public_keys_create(self, resource_group): response = self.client.ssh_public_keys.create( resource_group_name=resource_group.name, ssh_public_key_name="str", @@ -61,7 +61,7 @@ def test_create(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_update(self, resource_group): + def test_ssh_public_keys_update(self, resource_group): response = self.client.ssh_public_keys.update( resource_group_name=resource_group.name, ssh_public_key_name="str", @@ -74,7 +74,7 @@ def test_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_delete(self, resource_group): + def test_ssh_public_keys_delete(self, resource_group): response = self.client.ssh_public_keys.delete( resource_group_name=resource_group.name, ssh_public_key_name="str", @@ -86,7 +86,7 @@ def test_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_ssh_public_keys_get(self, resource_group): response = self.client.ssh_public_keys.get( resource_group_name=resource_group.name, ssh_public_key_name="str", @@ -98,7 +98,7 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_generate_key_pair(self, resource_group): + def test_ssh_public_keys_generate_key_pair(self, resource_group): response = self.client.ssh_public_keys.generate_key_pair( resource_group_name=resource_group.name, ssh_public_key_name="str", diff --git a/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_ssh_public_keys_operations_async.py b/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_ssh_public_keys_operations_async.py index 68a7a6461a179..cb3758a0a0ad9 100644 --- a/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_ssh_public_keys_operations_async.py +++ b/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_ssh_public_keys_operations_async.py @@ -21,7 +21,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_subscription(self, resource_group): + async def test_ssh_public_keys_list_by_subscription(self, resource_group): response = self.client.ssh_public_keys.list_by_subscription( api_version="2024-07-01", ) @@ -31,7 +31,7 @@ async def test_list_by_subscription(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_resource_group(self, resource_group): + async def test_ssh_public_keys_list_by_resource_group(self, resource_group): response = self.client.ssh_public_keys.list_by_resource_group( resource_group_name=resource_group.name, api_version="2024-07-01", @@ -42,7 +42,7 @@ async def test_list_by_resource_group(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_create(self, resource_group): + async def test_ssh_public_keys_create(self, resource_group): response = await self.client.ssh_public_keys.create( resource_group_name=resource_group.name, ssh_public_key_name="str", @@ -62,7 +62,7 @@ async def test_create(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_update(self, resource_group): + async def test_ssh_public_keys_update(self, resource_group): response = await self.client.ssh_public_keys.update( resource_group_name=resource_group.name, ssh_public_key_name="str", @@ -75,7 +75,7 @@ async def test_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_delete(self, resource_group): + async def test_ssh_public_keys_delete(self, resource_group): response = await self.client.ssh_public_keys.delete( resource_group_name=resource_group.name, ssh_public_key_name="str", @@ -87,7 +87,7 @@ async def test_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_ssh_public_keys_get(self, resource_group): response = await self.client.ssh_public_keys.get( resource_group_name=resource_group.name, ssh_public_key_name="str", @@ -99,7 +99,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_generate_key_pair(self, resource_group): + async def test_ssh_public_keys_generate_key_pair(self, resource_group): response = await self.client.ssh_public_keys.generate_key_pair( resource_group_name=resource_group.name, ssh_public_key_name="str", diff --git a/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_usage_operations.py b/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_usage_operations.py index 61e2b2ed19b89..131b83beeb6db 100644 --- a/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_usage_operations.py +++ b/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_usage_operations.py @@ -20,7 +20,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_usage_list(self, resource_group): response = self.client.usage.list( location="str", api_version="2024-07-01", diff --git a/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_usage_operations_async.py b/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_usage_operations_async.py index 976004c3e633a..8380b244ebb07 100644 --- a/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_usage_operations_async.py +++ b/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_usage_operations_async.py @@ -21,7 +21,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_usage_list(self, resource_group): response = self.client.usage.list( location="str", api_version="2024-07-01", diff --git a/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_virtual_machine_extension_images_operations.py b/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_virtual_machine_extension_images_operations.py index 1801ea6126616..2794bf6c55915 100644 --- a/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_virtual_machine_extension_images_operations.py +++ b/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_virtual_machine_extension_images_operations.py @@ -20,7 +20,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_virtual_machine_extension_images_get(self, resource_group): response = self.client.virtual_machine_extension_images.get( location="str", publisher_name="str", @@ -34,7 +34,7 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_types(self, resource_group): + def test_virtual_machine_extension_images_list_types(self, resource_group): response = self.client.virtual_machine_extension_images.list_types( location="str", publisher_name="str", @@ -46,7 +46,7 @@ def test_list_types(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_versions(self, resource_group): + def test_virtual_machine_extension_images_list_versions(self, resource_group): response = self.client.virtual_machine_extension_images.list_versions( location="str", publisher_name="str", diff --git a/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_virtual_machine_extension_images_operations_async.py b/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_virtual_machine_extension_images_operations_async.py index dd08cf01da12e..d3ffc303fc522 100644 --- a/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_virtual_machine_extension_images_operations_async.py +++ b/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_virtual_machine_extension_images_operations_async.py @@ -21,7 +21,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_virtual_machine_extension_images_get(self, resource_group): response = await self.client.virtual_machine_extension_images.get( location="str", publisher_name="str", @@ -35,7 +35,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_types(self, resource_group): + async def test_virtual_machine_extension_images_list_types(self, resource_group): response = await self.client.virtual_machine_extension_images.list_types( location="str", publisher_name="str", @@ -47,7 +47,7 @@ async def test_list_types(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_versions(self, resource_group): + async def test_virtual_machine_extension_images_list_versions(self, resource_group): response = await self.client.virtual_machine_extension_images.list_versions( location="str", publisher_name="str", diff --git a/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_virtual_machine_extensions_operations.py b/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_virtual_machine_extensions_operations.py index 818ca935ef0c3..eaa34e1355076 100644 --- a/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_virtual_machine_extensions_operations.py +++ b/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_virtual_machine_extensions_operations.py @@ -20,7 +20,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_create_or_update(self, resource_group): + def test_virtual_machine_extensions_begin_create_or_update(self, resource_group): response = self.client.virtual_machine_extensions.begin_create_or_update( resource_group_name=resource_group.name, vm_name="str", @@ -74,7 +74,7 @@ def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_update(self, resource_group): + def test_virtual_machine_extensions_begin_update(self, resource_group): response = self.client.virtual_machine_extensions.begin_update( resource_group_name=resource_group.name, vm_name="str", @@ -100,7 +100,7 @@ def test_begin_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete(self, resource_group): + def test_virtual_machine_extensions_begin_delete(self, resource_group): response = self.client.virtual_machine_extensions.begin_delete( resource_group_name=resource_group.name, vm_name="str", @@ -113,7 +113,7 @@ def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_virtual_machine_extensions_get(self, resource_group): response = self.client.virtual_machine_extensions.get( resource_group_name=resource_group.name, vm_name="str", @@ -126,7 +126,7 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_virtual_machine_extensions_list(self, resource_group): response = self.client.virtual_machine_extensions.list( resource_group_name=resource_group.name, vm_name="str", diff --git a/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_virtual_machine_extensions_operations_async.py b/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_virtual_machine_extensions_operations_async.py index 403aff13853c0..5e1ede0cd98e0 100644 --- a/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_virtual_machine_extensions_operations_async.py +++ b/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_virtual_machine_extensions_operations_async.py @@ -21,7 +21,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_create_or_update(self, resource_group): + async def test_virtual_machine_extensions_begin_create_or_update(self, resource_group): response = await ( await self.client.virtual_machine_extensions.begin_create_or_update( resource_group_name=resource_group.name, @@ -77,7 +77,7 @@ async def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_update(self, resource_group): + async def test_virtual_machine_extensions_begin_update(self, resource_group): response = await ( await self.client.virtual_machine_extensions.begin_update( resource_group_name=resource_group.name, @@ -105,7 +105,7 @@ async def test_begin_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete(self, resource_group): + async def test_virtual_machine_extensions_begin_delete(self, resource_group): response = await ( await self.client.virtual_machine_extensions.begin_delete( resource_group_name=resource_group.name, @@ -120,7 +120,7 @@ async def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_virtual_machine_extensions_get(self, resource_group): response = await self.client.virtual_machine_extensions.get( resource_group_name=resource_group.name, vm_name="str", @@ -133,7 +133,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_virtual_machine_extensions_list(self, resource_group): response = await self.client.virtual_machine_extensions.list( resource_group_name=resource_group.name, vm_name="str", diff --git a/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_virtual_machine_images_edge_zone_operations.py b/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_virtual_machine_images_edge_zone_operations.py index aa54a21256474..4fb59da46659e 100644 --- a/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_virtual_machine_images_edge_zone_operations.py +++ b/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_virtual_machine_images_edge_zone_operations.py @@ -20,7 +20,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_virtual_machine_images_edge_zone_get(self, resource_group): response = self.client.virtual_machine_images_edge_zone.get( location="str", edge_zone="str", @@ -36,7 +36,7 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_virtual_machine_images_edge_zone_list(self, resource_group): response = self.client.virtual_machine_images_edge_zone.list( location="str", edge_zone="str", @@ -51,7 +51,7 @@ def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_offers(self, resource_group): + def test_virtual_machine_images_edge_zone_list_offers(self, resource_group): response = self.client.virtual_machine_images_edge_zone.list_offers( location="str", edge_zone="str", @@ -64,7 +64,7 @@ def test_list_offers(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_publishers(self, resource_group): + def test_virtual_machine_images_edge_zone_list_publishers(self, resource_group): response = self.client.virtual_machine_images_edge_zone.list_publishers( location="str", edge_zone="str", @@ -76,7 +76,7 @@ def test_list_publishers(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_skus(self, resource_group): + def test_virtual_machine_images_edge_zone_list_skus(self, resource_group): response = self.client.virtual_machine_images_edge_zone.list_skus( location="str", edge_zone="str", diff --git a/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_virtual_machine_images_edge_zone_operations_async.py b/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_virtual_machine_images_edge_zone_operations_async.py index 64623bcfc20a9..904286e3195ba 100644 --- a/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_virtual_machine_images_edge_zone_operations_async.py +++ b/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_virtual_machine_images_edge_zone_operations_async.py @@ -21,7 +21,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_virtual_machine_images_edge_zone_get(self, resource_group): response = await self.client.virtual_machine_images_edge_zone.get( location="str", edge_zone="str", @@ -37,7 +37,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_virtual_machine_images_edge_zone_list(self, resource_group): response = await self.client.virtual_machine_images_edge_zone.list( location="str", edge_zone="str", @@ -52,7 +52,7 @@ async def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_offers(self, resource_group): + async def test_virtual_machine_images_edge_zone_list_offers(self, resource_group): response = await self.client.virtual_machine_images_edge_zone.list_offers( location="str", edge_zone="str", @@ -65,7 +65,7 @@ async def test_list_offers(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_publishers(self, resource_group): + async def test_virtual_machine_images_edge_zone_list_publishers(self, resource_group): response = await self.client.virtual_machine_images_edge_zone.list_publishers( location="str", edge_zone="str", @@ -77,7 +77,7 @@ async def test_list_publishers(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_skus(self, resource_group): + async def test_virtual_machine_images_edge_zone_list_skus(self, resource_group): response = await self.client.virtual_machine_images_edge_zone.list_skus( location="str", edge_zone="str", diff --git a/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_virtual_machine_images_operations.py b/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_virtual_machine_images_operations.py index a68fe77cb9ec9..b63b076d4fad1 100644 --- a/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_virtual_machine_images_operations.py +++ b/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_virtual_machine_images_operations.py @@ -20,7 +20,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_virtual_machine_images_get(self, resource_group): response = self.client.virtual_machine_images.get( location="str", publisher_name="str", @@ -35,7 +35,7 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_virtual_machine_images_list(self, resource_group): response = self.client.virtual_machine_images.list( location="str", publisher_name="str", @@ -49,7 +49,7 @@ def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_offers(self, resource_group): + def test_virtual_machine_images_list_offers(self, resource_group): response = self.client.virtual_machine_images.list_offers( location="str", publisher_name="str", @@ -61,7 +61,7 @@ def test_list_offers(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_publishers(self, resource_group): + def test_virtual_machine_images_list_publishers(self, resource_group): response = self.client.virtual_machine_images.list_publishers( location="str", api_version="2024-07-01", @@ -72,7 +72,7 @@ def test_list_publishers(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_skus(self, resource_group): + def test_virtual_machine_images_list_skus(self, resource_group): response = self.client.virtual_machine_images.list_skus( location="str", publisher_name="str", @@ -85,7 +85,7 @@ def test_list_skus(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_edge_zone(self, resource_group): + def test_virtual_machine_images_list_by_edge_zone(self, resource_group): response = self.client.virtual_machine_images.list_by_edge_zone( location="str", edge_zone="str", diff --git a/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_virtual_machine_images_operations_async.py b/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_virtual_machine_images_operations_async.py index 5283fc73c9ea3..a1e47ad047a42 100644 --- a/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_virtual_machine_images_operations_async.py +++ b/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_virtual_machine_images_operations_async.py @@ -21,7 +21,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_virtual_machine_images_get(self, resource_group): response = await self.client.virtual_machine_images.get( location="str", publisher_name="str", @@ -36,7 +36,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_virtual_machine_images_list(self, resource_group): response = await self.client.virtual_machine_images.list( location="str", publisher_name="str", @@ -50,7 +50,7 @@ async def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_offers(self, resource_group): + async def test_virtual_machine_images_list_offers(self, resource_group): response = await self.client.virtual_machine_images.list_offers( location="str", publisher_name="str", @@ -62,7 +62,7 @@ async def test_list_offers(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_publishers(self, resource_group): + async def test_virtual_machine_images_list_publishers(self, resource_group): response = await self.client.virtual_machine_images.list_publishers( location="str", api_version="2024-07-01", @@ -73,7 +73,7 @@ async def test_list_publishers(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_skus(self, resource_group): + async def test_virtual_machine_images_list_skus(self, resource_group): response = await self.client.virtual_machine_images.list_skus( location="str", publisher_name="str", @@ -86,7 +86,7 @@ async def test_list_skus(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_edge_zone(self, resource_group): + async def test_virtual_machine_images_list_by_edge_zone(self, resource_group): response = await self.client.virtual_machine_images.list_by_edge_zone( location="str", edge_zone="str", diff --git a/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_virtual_machine_run_commands_operations.py b/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_virtual_machine_run_commands_operations.py index 683916c14e875..51a90948af2aa 100644 --- a/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_virtual_machine_run_commands_operations.py +++ b/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_virtual_machine_run_commands_operations.py @@ -20,7 +20,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_virtual_machine_run_commands_list(self, resource_group): response = self.client.virtual_machine_run_commands.list( location="str", api_version="2024-07-01", @@ -31,7 +31,7 @@ def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_virtual_machine_run_commands_get(self, resource_group): response = self.client.virtual_machine_run_commands.get( location="str", command_id="str", @@ -43,7 +43,7 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_create_or_update(self, resource_group): + def test_virtual_machine_run_commands_begin_create_or_update(self, resource_group): response = self.client.virtual_machine_run_commands.begin_create_or_update( resource_group_name=resource_group.name, vm_name="str", @@ -99,7 +99,7 @@ def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_update(self, resource_group): + def test_virtual_machine_run_commands_begin_update(self, resource_group): response = self.client.virtual_machine_run_commands.begin_update( resource_group_name=resource_group.name, vm_name="str", @@ -151,7 +151,7 @@ def test_begin_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete(self, resource_group): + def test_virtual_machine_run_commands_begin_delete(self, resource_group): response = self.client.virtual_machine_run_commands.begin_delete( resource_group_name=resource_group.name, vm_name="str", @@ -164,7 +164,7 @@ def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get_by_virtual_machine(self, resource_group): + def test_virtual_machine_run_commands_get_by_virtual_machine(self, resource_group): response = self.client.virtual_machine_run_commands.get_by_virtual_machine( resource_group_name=resource_group.name, vm_name="str", @@ -177,7 +177,7 @@ def test_get_by_virtual_machine(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_virtual_machine(self, resource_group): + def test_virtual_machine_run_commands_list_by_virtual_machine(self, resource_group): response = self.client.virtual_machine_run_commands.list_by_virtual_machine( resource_group_name=resource_group.name, vm_name="str", diff --git a/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_virtual_machine_run_commands_operations_async.py b/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_virtual_machine_run_commands_operations_async.py index f3203d1e97ee4..546f0c02b0f24 100644 --- a/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_virtual_machine_run_commands_operations_async.py +++ b/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_virtual_machine_run_commands_operations_async.py @@ -21,7 +21,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_virtual_machine_run_commands_list(self, resource_group): response = self.client.virtual_machine_run_commands.list( location="str", api_version="2024-07-01", @@ -32,7 +32,7 @@ async def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_virtual_machine_run_commands_get(self, resource_group): response = await self.client.virtual_machine_run_commands.get( location="str", command_id="str", @@ -44,7 +44,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_create_or_update(self, resource_group): + async def test_virtual_machine_run_commands_begin_create_or_update(self, resource_group): response = await ( await self.client.virtual_machine_run_commands.begin_create_or_update( resource_group_name=resource_group.name, @@ -102,7 +102,7 @@ async def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_update(self, resource_group): + async def test_virtual_machine_run_commands_begin_update(self, resource_group): response = await ( await self.client.virtual_machine_run_commands.begin_update( resource_group_name=resource_group.name, @@ -156,7 +156,7 @@ async def test_begin_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete(self, resource_group): + async def test_virtual_machine_run_commands_begin_delete(self, resource_group): response = await ( await self.client.virtual_machine_run_commands.begin_delete( resource_group_name=resource_group.name, @@ -171,7 +171,7 @@ async def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get_by_virtual_machine(self, resource_group): + async def test_virtual_machine_run_commands_get_by_virtual_machine(self, resource_group): response = await self.client.virtual_machine_run_commands.get_by_virtual_machine( resource_group_name=resource_group.name, vm_name="str", @@ -184,7 +184,7 @@ async def test_get_by_virtual_machine(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_virtual_machine(self, resource_group): + async def test_virtual_machine_run_commands_list_by_virtual_machine(self, resource_group): response = self.client.virtual_machine_run_commands.list_by_virtual_machine( resource_group_name=resource_group.name, vm_name="str", diff --git a/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_virtual_machine_scale_set_extensions_operations.py b/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_virtual_machine_scale_set_extensions_operations.py index cc82defa940f9..b868f7903c37b 100644 --- a/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_virtual_machine_scale_set_extensions_operations.py +++ b/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_virtual_machine_scale_set_extensions_operations.py @@ -20,7 +20,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_create_or_update(self, resource_group): + def test_virtual_machine_scale_set_extensions_begin_create_or_update(self, resource_group): response = self.client.virtual_machine_scale_set_extensions.begin_create_or_update( resource_group_name=resource_group.name, vm_scale_set_name="str", @@ -49,7 +49,7 @@ def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_update(self, resource_group): + def test_virtual_machine_scale_set_extensions_begin_update(self, resource_group): response = self.client.virtual_machine_scale_set_extensions.begin_update( resource_group_name=resource_group.name, vm_scale_set_name="str", @@ -78,7 +78,7 @@ def test_begin_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete(self, resource_group): + def test_virtual_machine_scale_set_extensions_begin_delete(self, resource_group): response = self.client.virtual_machine_scale_set_extensions.begin_delete( resource_group_name=resource_group.name, vm_scale_set_name="str", @@ -91,7 +91,7 @@ def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_virtual_machine_scale_set_extensions_get(self, resource_group): response = self.client.virtual_machine_scale_set_extensions.get( resource_group_name=resource_group.name, vm_scale_set_name="str", @@ -104,7 +104,7 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_virtual_machine_scale_set_extensions_list(self, resource_group): response = self.client.virtual_machine_scale_set_extensions.list( resource_group_name=resource_group.name, vm_scale_set_name="str", diff --git a/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_virtual_machine_scale_set_extensions_operations_async.py b/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_virtual_machine_scale_set_extensions_operations_async.py index e79a2fa11048d..199c9bbb930e8 100644 --- a/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_virtual_machine_scale_set_extensions_operations_async.py +++ b/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_virtual_machine_scale_set_extensions_operations_async.py @@ -21,7 +21,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_create_or_update(self, resource_group): + async def test_virtual_machine_scale_set_extensions_begin_create_or_update(self, resource_group): response = await ( await self.client.virtual_machine_scale_set_extensions.begin_create_or_update( resource_group_name=resource_group.name, @@ -52,7 +52,7 @@ async def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_update(self, resource_group): + async def test_virtual_machine_scale_set_extensions_begin_update(self, resource_group): response = await ( await self.client.virtual_machine_scale_set_extensions.begin_update( resource_group_name=resource_group.name, @@ -83,7 +83,7 @@ async def test_begin_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete(self, resource_group): + async def test_virtual_machine_scale_set_extensions_begin_delete(self, resource_group): response = await ( await self.client.virtual_machine_scale_set_extensions.begin_delete( resource_group_name=resource_group.name, @@ -98,7 +98,7 @@ async def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_virtual_machine_scale_set_extensions_get(self, resource_group): response = await self.client.virtual_machine_scale_set_extensions.get( resource_group_name=resource_group.name, vm_scale_set_name="str", @@ -111,7 +111,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_virtual_machine_scale_set_extensions_list(self, resource_group): response = self.client.virtual_machine_scale_set_extensions.list( resource_group_name=resource_group.name, vm_scale_set_name="str", diff --git a/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_virtual_machine_scale_set_rolling_upgrades_operations.py b/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_virtual_machine_scale_set_rolling_upgrades_operations.py index 399fdb651cf03..d1a7408f62220 100644 --- a/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_virtual_machine_scale_set_rolling_upgrades_operations.py +++ b/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_virtual_machine_scale_set_rolling_upgrades_operations.py @@ -20,7 +20,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_cancel(self, resource_group): + def test_virtual_machine_scale_set_rolling_upgrades_begin_cancel(self, resource_group): response = self.client.virtual_machine_scale_set_rolling_upgrades.begin_cancel( resource_group_name=resource_group.name, vm_scale_set_name="str", @@ -32,7 +32,7 @@ def test_begin_cancel(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_start_os_upgrade(self, resource_group): + def test_virtual_machine_scale_set_rolling_upgrades_begin_start_os_upgrade(self, resource_group): response = self.client.virtual_machine_scale_set_rolling_upgrades.begin_start_os_upgrade( resource_group_name=resource_group.name, vm_scale_set_name="str", @@ -44,7 +44,7 @@ def test_begin_start_os_upgrade(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_start_extension_upgrade(self, resource_group): + def test_virtual_machine_scale_set_rolling_upgrades_begin_start_extension_upgrade(self, resource_group): response = self.client.virtual_machine_scale_set_rolling_upgrades.begin_start_extension_upgrade( resource_group_name=resource_group.name, vm_scale_set_name="str", @@ -56,7 +56,7 @@ def test_begin_start_extension_upgrade(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get_latest(self, resource_group): + def test_virtual_machine_scale_set_rolling_upgrades_get_latest(self, resource_group): response = self.client.virtual_machine_scale_set_rolling_upgrades.get_latest( resource_group_name=resource_group.name, vm_scale_set_name="str", diff --git a/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_virtual_machine_scale_set_rolling_upgrades_operations_async.py b/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_virtual_machine_scale_set_rolling_upgrades_operations_async.py index 4ac6838f8f543..91059cb1bcf56 100644 --- a/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_virtual_machine_scale_set_rolling_upgrades_operations_async.py +++ b/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_virtual_machine_scale_set_rolling_upgrades_operations_async.py @@ -21,7 +21,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_cancel(self, resource_group): + async def test_virtual_machine_scale_set_rolling_upgrades_begin_cancel(self, resource_group): response = await ( await self.client.virtual_machine_scale_set_rolling_upgrades.begin_cancel( resource_group_name=resource_group.name, @@ -35,7 +35,7 @@ async def test_begin_cancel(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_start_os_upgrade(self, resource_group): + async def test_virtual_machine_scale_set_rolling_upgrades_begin_start_os_upgrade(self, resource_group): response = await ( await self.client.virtual_machine_scale_set_rolling_upgrades.begin_start_os_upgrade( resource_group_name=resource_group.name, @@ -49,7 +49,7 @@ async def test_begin_start_os_upgrade(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_start_extension_upgrade(self, resource_group): + async def test_virtual_machine_scale_set_rolling_upgrades_begin_start_extension_upgrade(self, resource_group): response = await ( await self.client.virtual_machine_scale_set_rolling_upgrades.begin_start_extension_upgrade( resource_group_name=resource_group.name, @@ -63,7 +63,7 @@ async def test_begin_start_extension_upgrade(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get_latest(self, resource_group): + async def test_virtual_machine_scale_set_rolling_upgrades_get_latest(self, resource_group): response = await self.client.virtual_machine_scale_set_rolling_upgrades.get_latest( resource_group_name=resource_group.name, vm_scale_set_name="str", diff --git a/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_virtual_machine_scale_set_vm_extensions_operations.py b/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_virtual_machine_scale_set_vm_extensions_operations.py index 85dd50143318b..f51c78ad978a1 100644 --- a/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_virtual_machine_scale_set_vm_extensions_operations.py +++ b/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_virtual_machine_scale_set_vm_extensions_operations.py @@ -20,7 +20,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_create_or_update(self, resource_group): + def test_virtual_machine_scale_set_vm_extensions_begin_create_or_update(self, resource_group): response = self.client.virtual_machine_scale_set_vm_extensions.begin_create_or_update( resource_group_name=resource_group.name, vm_scale_set_name="str", @@ -74,7 +74,7 @@ def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_update(self, resource_group): + def test_virtual_machine_scale_set_vm_extensions_begin_update(self, resource_group): response = self.client.virtual_machine_scale_set_vm_extensions.begin_update( resource_group_name=resource_group.name, vm_scale_set_name="str", @@ -102,7 +102,7 @@ def test_begin_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete(self, resource_group): + def test_virtual_machine_scale_set_vm_extensions_begin_delete(self, resource_group): response = self.client.virtual_machine_scale_set_vm_extensions.begin_delete( resource_group_name=resource_group.name, vm_scale_set_name="str", @@ -116,7 +116,7 @@ def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_virtual_machine_scale_set_vm_extensions_get(self, resource_group): response = self.client.virtual_machine_scale_set_vm_extensions.get( resource_group_name=resource_group.name, vm_scale_set_name="str", @@ -130,7 +130,7 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_virtual_machine_scale_set_vm_extensions_list(self, resource_group): response = self.client.virtual_machine_scale_set_vm_extensions.list( resource_group_name=resource_group.name, vm_scale_set_name="str", diff --git a/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_virtual_machine_scale_set_vm_extensions_operations_async.py b/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_virtual_machine_scale_set_vm_extensions_operations_async.py index f555a0d68f060..d7939e6a4d0f3 100644 --- a/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_virtual_machine_scale_set_vm_extensions_operations_async.py +++ b/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_virtual_machine_scale_set_vm_extensions_operations_async.py @@ -21,7 +21,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_create_or_update(self, resource_group): + async def test_virtual_machine_scale_set_vm_extensions_begin_create_or_update(self, resource_group): response = await ( await self.client.virtual_machine_scale_set_vm_extensions.begin_create_or_update( resource_group_name=resource_group.name, @@ -77,7 +77,7 @@ async def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_update(self, resource_group): + async def test_virtual_machine_scale_set_vm_extensions_begin_update(self, resource_group): response = await ( await self.client.virtual_machine_scale_set_vm_extensions.begin_update( resource_group_name=resource_group.name, @@ -107,7 +107,7 @@ async def test_begin_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete(self, resource_group): + async def test_virtual_machine_scale_set_vm_extensions_begin_delete(self, resource_group): response = await ( await self.client.virtual_machine_scale_set_vm_extensions.begin_delete( resource_group_name=resource_group.name, @@ -123,7 +123,7 @@ async def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_virtual_machine_scale_set_vm_extensions_get(self, resource_group): response = await self.client.virtual_machine_scale_set_vm_extensions.get( resource_group_name=resource_group.name, vm_scale_set_name="str", @@ -137,7 +137,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_virtual_machine_scale_set_vm_extensions_list(self, resource_group): response = await self.client.virtual_machine_scale_set_vm_extensions.list( resource_group_name=resource_group.name, vm_scale_set_name="str", diff --git a/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_virtual_machine_scale_set_vm_run_commands_operations.py b/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_virtual_machine_scale_set_vm_run_commands_operations.py index 9a61912673661..a5fec3c2fe87d 100644 --- a/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_virtual_machine_scale_set_vm_run_commands_operations.py +++ b/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_virtual_machine_scale_set_vm_run_commands_operations.py @@ -20,7 +20,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_create_or_update(self, resource_group): + def test_virtual_machine_scale_set_vm_run_commands_begin_create_or_update(self, resource_group): response = self.client.virtual_machine_scale_set_vm_run_commands.begin_create_or_update( resource_group_name=resource_group.name, vm_scale_set_name="str", @@ -77,7 +77,7 @@ def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_update(self, resource_group): + def test_virtual_machine_scale_set_vm_run_commands_begin_update(self, resource_group): response = self.client.virtual_machine_scale_set_vm_run_commands.begin_update( resource_group_name=resource_group.name, vm_scale_set_name="str", @@ -130,7 +130,7 @@ def test_begin_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete(self, resource_group): + def test_virtual_machine_scale_set_vm_run_commands_begin_delete(self, resource_group): response = self.client.virtual_machine_scale_set_vm_run_commands.begin_delete( resource_group_name=resource_group.name, vm_scale_set_name="str", @@ -144,7 +144,7 @@ def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_virtual_machine_scale_set_vm_run_commands_get(self, resource_group): response = self.client.virtual_machine_scale_set_vm_run_commands.get( resource_group_name=resource_group.name, vm_scale_set_name="str", @@ -158,7 +158,7 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_virtual_machine_scale_set_vm_run_commands_list(self, resource_group): response = self.client.virtual_machine_scale_set_vm_run_commands.list( resource_group_name=resource_group.name, vm_scale_set_name="str", diff --git a/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_virtual_machine_scale_set_vm_run_commands_operations_async.py b/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_virtual_machine_scale_set_vm_run_commands_operations_async.py index c82a3cd73cbef..1addfc190c84e 100644 --- a/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_virtual_machine_scale_set_vm_run_commands_operations_async.py +++ b/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_virtual_machine_scale_set_vm_run_commands_operations_async.py @@ -21,7 +21,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_create_or_update(self, resource_group): + async def test_virtual_machine_scale_set_vm_run_commands_begin_create_or_update(self, resource_group): response = await ( await self.client.virtual_machine_scale_set_vm_run_commands.begin_create_or_update( resource_group_name=resource_group.name, @@ -80,7 +80,7 @@ async def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_update(self, resource_group): + async def test_virtual_machine_scale_set_vm_run_commands_begin_update(self, resource_group): response = await ( await self.client.virtual_machine_scale_set_vm_run_commands.begin_update( resource_group_name=resource_group.name, @@ -135,7 +135,7 @@ async def test_begin_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete(self, resource_group): + async def test_virtual_machine_scale_set_vm_run_commands_begin_delete(self, resource_group): response = await ( await self.client.virtual_machine_scale_set_vm_run_commands.begin_delete( resource_group_name=resource_group.name, @@ -151,7 +151,7 @@ async def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_virtual_machine_scale_set_vm_run_commands_get(self, resource_group): response = await self.client.virtual_machine_scale_set_vm_run_commands.get( resource_group_name=resource_group.name, vm_scale_set_name="str", @@ -165,7 +165,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_virtual_machine_scale_set_vm_run_commands_list(self, resource_group): response = self.client.virtual_machine_scale_set_vm_run_commands.list( resource_group_name=resource_group.name, vm_scale_set_name="str", diff --git a/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_virtual_machine_scale_set_vms_operations.py b/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_virtual_machine_scale_set_vms_operations.py index 6872f2c6a370f..56f9604cb060d 100644 --- a/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_virtual_machine_scale_set_vms_operations.py +++ b/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_virtual_machine_scale_set_vms_operations.py @@ -20,7 +20,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_reimage(self, resource_group): + def test_virtual_machine_scale_set_vms_begin_reimage(self, resource_group): response = self.client.virtual_machine_scale_set_vms.begin_reimage( resource_group_name=resource_group.name, vm_scale_set_name="str", @@ -33,7 +33,7 @@ def test_begin_reimage(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_reimage_all(self, resource_group): + def test_virtual_machine_scale_set_vms_begin_reimage_all(self, resource_group): response = self.client.virtual_machine_scale_set_vms.begin_reimage_all( resource_group_name=resource_group.name, vm_scale_set_name="str", @@ -46,7 +46,7 @@ def test_begin_reimage_all(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_approve_rolling_upgrade(self, resource_group): + def test_virtual_machine_scale_set_vms_begin_approve_rolling_upgrade(self, resource_group): response = self.client.virtual_machine_scale_set_vms.begin_approve_rolling_upgrade( resource_group_name=resource_group.name, vm_scale_set_name="str", @@ -59,7 +59,7 @@ def test_begin_approve_rolling_upgrade(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_deallocate(self, resource_group): + def test_virtual_machine_scale_set_vms_begin_deallocate(self, resource_group): response = self.client.virtual_machine_scale_set_vms.begin_deallocate( resource_group_name=resource_group.name, vm_scale_set_name="str", @@ -72,7 +72,7 @@ def test_begin_deallocate(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_update(self, resource_group): + def test_virtual_machine_scale_set_vms_begin_update(self, resource_group): response = self.client.virtual_machine_scale_set_vms.begin_update( resource_group_name=resource_group.name, vm_scale_set_name="str", @@ -481,7 +481,7 @@ def test_begin_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete(self, resource_group): + def test_virtual_machine_scale_set_vms_begin_delete(self, resource_group): response = self.client.virtual_machine_scale_set_vms.begin_delete( resource_group_name=resource_group.name, vm_scale_set_name="str", @@ -494,7 +494,7 @@ def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_virtual_machine_scale_set_vms_get(self, resource_group): response = self.client.virtual_machine_scale_set_vms.get( resource_group_name=resource_group.name, vm_scale_set_name="str", @@ -507,7 +507,7 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get_instance_view(self, resource_group): + def test_virtual_machine_scale_set_vms_get_instance_view(self, resource_group): response = self.client.virtual_machine_scale_set_vms.get_instance_view( resource_group_name=resource_group.name, vm_scale_set_name="str", @@ -520,7 +520,7 @@ def test_get_instance_view(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_virtual_machine_scale_set_vms_list(self, resource_group): response = self.client.virtual_machine_scale_set_vms.list( resource_group_name=resource_group.name, virtual_machine_scale_set_name="str", @@ -532,7 +532,7 @@ def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_power_off(self, resource_group): + def test_virtual_machine_scale_set_vms_begin_power_off(self, resource_group): response = self.client.virtual_machine_scale_set_vms.begin_power_off( resource_group_name=resource_group.name, vm_scale_set_name="str", @@ -545,7 +545,7 @@ def test_begin_power_off(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_restart(self, resource_group): + def test_virtual_machine_scale_set_vms_begin_restart(self, resource_group): response = self.client.virtual_machine_scale_set_vms.begin_restart( resource_group_name=resource_group.name, vm_scale_set_name="str", @@ -558,7 +558,7 @@ def test_begin_restart(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_start(self, resource_group): + def test_virtual_machine_scale_set_vms_begin_start(self, resource_group): response = self.client.virtual_machine_scale_set_vms.begin_start( resource_group_name=resource_group.name, vm_scale_set_name="str", @@ -571,7 +571,7 @@ def test_begin_start(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_redeploy(self, resource_group): + def test_virtual_machine_scale_set_vms_begin_redeploy(self, resource_group): response = self.client.virtual_machine_scale_set_vms.begin_redeploy( resource_group_name=resource_group.name, vm_scale_set_name="str", @@ -584,7 +584,7 @@ def test_begin_redeploy(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_retrieve_boot_diagnostics_data(self, resource_group): + def test_virtual_machine_scale_set_vms_retrieve_boot_diagnostics_data(self, resource_group): response = self.client.virtual_machine_scale_set_vms.retrieve_boot_diagnostics_data( resource_group_name=resource_group.name, vm_scale_set_name="str", @@ -597,7 +597,7 @@ def test_retrieve_boot_diagnostics_data(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_perform_maintenance(self, resource_group): + def test_virtual_machine_scale_set_vms_begin_perform_maintenance(self, resource_group): response = self.client.virtual_machine_scale_set_vms.begin_perform_maintenance( resource_group_name=resource_group.name, vm_scale_set_name="str", @@ -610,7 +610,7 @@ def test_begin_perform_maintenance(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_simulate_eviction(self, resource_group): + def test_virtual_machine_scale_set_vms_simulate_eviction(self, resource_group): response = self.client.virtual_machine_scale_set_vms.simulate_eviction( resource_group_name=resource_group.name, vm_scale_set_name="str", @@ -623,7 +623,7 @@ def test_simulate_eviction(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_attach_detach_data_disks(self, resource_group): + def test_virtual_machine_scale_set_vms_begin_attach_detach_data_disks(self, resource_group): response = self.client.virtual_machine_scale_set_vms.begin_attach_detach_data_disks( resource_group_name=resource_group.name, vm_scale_set_name="str", @@ -649,7 +649,7 @@ def test_begin_attach_detach_data_disks(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_run_command(self, resource_group): + def test_virtual_machine_scale_set_vms_begin_run_command(self, resource_group): response = self.client.virtual_machine_scale_set_vms.begin_run_command( resource_group_name=resource_group.name, vm_scale_set_name="str", diff --git a/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_virtual_machine_scale_set_vms_operations_async.py b/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_virtual_machine_scale_set_vms_operations_async.py index 8c47b8c4ffde7..6b3cb5117af31 100644 --- a/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_virtual_machine_scale_set_vms_operations_async.py +++ b/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_virtual_machine_scale_set_vms_operations_async.py @@ -21,7 +21,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_reimage(self, resource_group): + async def test_virtual_machine_scale_set_vms_begin_reimage(self, resource_group): response = await ( await self.client.virtual_machine_scale_set_vms.begin_reimage( resource_group_name=resource_group.name, @@ -36,7 +36,7 @@ async def test_begin_reimage(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_reimage_all(self, resource_group): + async def test_virtual_machine_scale_set_vms_begin_reimage_all(self, resource_group): response = await ( await self.client.virtual_machine_scale_set_vms.begin_reimage_all( resource_group_name=resource_group.name, @@ -51,7 +51,7 @@ async def test_begin_reimage_all(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_approve_rolling_upgrade(self, resource_group): + async def test_virtual_machine_scale_set_vms_begin_approve_rolling_upgrade(self, resource_group): response = await ( await self.client.virtual_machine_scale_set_vms.begin_approve_rolling_upgrade( resource_group_name=resource_group.name, @@ -66,7 +66,7 @@ async def test_begin_approve_rolling_upgrade(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_deallocate(self, resource_group): + async def test_virtual_machine_scale_set_vms_begin_deallocate(self, resource_group): response = await ( await self.client.virtual_machine_scale_set_vms.begin_deallocate( resource_group_name=resource_group.name, @@ -81,7 +81,7 @@ async def test_begin_deallocate(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_update(self, resource_group): + async def test_virtual_machine_scale_set_vms_begin_update(self, resource_group): response = await ( await self.client.virtual_machine_scale_set_vms.begin_update( resource_group_name=resource_group.name, @@ -495,7 +495,7 @@ async def test_begin_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete(self, resource_group): + async def test_virtual_machine_scale_set_vms_begin_delete(self, resource_group): response = await ( await self.client.virtual_machine_scale_set_vms.begin_delete( resource_group_name=resource_group.name, @@ -510,7 +510,7 @@ async def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_virtual_machine_scale_set_vms_get(self, resource_group): response = await self.client.virtual_machine_scale_set_vms.get( resource_group_name=resource_group.name, vm_scale_set_name="str", @@ -523,7 +523,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get_instance_view(self, resource_group): + async def test_virtual_machine_scale_set_vms_get_instance_view(self, resource_group): response = await self.client.virtual_machine_scale_set_vms.get_instance_view( resource_group_name=resource_group.name, vm_scale_set_name="str", @@ -536,7 +536,7 @@ async def test_get_instance_view(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_virtual_machine_scale_set_vms_list(self, resource_group): response = self.client.virtual_machine_scale_set_vms.list( resource_group_name=resource_group.name, virtual_machine_scale_set_name="str", @@ -548,7 +548,7 @@ async def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_power_off(self, resource_group): + async def test_virtual_machine_scale_set_vms_begin_power_off(self, resource_group): response = await ( await self.client.virtual_machine_scale_set_vms.begin_power_off( resource_group_name=resource_group.name, @@ -563,7 +563,7 @@ async def test_begin_power_off(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_restart(self, resource_group): + async def test_virtual_machine_scale_set_vms_begin_restart(self, resource_group): response = await ( await self.client.virtual_machine_scale_set_vms.begin_restart( resource_group_name=resource_group.name, @@ -578,7 +578,7 @@ async def test_begin_restart(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_start(self, resource_group): + async def test_virtual_machine_scale_set_vms_begin_start(self, resource_group): response = await ( await self.client.virtual_machine_scale_set_vms.begin_start( resource_group_name=resource_group.name, @@ -593,7 +593,7 @@ async def test_begin_start(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_redeploy(self, resource_group): + async def test_virtual_machine_scale_set_vms_begin_redeploy(self, resource_group): response = await ( await self.client.virtual_machine_scale_set_vms.begin_redeploy( resource_group_name=resource_group.name, @@ -608,7 +608,7 @@ async def test_begin_redeploy(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_retrieve_boot_diagnostics_data(self, resource_group): + async def test_virtual_machine_scale_set_vms_retrieve_boot_diagnostics_data(self, resource_group): response = await self.client.virtual_machine_scale_set_vms.retrieve_boot_diagnostics_data( resource_group_name=resource_group.name, vm_scale_set_name="str", @@ -621,7 +621,7 @@ async def test_retrieve_boot_diagnostics_data(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_perform_maintenance(self, resource_group): + async def test_virtual_machine_scale_set_vms_begin_perform_maintenance(self, resource_group): response = await ( await self.client.virtual_machine_scale_set_vms.begin_perform_maintenance( resource_group_name=resource_group.name, @@ -636,7 +636,7 @@ async def test_begin_perform_maintenance(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_simulate_eviction(self, resource_group): + async def test_virtual_machine_scale_set_vms_simulate_eviction(self, resource_group): response = await self.client.virtual_machine_scale_set_vms.simulate_eviction( resource_group_name=resource_group.name, vm_scale_set_name="str", @@ -649,7 +649,7 @@ async def test_simulate_eviction(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_attach_detach_data_disks(self, resource_group): + async def test_virtual_machine_scale_set_vms_begin_attach_detach_data_disks(self, resource_group): response = await ( await self.client.virtual_machine_scale_set_vms.begin_attach_detach_data_disks( resource_group_name=resource_group.name, @@ -677,7 +677,7 @@ async def test_begin_attach_detach_data_disks(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_run_command(self, resource_group): + async def test_virtual_machine_scale_set_vms_begin_run_command(self, resource_group): response = await ( await self.client.virtual_machine_scale_set_vms.begin_run_command( resource_group_name=resource_group.name, diff --git a/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_virtual_machine_scale_sets_operations.py b/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_virtual_machine_scale_sets_operations.py index b6fd7a507ff52..da37ef6ceae99 100644 --- a/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_virtual_machine_scale_sets_operations.py +++ b/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_virtual_machine_scale_sets_operations.py @@ -20,7 +20,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_location(self, resource_group): + def test_virtual_machine_scale_sets_list_by_location(self, resource_group): response = self.client.virtual_machine_scale_sets.list_by_location( location="str", api_version="2024-07-01", @@ -31,7 +31,7 @@ def test_list_by_location(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_create_or_update(self, resource_group): + def test_virtual_machine_scale_sets_begin_create_or_update(self, resource_group): response = self.client.virtual_machine_scale_sets.begin_create_or_update( resource_group_name=resource_group.name, vm_scale_set_name="str", @@ -312,7 +312,7 @@ def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_update(self, resource_group): + def test_virtual_machine_scale_sets_begin_update(self, resource_group): response = self.client.virtual_machine_scale_sets.begin_update( resource_group_name=resource_group.name, vm_scale_set_name="str", @@ -546,7 +546,7 @@ def test_begin_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete(self, resource_group): + def test_virtual_machine_scale_sets_begin_delete(self, resource_group): response = self.client.virtual_machine_scale_sets.begin_delete( resource_group_name=resource_group.name, vm_scale_set_name="str", @@ -558,7 +558,7 @@ def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_virtual_machine_scale_sets_get(self, resource_group): response = self.client.virtual_machine_scale_sets.get( resource_group_name=resource_group.name, vm_scale_set_name="str", @@ -570,7 +570,7 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_deallocate(self, resource_group): + def test_virtual_machine_scale_sets_begin_deallocate(self, resource_group): response = self.client.virtual_machine_scale_sets.begin_deallocate( resource_group_name=resource_group.name, vm_scale_set_name="str", @@ -582,7 +582,7 @@ def test_begin_deallocate(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete_instances(self, resource_group): + def test_virtual_machine_scale_sets_begin_delete_instances(self, resource_group): response = self.client.virtual_machine_scale_sets.begin_delete_instances( resource_group_name=resource_group.name, vm_scale_set_name="str", @@ -595,7 +595,7 @@ def test_begin_delete_instances(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get_instance_view(self, resource_group): + def test_virtual_machine_scale_sets_get_instance_view(self, resource_group): response = self.client.virtual_machine_scale_sets.get_instance_view( resource_group_name=resource_group.name, vm_scale_set_name="str", @@ -607,7 +607,7 @@ def test_get_instance_view(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_virtual_machine_scale_sets_list(self, resource_group): response = self.client.virtual_machine_scale_sets.list( resource_group_name=resource_group.name, api_version="2024-07-01", @@ -618,7 +618,7 @@ def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_all(self, resource_group): + def test_virtual_machine_scale_sets_list_all(self, resource_group): response = self.client.virtual_machine_scale_sets.list_all( api_version="2024-07-01", ) @@ -628,7 +628,7 @@ def test_list_all(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_skus(self, resource_group): + def test_virtual_machine_scale_sets_list_skus(self, resource_group): response = self.client.virtual_machine_scale_sets.list_skus( resource_group_name=resource_group.name, vm_scale_set_name="str", @@ -640,7 +640,7 @@ def test_list_skus(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get_os_upgrade_history(self, resource_group): + def test_virtual_machine_scale_sets_get_os_upgrade_history(self, resource_group): response = self.client.virtual_machine_scale_sets.get_os_upgrade_history( resource_group_name=resource_group.name, vm_scale_set_name="str", @@ -652,7 +652,7 @@ def test_get_os_upgrade_history(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_power_off(self, resource_group): + def test_virtual_machine_scale_sets_begin_power_off(self, resource_group): response = self.client.virtual_machine_scale_sets.begin_power_off( resource_group_name=resource_group.name, vm_scale_set_name="str", @@ -664,7 +664,7 @@ def test_begin_power_off(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_restart(self, resource_group): + def test_virtual_machine_scale_sets_begin_restart(self, resource_group): response = self.client.virtual_machine_scale_sets.begin_restart( resource_group_name=resource_group.name, vm_scale_set_name="str", @@ -676,7 +676,7 @@ def test_begin_restart(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_start(self, resource_group): + def test_virtual_machine_scale_sets_begin_start(self, resource_group): response = self.client.virtual_machine_scale_sets.begin_start( resource_group_name=resource_group.name, vm_scale_set_name="str", @@ -688,7 +688,7 @@ def test_begin_start(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_reapply(self, resource_group): + def test_virtual_machine_scale_sets_begin_reapply(self, resource_group): response = self.client.virtual_machine_scale_sets.begin_reapply( resource_group_name=resource_group.name, vm_scale_set_name="str", @@ -700,7 +700,7 @@ def test_begin_reapply(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_redeploy(self, resource_group): + def test_virtual_machine_scale_sets_begin_redeploy(self, resource_group): response = self.client.virtual_machine_scale_sets.begin_redeploy( resource_group_name=resource_group.name, vm_scale_set_name="str", @@ -712,7 +712,7 @@ def test_begin_redeploy(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_perform_maintenance(self, resource_group): + def test_virtual_machine_scale_sets_begin_perform_maintenance(self, resource_group): response = self.client.virtual_machine_scale_sets.begin_perform_maintenance( resource_group_name=resource_group.name, vm_scale_set_name="str", @@ -724,7 +724,7 @@ def test_begin_perform_maintenance(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_update_instances(self, resource_group): + def test_virtual_machine_scale_sets_begin_update_instances(self, resource_group): response = self.client.virtual_machine_scale_sets.begin_update_instances( resource_group_name=resource_group.name, vm_scale_set_name="str", @@ -737,7 +737,7 @@ def test_begin_update_instances(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_reimage(self, resource_group): + def test_virtual_machine_scale_sets_begin_reimage(self, resource_group): response = self.client.virtual_machine_scale_sets.begin_reimage( resource_group_name=resource_group.name, vm_scale_set_name="str", @@ -749,7 +749,7 @@ def test_begin_reimage(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_reimage_all(self, resource_group): + def test_virtual_machine_scale_sets_begin_reimage_all(self, resource_group): response = self.client.virtual_machine_scale_sets.begin_reimage_all( resource_group_name=resource_group.name, vm_scale_set_name="str", @@ -761,7 +761,7 @@ def test_begin_reimage_all(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_approve_rolling_upgrade(self, resource_group): + def test_virtual_machine_scale_sets_begin_approve_rolling_upgrade(self, resource_group): response = self.client.virtual_machine_scale_sets.begin_approve_rolling_upgrade( resource_group_name=resource_group.name, vm_scale_set_name="str", @@ -773,7 +773,7 @@ def test_begin_approve_rolling_upgrade(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_force_recovery_service_fabric_platform_update_domain_walk(self, resource_group): + def test_virtual_machine_scale_sets_force_recovery_service_fabric_platform_update_domain_walk(self, resource_group): response = self.client.virtual_machine_scale_sets.force_recovery_service_fabric_platform_update_domain_walk( resource_group_name=resource_group.name, vm_scale_set_name="str", @@ -786,7 +786,7 @@ def test_force_recovery_service_fabric_platform_update_domain_walk(self, resourc @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_convert_to_single_placement_group(self, resource_group): + def test_virtual_machine_scale_sets_convert_to_single_placement_group(self, resource_group): response = self.client.virtual_machine_scale_sets.convert_to_single_placement_group( resource_group_name=resource_group.name, vm_scale_set_name="str", @@ -799,7 +799,7 @@ def test_convert_to_single_placement_group(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_set_orchestration_service_state(self, resource_group): + def test_virtual_machine_scale_sets_begin_set_orchestration_service_state(self, resource_group): response = self.client.virtual_machine_scale_sets.begin_set_orchestration_service_state( resource_group_name=resource_group.name, vm_scale_set_name="str", diff --git a/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_virtual_machine_scale_sets_operations_async.py b/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_virtual_machine_scale_sets_operations_async.py index 5b0b46b3f9b1d..e53e2f600af67 100644 --- a/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_virtual_machine_scale_sets_operations_async.py +++ b/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_virtual_machine_scale_sets_operations_async.py @@ -21,7 +21,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_location(self, resource_group): + async def test_virtual_machine_scale_sets_list_by_location(self, resource_group): response = self.client.virtual_machine_scale_sets.list_by_location( location="str", api_version="2024-07-01", @@ -32,7 +32,7 @@ async def test_list_by_location(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_create_or_update(self, resource_group): + async def test_virtual_machine_scale_sets_begin_create_or_update(self, resource_group): response = await ( await self.client.virtual_machine_scale_sets.begin_create_or_update( resource_group_name=resource_group.name, @@ -318,7 +318,7 @@ async def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_update(self, resource_group): + async def test_virtual_machine_scale_sets_begin_update(self, resource_group): response = await ( await self.client.virtual_machine_scale_sets.begin_update( resource_group_name=resource_group.name, @@ -557,7 +557,7 @@ async def test_begin_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete(self, resource_group): + async def test_virtual_machine_scale_sets_begin_delete(self, resource_group): response = await ( await self.client.virtual_machine_scale_sets.begin_delete( resource_group_name=resource_group.name, @@ -571,7 +571,7 @@ async def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_virtual_machine_scale_sets_get(self, resource_group): response = await self.client.virtual_machine_scale_sets.get( resource_group_name=resource_group.name, vm_scale_set_name="str", @@ -583,7 +583,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_deallocate(self, resource_group): + async def test_virtual_machine_scale_sets_begin_deallocate(self, resource_group): response = await ( await self.client.virtual_machine_scale_sets.begin_deallocate( resource_group_name=resource_group.name, @@ -597,7 +597,7 @@ async def test_begin_deallocate(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete_instances(self, resource_group): + async def test_virtual_machine_scale_sets_begin_delete_instances(self, resource_group): response = await ( await self.client.virtual_machine_scale_sets.begin_delete_instances( resource_group_name=resource_group.name, @@ -612,7 +612,7 @@ async def test_begin_delete_instances(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get_instance_view(self, resource_group): + async def test_virtual_machine_scale_sets_get_instance_view(self, resource_group): response = await self.client.virtual_machine_scale_sets.get_instance_view( resource_group_name=resource_group.name, vm_scale_set_name="str", @@ -624,7 +624,7 @@ async def test_get_instance_view(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_virtual_machine_scale_sets_list(self, resource_group): response = self.client.virtual_machine_scale_sets.list( resource_group_name=resource_group.name, api_version="2024-07-01", @@ -635,7 +635,7 @@ async def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_all(self, resource_group): + async def test_virtual_machine_scale_sets_list_all(self, resource_group): response = self.client.virtual_machine_scale_sets.list_all( api_version="2024-07-01", ) @@ -645,7 +645,7 @@ async def test_list_all(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_skus(self, resource_group): + async def test_virtual_machine_scale_sets_list_skus(self, resource_group): response = self.client.virtual_machine_scale_sets.list_skus( resource_group_name=resource_group.name, vm_scale_set_name="str", @@ -657,7 +657,7 @@ async def test_list_skus(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get_os_upgrade_history(self, resource_group): + async def test_virtual_machine_scale_sets_get_os_upgrade_history(self, resource_group): response = self.client.virtual_machine_scale_sets.get_os_upgrade_history( resource_group_name=resource_group.name, vm_scale_set_name="str", @@ -669,7 +669,7 @@ async def test_get_os_upgrade_history(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_power_off(self, resource_group): + async def test_virtual_machine_scale_sets_begin_power_off(self, resource_group): response = await ( await self.client.virtual_machine_scale_sets.begin_power_off( resource_group_name=resource_group.name, @@ -683,7 +683,7 @@ async def test_begin_power_off(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_restart(self, resource_group): + async def test_virtual_machine_scale_sets_begin_restart(self, resource_group): response = await ( await self.client.virtual_machine_scale_sets.begin_restart( resource_group_name=resource_group.name, @@ -697,7 +697,7 @@ async def test_begin_restart(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_start(self, resource_group): + async def test_virtual_machine_scale_sets_begin_start(self, resource_group): response = await ( await self.client.virtual_machine_scale_sets.begin_start( resource_group_name=resource_group.name, @@ -711,7 +711,7 @@ async def test_begin_start(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_reapply(self, resource_group): + async def test_virtual_machine_scale_sets_begin_reapply(self, resource_group): response = await ( await self.client.virtual_machine_scale_sets.begin_reapply( resource_group_name=resource_group.name, @@ -725,7 +725,7 @@ async def test_begin_reapply(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_redeploy(self, resource_group): + async def test_virtual_machine_scale_sets_begin_redeploy(self, resource_group): response = await ( await self.client.virtual_machine_scale_sets.begin_redeploy( resource_group_name=resource_group.name, @@ -739,7 +739,7 @@ async def test_begin_redeploy(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_perform_maintenance(self, resource_group): + async def test_virtual_machine_scale_sets_begin_perform_maintenance(self, resource_group): response = await ( await self.client.virtual_machine_scale_sets.begin_perform_maintenance( resource_group_name=resource_group.name, @@ -753,7 +753,7 @@ async def test_begin_perform_maintenance(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_update_instances(self, resource_group): + async def test_virtual_machine_scale_sets_begin_update_instances(self, resource_group): response = await ( await self.client.virtual_machine_scale_sets.begin_update_instances( resource_group_name=resource_group.name, @@ -768,7 +768,7 @@ async def test_begin_update_instances(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_reimage(self, resource_group): + async def test_virtual_machine_scale_sets_begin_reimage(self, resource_group): response = await ( await self.client.virtual_machine_scale_sets.begin_reimage( resource_group_name=resource_group.name, @@ -782,7 +782,7 @@ async def test_begin_reimage(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_reimage_all(self, resource_group): + async def test_virtual_machine_scale_sets_begin_reimage_all(self, resource_group): response = await ( await self.client.virtual_machine_scale_sets.begin_reimage_all( resource_group_name=resource_group.name, @@ -796,7 +796,7 @@ async def test_begin_reimage_all(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_approve_rolling_upgrade(self, resource_group): + async def test_virtual_machine_scale_sets_begin_approve_rolling_upgrade(self, resource_group): response = await ( await self.client.virtual_machine_scale_sets.begin_approve_rolling_upgrade( resource_group_name=resource_group.name, @@ -810,7 +810,9 @@ async def test_begin_approve_rolling_upgrade(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_force_recovery_service_fabric_platform_update_domain_walk(self, resource_group): + async def test_virtual_machine_scale_sets_force_recovery_service_fabric_platform_update_domain_walk( + self, resource_group + ): response = ( await self.client.virtual_machine_scale_sets.force_recovery_service_fabric_platform_update_domain_walk( resource_group_name=resource_group.name, @@ -825,7 +827,7 @@ async def test_force_recovery_service_fabric_platform_update_domain_walk(self, r @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_convert_to_single_placement_group(self, resource_group): + async def test_virtual_machine_scale_sets_convert_to_single_placement_group(self, resource_group): response = await self.client.virtual_machine_scale_sets.convert_to_single_placement_group( resource_group_name=resource_group.name, vm_scale_set_name="str", @@ -838,7 +840,7 @@ async def test_convert_to_single_placement_group(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_set_orchestration_service_state(self, resource_group): + async def test_virtual_machine_scale_sets_begin_set_orchestration_service_state(self, resource_group): response = await ( await self.client.virtual_machine_scale_sets.begin_set_orchestration_service_state( resource_group_name=resource_group.name, diff --git a/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_virtual_machine_sizes_operations.py b/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_virtual_machine_sizes_operations.py index a960ea3f343a5..42a2133d751bd 100644 --- a/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_virtual_machine_sizes_operations.py +++ b/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_virtual_machine_sizes_operations.py @@ -20,7 +20,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_virtual_machine_sizes_list(self, resource_group): response = self.client.virtual_machine_sizes.list( location="str", api_version="2024-07-01", diff --git a/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_virtual_machine_sizes_operations_async.py b/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_virtual_machine_sizes_operations_async.py index f8aed2504c709..97d59b279eb2d 100644 --- a/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_virtual_machine_sizes_operations_async.py +++ b/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_virtual_machine_sizes_operations_async.py @@ -21,7 +21,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_virtual_machine_sizes_list(self, resource_group): response = self.client.virtual_machine_sizes.list( location="str", api_version="2024-07-01", diff --git a/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_virtual_machines_operations.py b/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_virtual_machines_operations.py index 551669c709445..1b441fba438ea 100644 --- a/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_virtual_machines_operations.py +++ b/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_virtual_machines_operations.py @@ -20,7 +20,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_location(self, resource_group): + def test_virtual_machines_list_by_location(self, resource_group): response = self.client.virtual_machines.list_by_location( location="str", api_version="2024-07-01", @@ -31,7 +31,7 @@ def test_list_by_location(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_capture(self, resource_group): + def test_virtual_machines_begin_capture(self, resource_group): response = self.client.virtual_machines.begin_capture( resource_group_name=resource_group.name, vm_name="str", @@ -44,7 +44,7 @@ def test_begin_capture(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_create_or_update(self, resource_group): + def test_virtual_machines_begin_create_or_update(self, resource_group): response = self.client.virtual_machines.begin_create_or_update( resource_group_name=resource_group.name, vm_name="str", @@ -487,7 +487,7 @@ def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_update(self, resource_group): + def test_virtual_machines_begin_update(self, resource_group): response = self.client.virtual_machines.begin_update( resource_group_name=resource_group.name, vm_name="str", @@ -880,7 +880,7 @@ def test_begin_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete(self, resource_group): + def test_virtual_machines_begin_delete(self, resource_group): response = self.client.virtual_machines.begin_delete( resource_group_name=resource_group.name, vm_name="str", @@ -892,7 +892,7 @@ def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_virtual_machines_get(self, resource_group): response = self.client.virtual_machines.get( resource_group_name=resource_group.name, vm_name="str", @@ -904,7 +904,7 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_instance_view(self, resource_group): + def test_virtual_machines_instance_view(self, resource_group): response = self.client.virtual_machines.instance_view( resource_group_name=resource_group.name, vm_name="str", @@ -916,7 +916,7 @@ def test_instance_view(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_convert_to_managed_disks(self, resource_group): + def test_virtual_machines_begin_convert_to_managed_disks(self, resource_group): response = self.client.virtual_machines.begin_convert_to_managed_disks( resource_group_name=resource_group.name, vm_name="str", @@ -928,7 +928,7 @@ def test_begin_convert_to_managed_disks(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_deallocate(self, resource_group): + def test_virtual_machines_begin_deallocate(self, resource_group): response = self.client.virtual_machines.begin_deallocate( resource_group_name=resource_group.name, vm_name="str", @@ -940,7 +940,7 @@ def test_begin_deallocate(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_generalize(self, resource_group): + def test_virtual_machines_generalize(self, resource_group): response = self.client.virtual_machines.generalize( resource_group_name=resource_group.name, vm_name="str", @@ -952,7 +952,7 @@ def test_generalize(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_virtual_machines_list(self, resource_group): response = self.client.virtual_machines.list( resource_group_name=resource_group.name, api_version="2024-07-01", @@ -963,7 +963,7 @@ def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_all(self, resource_group): + def test_virtual_machines_list_all(self, resource_group): response = self.client.virtual_machines.list_all( api_version="2024-07-01", ) @@ -973,7 +973,7 @@ def test_list_all(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_available_sizes(self, resource_group): + def test_virtual_machines_list_available_sizes(self, resource_group): response = self.client.virtual_machines.list_available_sizes( resource_group_name=resource_group.name, vm_name="str", @@ -985,7 +985,7 @@ def test_list_available_sizes(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_power_off(self, resource_group): + def test_virtual_machines_begin_power_off(self, resource_group): response = self.client.virtual_machines.begin_power_off( resource_group_name=resource_group.name, vm_name="str", @@ -997,7 +997,7 @@ def test_begin_power_off(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_reapply(self, resource_group): + def test_virtual_machines_begin_reapply(self, resource_group): response = self.client.virtual_machines.begin_reapply( resource_group_name=resource_group.name, vm_name="str", @@ -1009,7 +1009,7 @@ def test_begin_reapply(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_restart(self, resource_group): + def test_virtual_machines_begin_restart(self, resource_group): response = self.client.virtual_machines.begin_restart( resource_group_name=resource_group.name, vm_name="str", @@ -1021,7 +1021,7 @@ def test_begin_restart(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_start(self, resource_group): + def test_virtual_machines_begin_start(self, resource_group): response = self.client.virtual_machines.begin_start( resource_group_name=resource_group.name, vm_name="str", @@ -1033,7 +1033,7 @@ def test_begin_start(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_redeploy(self, resource_group): + def test_virtual_machines_begin_redeploy(self, resource_group): response = self.client.virtual_machines.begin_redeploy( resource_group_name=resource_group.name, vm_name="str", @@ -1045,7 +1045,7 @@ def test_begin_redeploy(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_reimage(self, resource_group): + def test_virtual_machines_begin_reimage(self, resource_group): response = self.client.virtual_machines.begin_reimage( resource_group_name=resource_group.name, vm_name="str", @@ -1057,7 +1057,7 @@ def test_begin_reimage(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_retrieve_boot_diagnostics_data(self, resource_group): + def test_virtual_machines_retrieve_boot_diagnostics_data(self, resource_group): response = self.client.virtual_machines.retrieve_boot_diagnostics_data( resource_group_name=resource_group.name, vm_name="str", @@ -1069,7 +1069,7 @@ def test_retrieve_boot_diagnostics_data(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_perform_maintenance(self, resource_group): + def test_virtual_machines_begin_perform_maintenance(self, resource_group): response = self.client.virtual_machines.begin_perform_maintenance( resource_group_name=resource_group.name, vm_name="str", @@ -1081,7 +1081,7 @@ def test_begin_perform_maintenance(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_simulate_eviction(self, resource_group): + def test_virtual_machines_simulate_eviction(self, resource_group): response = self.client.virtual_machines.simulate_eviction( resource_group_name=resource_group.name, vm_name="str", @@ -1093,7 +1093,7 @@ def test_simulate_eviction(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_assess_patches(self, resource_group): + def test_virtual_machines_begin_assess_patches(self, resource_group): response = self.client.virtual_machines.begin_assess_patches( resource_group_name=resource_group.name, vm_name="str", @@ -1105,7 +1105,7 @@ def test_begin_assess_patches(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_install_patches(self, resource_group): + def test_virtual_machines_begin_install_patches(self, resource_group): response = self.client.virtual_machines.begin_install_patches( resource_group_name=resource_group.name, vm_name="str", @@ -1134,7 +1134,7 @@ def test_begin_install_patches(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_attach_detach_data_disks(self, resource_group): + def test_virtual_machines_begin_attach_detach_data_disks(self, resource_group): response = self.client.virtual_machines.begin_attach_detach_data_disks( resource_group_name=resource_group.name, vm_name="str", @@ -1159,7 +1159,7 @@ def test_begin_attach_detach_data_disks(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_run_command(self, resource_group): + def test_virtual_machines_begin_run_command(self, resource_group): response = self.client.virtual_machines.begin_run_command( resource_group_name=resource_group.name, vm_name="str", diff --git a/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_virtual_machines_operations_async.py b/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_virtual_machines_operations_async.py index 86bea8e9b161f..13d189b0b1bbb 100644 --- a/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_virtual_machines_operations_async.py +++ b/sdk/compute/azure-mgmt-compute/generated_tests/test_compute_management_virtual_machines_operations_async.py @@ -21,7 +21,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_location(self, resource_group): + async def test_virtual_machines_list_by_location(self, resource_group): response = self.client.virtual_machines.list_by_location( location="str", api_version="2024-07-01", @@ -32,7 +32,7 @@ async def test_list_by_location(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_capture(self, resource_group): + async def test_virtual_machines_begin_capture(self, resource_group): response = await ( await self.client.virtual_machines.begin_capture( resource_group_name=resource_group.name, @@ -47,7 +47,7 @@ async def test_begin_capture(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_create_or_update(self, resource_group): + async def test_virtual_machines_begin_create_or_update(self, resource_group): response = await ( await self.client.virtual_machines.begin_create_or_update( resource_group_name=resource_group.name, @@ -495,7 +495,7 @@ async def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_update(self, resource_group): + async def test_virtual_machines_begin_update(self, resource_group): response = await ( await self.client.virtual_machines.begin_update( resource_group_name=resource_group.name, @@ -893,7 +893,7 @@ async def test_begin_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete(self, resource_group): + async def test_virtual_machines_begin_delete(self, resource_group): response = await ( await self.client.virtual_machines.begin_delete( resource_group_name=resource_group.name, @@ -907,7 +907,7 @@ async def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_virtual_machines_get(self, resource_group): response = await self.client.virtual_machines.get( resource_group_name=resource_group.name, vm_name="str", @@ -919,7 +919,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_instance_view(self, resource_group): + async def test_virtual_machines_instance_view(self, resource_group): response = await self.client.virtual_machines.instance_view( resource_group_name=resource_group.name, vm_name="str", @@ -931,7 +931,7 @@ async def test_instance_view(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_convert_to_managed_disks(self, resource_group): + async def test_virtual_machines_begin_convert_to_managed_disks(self, resource_group): response = await ( await self.client.virtual_machines.begin_convert_to_managed_disks( resource_group_name=resource_group.name, @@ -945,7 +945,7 @@ async def test_begin_convert_to_managed_disks(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_deallocate(self, resource_group): + async def test_virtual_machines_begin_deallocate(self, resource_group): response = await ( await self.client.virtual_machines.begin_deallocate( resource_group_name=resource_group.name, @@ -959,7 +959,7 @@ async def test_begin_deallocate(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_generalize(self, resource_group): + async def test_virtual_machines_generalize(self, resource_group): response = await self.client.virtual_machines.generalize( resource_group_name=resource_group.name, vm_name="str", @@ -971,7 +971,7 @@ async def test_generalize(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_virtual_machines_list(self, resource_group): response = self.client.virtual_machines.list( resource_group_name=resource_group.name, api_version="2024-07-01", @@ -982,7 +982,7 @@ async def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_all(self, resource_group): + async def test_virtual_machines_list_all(self, resource_group): response = self.client.virtual_machines.list_all( api_version="2024-07-01", ) @@ -992,7 +992,7 @@ async def test_list_all(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_available_sizes(self, resource_group): + async def test_virtual_machines_list_available_sizes(self, resource_group): response = self.client.virtual_machines.list_available_sizes( resource_group_name=resource_group.name, vm_name="str", @@ -1004,7 +1004,7 @@ async def test_list_available_sizes(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_power_off(self, resource_group): + async def test_virtual_machines_begin_power_off(self, resource_group): response = await ( await self.client.virtual_machines.begin_power_off( resource_group_name=resource_group.name, @@ -1018,7 +1018,7 @@ async def test_begin_power_off(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_reapply(self, resource_group): + async def test_virtual_machines_begin_reapply(self, resource_group): response = await ( await self.client.virtual_machines.begin_reapply( resource_group_name=resource_group.name, @@ -1032,7 +1032,7 @@ async def test_begin_reapply(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_restart(self, resource_group): + async def test_virtual_machines_begin_restart(self, resource_group): response = await ( await self.client.virtual_machines.begin_restart( resource_group_name=resource_group.name, @@ -1046,7 +1046,7 @@ async def test_begin_restart(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_start(self, resource_group): + async def test_virtual_machines_begin_start(self, resource_group): response = await ( await self.client.virtual_machines.begin_start( resource_group_name=resource_group.name, @@ -1060,7 +1060,7 @@ async def test_begin_start(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_redeploy(self, resource_group): + async def test_virtual_machines_begin_redeploy(self, resource_group): response = await ( await self.client.virtual_machines.begin_redeploy( resource_group_name=resource_group.name, @@ -1074,7 +1074,7 @@ async def test_begin_redeploy(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_reimage(self, resource_group): + async def test_virtual_machines_begin_reimage(self, resource_group): response = await ( await self.client.virtual_machines.begin_reimage( resource_group_name=resource_group.name, @@ -1088,7 +1088,7 @@ async def test_begin_reimage(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_retrieve_boot_diagnostics_data(self, resource_group): + async def test_virtual_machines_retrieve_boot_diagnostics_data(self, resource_group): response = await self.client.virtual_machines.retrieve_boot_diagnostics_data( resource_group_name=resource_group.name, vm_name="str", @@ -1100,7 +1100,7 @@ async def test_retrieve_boot_diagnostics_data(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_perform_maintenance(self, resource_group): + async def test_virtual_machines_begin_perform_maintenance(self, resource_group): response = await ( await self.client.virtual_machines.begin_perform_maintenance( resource_group_name=resource_group.name, @@ -1114,7 +1114,7 @@ async def test_begin_perform_maintenance(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_simulate_eviction(self, resource_group): + async def test_virtual_machines_simulate_eviction(self, resource_group): response = await self.client.virtual_machines.simulate_eviction( resource_group_name=resource_group.name, vm_name="str", @@ -1126,7 +1126,7 @@ async def test_simulate_eviction(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_assess_patches(self, resource_group): + async def test_virtual_machines_begin_assess_patches(self, resource_group): response = await ( await self.client.virtual_machines.begin_assess_patches( resource_group_name=resource_group.name, @@ -1140,7 +1140,7 @@ async def test_begin_assess_patches(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_install_patches(self, resource_group): + async def test_virtual_machines_begin_install_patches(self, resource_group): response = await ( await self.client.virtual_machines.begin_install_patches( resource_group_name=resource_group.name, @@ -1171,7 +1171,7 @@ async def test_begin_install_patches(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_attach_detach_data_disks(self, resource_group): + async def test_virtual_machines_begin_attach_detach_data_disks(self, resource_group): response = await ( await self.client.virtual_machines.begin_attach_detach_data_disks( resource_group_name=resource_group.name, @@ -1198,7 +1198,7 @@ async def test_begin_attach_detach_data_disks(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_run_command(self, resource_group): + async def test_virtual_machines_begin_run_command(self, resource_group): response = await ( await self.client.virtual_machines.begin_run_command( resource_group_name=resource_group.name,