diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/_meta.json b/sdk/hdinsight/azure-mgmt-hdinsight/_meta.json index 37ce200ec446..c0e096e87237 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/_meta.json +++ b/sdk/hdinsight/azure-mgmt-hdinsight/_meta.json @@ -1,11 +1,11 @@ { - "commit": "3ce1e043e2d0e57016437a3870f40e33da8a6397", + "commit": "5c14d03c8c608bb5703a11f5674afd9562a8551b", "repository_url": "https://github.com/Azure/azure-rest-api-specs", "autorest": "3.9.2", "use": [ - "@autorest/python@6.2.7", + "@autorest/python@6.4.8", "@autorest/modelerfour@4.24.3" ], - "autorest_command": "autorest specification/hdinsight/resource-manager/readme.md --generate-sample=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.2.7 --use=@autorest/modelerfour@4.24.3 --version=3.9.2 --version-tolerant=False", + "autorest_command": "autorest specification/hdinsight/resource-manager/readme.md --generate-sample=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.4.8 --use=@autorest/modelerfour@4.24.3 --version=3.9.2 --version-tolerant=False", "readme": "specification/hdinsight/resource-manager/readme.md" } \ No newline at end of file diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/_configuration.py b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/_configuration.py index fb8ddebc34b6..abe1a0640006 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/_configuration.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/_configuration.py @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from ._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential @@ -36,14 +30,14 @@ class HDInsightManagementClientConfiguration(Configuration): # pylint: disable= :param subscription_id: The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. Required. :type subscription_id: str - :keyword api_version: Api Version. Default value is "2021-06-01". Note that overriding this - default value may result in unsupported behavior. + :keyword api_version: Api Version. Default value is "2023-04-15-preview". Note that overriding + this default value may result in unsupported behavior. :paramtype api_version: str """ def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: super(HDInsightManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", "2021-06-01") + api_version: str = kwargs.pop("api_version", "2023-04-15-preview") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/_hd_insight_management_client.py b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/_hd_insight_management_client.py index 6e412a4df23d..760b58de23f2 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/_hd_insight_management_client.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/_hd_insight_management_client.py @@ -37,30 +37,30 @@ class HDInsightManagementClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes """HDInsight Management Client. - :ivar clusters: ClustersOperations operations - :vartype clusters: azure.mgmt.hdinsight.operations.ClustersOperations :ivar applications: ApplicationsOperations operations :vartype applications: azure.mgmt.hdinsight.operations.ApplicationsOperations - :ivar locations: LocationsOperations operations - :vartype locations: azure.mgmt.hdinsight.operations.LocationsOperations + :ivar clusters: ClustersOperations operations + :vartype clusters: azure.mgmt.hdinsight.operations.ClustersOperations :ivar configurations: ConfigurationsOperations operations :vartype configurations: azure.mgmt.hdinsight.operations.ConfigurationsOperations :ivar extensions: ExtensionsOperations operations :vartype extensions: azure.mgmt.hdinsight.operations.ExtensionsOperations - :ivar script_actions: ScriptActionsOperations operations - :vartype script_actions: azure.mgmt.hdinsight.operations.ScriptActionsOperations - :ivar script_execution_history: ScriptExecutionHistoryOperations operations - :vartype script_execution_history: - azure.mgmt.hdinsight.operations.ScriptExecutionHistoryOperations + :ivar locations: LocationsOperations operations + :vartype locations: azure.mgmt.hdinsight.operations.LocationsOperations :ivar operations: Operations operations :vartype operations: azure.mgmt.hdinsight.operations.Operations - :ivar virtual_machines: VirtualMachinesOperations operations - :vartype virtual_machines: azure.mgmt.hdinsight.operations.VirtualMachinesOperations :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations :vartype private_endpoint_connections: azure.mgmt.hdinsight.operations.PrivateEndpointConnectionsOperations :ivar private_link_resources: PrivateLinkResourcesOperations operations :vartype private_link_resources: azure.mgmt.hdinsight.operations.PrivateLinkResourcesOperations + :ivar script_actions: ScriptActionsOperations operations + :vartype script_actions: azure.mgmt.hdinsight.operations.ScriptActionsOperations + :ivar script_execution_history: ScriptExecutionHistoryOperations operations + :vartype script_execution_history: + azure.mgmt.hdinsight.operations.ScriptExecutionHistoryOperations + :ivar virtual_machines: VirtualMachinesOperations operations + :vartype virtual_machines: azure.mgmt.hdinsight.operations.VirtualMachinesOperations :param credential: Credential needed for the client to connect to Azure. Required. :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: The subscription credentials which uniquely identify Microsoft Azure @@ -68,8 +68,8 @@ class HDInsightManagementClient: # pylint: disable=client-accepts-api-version-k :type subscription_id: str :param base_url: Service URL. Default value is "https://management.azure.com". :type base_url: str - :keyword api_version: Api Version. Default value is "2021-06-01". Note that overriding this - default value may result in unsupported behavior. + :keyword api_version: Api Version. Default value is "2023-04-15-preview". Note that overriding + this default value may result in unsupported behavior. :paramtype api_version: str :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. @@ -85,29 +85,29 @@ def __init__( self._config = HDInsightManagementClientConfiguration( credential=credential, subscription_id=subscription_id, **kwargs ) - self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + self._client: ARMPipelineClient = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)} self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) self._serialize.client_side_validation = False - self.clusters = ClustersOperations(self._client, self._config, self._serialize, self._deserialize) self.applications = ApplicationsOperations(self._client, self._config, self._serialize, self._deserialize) - self.locations = LocationsOperations(self._client, self._config, self._serialize, self._deserialize) + self.clusters = ClustersOperations(self._client, self._config, self._serialize, self._deserialize) self.configurations = ConfigurationsOperations(self._client, self._config, self._serialize, self._deserialize) self.extensions = ExtensionsOperations(self._client, self._config, self._serialize, self._deserialize) - self.script_actions = ScriptActionsOperations(self._client, self._config, self._serialize, self._deserialize) - self.script_execution_history = ScriptExecutionHistoryOperations( + self.locations = LocationsOperations(self._client, self._config, self._serialize, self._deserialize) + self.operations = Operations(self._client, self._config, self._serialize, self._deserialize) + self.private_endpoint_connections = PrivateEndpointConnectionsOperations( self._client, self._config, self._serialize, self._deserialize ) - self.operations = Operations(self._client, self._config, self._serialize, self._deserialize) - self.virtual_machines = VirtualMachinesOperations( + self.private_link_resources = PrivateLinkResourcesOperations( self._client, self._config, self._serialize, self._deserialize ) - self.private_endpoint_connections = PrivateEndpointConnectionsOperations( + self.script_actions = ScriptActionsOperations(self._client, self._config, self._serialize, self._deserialize) + self.script_execution_history = ScriptExecutionHistoryOperations( self._client, self._config, self._serialize, self._deserialize ) - self.private_link_resources = PrivateLinkResourcesOperations( + self.virtual_machines = VirtualMachinesOperations( self._client, self._config, self._serialize, self._deserialize ) @@ -140,5 +140,5 @@ def __enter__(self) -> "HDInsightManagementClient": self._client.__enter__() return self - def __exit__(self, *exc_details) -> None: + def __exit__(self, *exc_details: Any) -> None: self._client.__exit__(*exc_details) diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/_serialization.py b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/_serialization.py index 2c170e28dbca..842ae727fbbc 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/_serialization.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/_serialization.py @@ -38,7 +38,22 @@ import re import sys import codecs -from typing import Optional, Union, AnyStr, IO, Mapping +from typing import ( + Dict, + Any, + cast, + Optional, + Union, + AnyStr, + IO, + Mapping, + Callable, + TypeVar, + MutableMapping, + Type, + List, + Mapping, +) try: from urllib import quote # type: ignore @@ -48,12 +63,14 @@ import isodate # type: ignore -from typing import Dict, Any, cast - from azure.core.exceptions import DeserializationError, SerializationError, raise_with_traceback +from azure.core.serialization import NULL as AzureCoreNull _BOM = codecs.BOM_UTF8.decode(encoding="utf-8") +ModelType = TypeVar("ModelType", bound="Model") +JSON = MutableMapping[str, Any] + class RawDeserializer: @@ -277,8 +294,8 @@ class Model(object): _attribute_map: Dict[str, Dict[str, Any]] = {} _validation: Dict[str, Dict[str, Any]] = {} - def __init__(self, **kwargs): - self.additional_properties = {} + def __init__(self, **kwargs: Any) -> None: + self.additional_properties: Dict[str, Any] = {} for k in kwargs: 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__) @@ -287,25 +304,25 @@ def __init__(self, **kwargs): else: setattr(self, k, kwargs[k]) - def __eq__(self, other): + def __eq__(self, other: Any) -> bool: """Compare objects by comparing all attributes.""" if isinstance(other, self.__class__): return self.__dict__ == other.__dict__ return False - def __ne__(self, other): + def __ne__(self, other: Any) -> bool: """Compare objects by comparing all attributes.""" return not self.__eq__(other) - def __str__(self): + def __str__(self) -> str: return str(self.__dict__) @classmethod - def enable_additional_properties_sending(cls): + def enable_additional_properties_sending(cls) -> None: cls._attribute_map["additional_properties"] = {"key": "", "type": "{object}"} @classmethod - def is_xml_model(cls): + def is_xml_model(cls) -> bool: try: cls._xml_map # type: ignore except AttributeError: @@ -322,7 +339,7 @@ def _create_xml_node(cls): return _create_xml_node(xml_map.get("name", cls.__name__), xml_map.get("prefix", None), xml_map.get("ns", None)) - def serialize(self, keep_readonly=False, **kwargs): + def serialize(self, keep_readonly: bool = False, **kwargs: Any) -> JSON: """Return the JSON that would be sent to azure from this model. This is an alias to `as_dict(full_restapi_key_transformer, keep_readonly=False)`. @@ -336,8 +353,13 @@ def serialize(self, keep_readonly=False, **kwargs): serializer = Serializer(self._infer_class_models()) return serializer._serialize(self, keep_readonly=keep_readonly, **kwargs) - def as_dict(self, keep_readonly=True, key_transformer=attribute_transformer, **kwargs): - """Return a dict that can be JSONify using json.dump. + def as_dict( + self, + keep_readonly: bool = True, + key_transformer: Callable[[str, Dict[str, Any], Any], Any] = attribute_transformer, + **kwargs: Any + ) -> JSON: + """Return a dict that can be serialized using json.dump. Advanced usage might optionally use a callback as parameter: @@ -384,7 +406,7 @@ def _infer_class_models(cls): return client_models @classmethod - def deserialize(cls, data, content_type=None): + def deserialize(cls: Type[ModelType], data: Any, content_type: Optional[str] = None) -> ModelType: """Parse a str using the RestAPI syntax and return a model. :param str data: A str using RestAPI structure. JSON by default. @@ -396,7 +418,12 @@ def deserialize(cls, data, content_type=None): return deserializer(cls.__name__, data, content_type=content_type) @classmethod - def from_dict(cls, data, key_extractors=None, content_type=None): + def from_dict( + cls: Type[ModelType], + data: Any, + key_extractors: Optional[Callable[[str, Dict[str, Any], Any], Any]] = None, + content_type: Optional[str] = None, + ) -> ModelType: """Parse a dict using given key extractor return a model. By default consider key @@ -409,8 +436,8 @@ def from_dict(cls, data, key_extractors=None, content_type=None): :raises: DeserializationError if something went wrong """ deserializer = Deserializer(cls._infer_class_models()) - deserializer.key_extractors = ( - [ + deserializer.key_extractors = ( # type: ignore + [ # type: ignore attribute_key_case_insensitive_extractor, rest_key_case_insensitive_extractor, last_rest_key_case_insensitive_extractor, @@ -518,7 +545,7 @@ class Serializer(object): "multiple": lambda x, y: x % y != 0, } - def __init__(self, classes=None): + def __init__(self, classes: Optional[Mapping[str, Type[ModelType]]] = None): self.serialize_type = { "iso-8601": Serializer.serialize_iso, "rfc-1123": Serializer.serialize_rfc, @@ -534,7 +561,7 @@ def __init__(self, classes=None): "[]": self.serialize_iter, "{}": self.serialize_dict, } - self.dependencies = dict(classes) if classes else {} + self.dependencies: Dict[str, Type[ModelType]] = dict(classes) if classes else {} self.key_transformer = full_restapi_key_transformer self.client_side_validation = True @@ -602,7 +629,7 @@ def _serialize(self, target_obj, data_type=None, **kwargs): if xml_desc.get("attr", False): if xml_ns: ET.register_namespace(xml_prefix, xml_ns) - xml_name = "{}{}".format(xml_ns, xml_name) + xml_name = "{{{}}}{}".format(xml_ns, xml_name) serialized.set(xml_name, new_attr) # type: ignore continue if xml_desc.get("text", False): @@ -626,8 +653,7 @@ def _serialize(self, target_obj, data_type=None, **kwargs): serialized.append(local_node) # type: ignore else: # JSON for k in reversed(keys): # type: ignore - unflattened = {k: new_attr} - new_attr = unflattened + new_attr = {k: new_attr} _new_attr = new_attr _serialized = serialized @@ -656,8 +682,8 @@ def body(self, data, data_type, **kwargs): """ # Just in case this is a dict - internal_data_type = data_type.strip("[]{}") - internal_data_type = self.dependencies.get(internal_data_type, None) + internal_data_type_str = data_type.strip("[]{}") + internal_data_type = self.dependencies.get(internal_data_type_str, None) try: is_xml_model_serialization = kwargs["is_xml"] except KeyError: @@ -777,6 +803,8 @@ def serialize_data(self, data, data_type, **kwargs): raise ValueError("No value for given attribute") try: + if data is AzureCoreNull: + return None if data_type in self.basic_types.values(): return self.serialize_basic(data, data_type, **kwargs) @@ -1161,7 +1189,8 @@ def rest_key_extractor(attr, attr_desc, data): working_data = data while "." in key: - dict_keys = _FLATTEN.split(key) + # Need the cast, as for some reasons "split" is typed as list[str | Any] + dict_keys = cast(List[str], _FLATTEN.split(key)) if len(dict_keys) == 1: key = _decode_attribute_map_key(dict_keys[0]) break @@ -1242,7 +1271,7 @@ def _extract_name_from_internal_type(internal_type): xml_name = internal_type_xml_map.get("name", internal_type.__name__) xml_ns = internal_type_xml_map.get("ns", None) if xml_ns: - xml_name = "{}{}".format(xml_ns, xml_name) + xml_name = "{{{}}}{}".format(xml_ns, xml_name) return xml_name @@ -1266,7 +1295,7 @@ def xml_key_extractor(attr, attr_desc, data): # Integrate namespace if necessary xml_ns = xml_desc.get("ns", internal_type_xml_map.get("ns", None)) if xml_ns: - xml_name = "{}{}".format(xml_ns, xml_name) + xml_name = "{{{}}}{}".format(xml_ns, xml_name) # If it's an attribute, that's simple if xml_desc.get("attr", False): @@ -1332,7 +1361,7 @@ class Deserializer(object): 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}]?") - def __init__(self, classes=None): + def __init__(self, classes: Optional[Mapping[str, Type[ModelType]]] = None): self.deserialize_type = { "iso-8601": Deserializer.deserialize_iso, "rfc-1123": Deserializer.deserialize_rfc, @@ -1352,7 +1381,7 @@ def __init__(self, classes=None): "duration": (isodate.Duration, datetime.timedelta), "iso-8601": (datetime.datetime), } - self.dependencies = dict(classes) if classes else {} + self.dependencies: Dict[str, Type[ModelType]] = dict(classes) if classes else {} self.key_extractors = [rest_key_extractor, xml_key_extractor] # Additional properties only works if the "rest_key_extractor" is used to # extract the keys. Making it to work whatever the key extractor is too much @@ -1471,7 +1500,7 @@ def _classify_target(self, target, data): Once classification has been determined, initialize object. :param str target: The target object type to deserialize to. - :param str/dict data: The response data to deseralize. + :param str/dict data: The response data to deserialize. """ if target is None: return None, None @@ -1486,7 +1515,7 @@ def _classify_target(self, target, data): target = target._classify(data, self.dependencies) except AttributeError: pass # Target is not a Model, no classify - return target, target.__class__.__name__ + return target, target.__class__.__name__ # type: ignore def failsafe_deserialize(self, target_obj, data, content_type=None): """Ignores any errors encountered in deserialization, @@ -1496,7 +1525,7 @@ def failsafe_deserialize(self, target_obj, data, content_type=None): a deserialization error. :param str target_obj: The target object type to deserialize to. - :param str/dict data: The response data to deseralize. + :param str/dict data: The response data to deserialize. :param str content_type: Swagger "produces" if available. """ try: diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/_vendor.py b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/_vendor.py index 9aad73fc743e..bd0df84f5319 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/_vendor.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/_vendor.py @@ -5,6 +5,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from typing import List, cast + from azure.core.pipeline.transport import HttpRequest @@ -22,6 +24,7 @@ def _format_url_section(template, **kwargs): try: return template.format(**kwargs) except KeyError as key: - formatted_components = template.split("/") + # Need the cast, as for some reasons "split" is typed as list[str | Any] + formatted_components = cast(List[str], template.split("/")) components = [c for c in formatted_components if "{}".format(key.args[0]) not in c] template = "/".join(components) diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/_version.py b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/_version.py index 6dddc002d43d..e5754a47ce68 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/_version.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "9.0.0b1" +VERSION = "1.0.0b1" diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/_configuration.py b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/_configuration.py index 8208f072f0b7..c4be1c6560c1 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/_configuration.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/_configuration.py @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from .._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential @@ -36,14 +30,14 @@ class HDInsightManagementClientConfiguration(Configuration): # pylint: disable= :param subscription_id: The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. Required. :type subscription_id: str - :keyword api_version: Api Version. Default value is "2021-06-01". Note that overriding this - default value may result in unsupported behavior. + :keyword api_version: Api Version. Default value is "2023-04-15-preview". Note that overriding + this default value may result in unsupported behavior. :paramtype api_version: str """ def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: super(HDInsightManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", "2021-06-01") + api_version: str = kwargs.pop("api_version", "2023-04-15-preview") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/_hd_insight_management_client.py b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/_hd_insight_management_client.py index 8af64a15b98f..f50238aed6b1 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/_hd_insight_management_client.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/_hd_insight_management_client.py @@ -37,31 +37,31 @@ class HDInsightManagementClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes """HDInsight Management Client. - :ivar clusters: ClustersOperations operations - :vartype clusters: azure.mgmt.hdinsight.aio.operations.ClustersOperations :ivar applications: ApplicationsOperations operations :vartype applications: azure.mgmt.hdinsight.aio.operations.ApplicationsOperations - :ivar locations: LocationsOperations operations - :vartype locations: azure.mgmt.hdinsight.aio.operations.LocationsOperations + :ivar clusters: ClustersOperations operations + :vartype clusters: azure.mgmt.hdinsight.aio.operations.ClustersOperations :ivar configurations: ConfigurationsOperations operations :vartype configurations: azure.mgmt.hdinsight.aio.operations.ConfigurationsOperations :ivar extensions: ExtensionsOperations operations :vartype extensions: azure.mgmt.hdinsight.aio.operations.ExtensionsOperations - :ivar script_actions: ScriptActionsOperations operations - :vartype script_actions: azure.mgmt.hdinsight.aio.operations.ScriptActionsOperations - :ivar script_execution_history: ScriptExecutionHistoryOperations operations - :vartype script_execution_history: - azure.mgmt.hdinsight.aio.operations.ScriptExecutionHistoryOperations + :ivar locations: LocationsOperations operations + :vartype locations: azure.mgmt.hdinsight.aio.operations.LocationsOperations :ivar operations: Operations operations :vartype operations: azure.mgmt.hdinsight.aio.operations.Operations - :ivar virtual_machines: VirtualMachinesOperations operations - :vartype virtual_machines: azure.mgmt.hdinsight.aio.operations.VirtualMachinesOperations :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations :vartype private_endpoint_connections: azure.mgmt.hdinsight.aio.operations.PrivateEndpointConnectionsOperations :ivar private_link_resources: PrivateLinkResourcesOperations operations :vartype private_link_resources: azure.mgmt.hdinsight.aio.operations.PrivateLinkResourcesOperations + :ivar script_actions: ScriptActionsOperations operations + :vartype script_actions: azure.mgmt.hdinsight.aio.operations.ScriptActionsOperations + :ivar script_execution_history: ScriptExecutionHistoryOperations operations + :vartype script_execution_history: + azure.mgmt.hdinsight.aio.operations.ScriptExecutionHistoryOperations + :ivar virtual_machines: VirtualMachinesOperations operations + :vartype virtual_machines: azure.mgmt.hdinsight.aio.operations.VirtualMachinesOperations :param credential: Credential needed for the client to connect to Azure. Required. :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: The subscription credentials which uniquely identify Microsoft Azure @@ -69,8 +69,8 @@ class HDInsightManagementClient: # pylint: disable=client-accepts-api-version-k :type subscription_id: str :param base_url: Service URL. Default value is "https://management.azure.com". :type base_url: str - :keyword api_version: Api Version. Default value is "2021-06-01". Note that overriding this - default value may result in unsupported behavior. + :keyword api_version: Api Version. Default value is "2023-04-15-preview". Note that overriding + this default value may result in unsupported behavior. :paramtype api_version: str :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. @@ -86,29 +86,29 @@ def __init__( self._config = HDInsightManagementClientConfiguration( credential=credential, subscription_id=subscription_id, **kwargs ) - self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + self._client: AsyncARMPipelineClient = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)} self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) self._serialize.client_side_validation = False - self.clusters = ClustersOperations(self._client, self._config, self._serialize, self._deserialize) self.applications = ApplicationsOperations(self._client, self._config, self._serialize, self._deserialize) - self.locations = LocationsOperations(self._client, self._config, self._serialize, self._deserialize) + self.clusters = ClustersOperations(self._client, self._config, self._serialize, self._deserialize) self.configurations = ConfigurationsOperations(self._client, self._config, self._serialize, self._deserialize) self.extensions = ExtensionsOperations(self._client, self._config, self._serialize, self._deserialize) - self.script_actions = ScriptActionsOperations(self._client, self._config, self._serialize, self._deserialize) - self.script_execution_history = ScriptExecutionHistoryOperations( + self.locations = LocationsOperations(self._client, self._config, self._serialize, self._deserialize) + self.operations = Operations(self._client, self._config, self._serialize, self._deserialize) + self.private_endpoint_connections = PrivateEndpointConnectionsOperations( self._client, self._config, self._serialize, self._deserialize ) - self.operations = Operations(self._client, self._config, self._serialize, self._deserialize) - self.virtual_machines = VirtualMachinesOperations( + self.private_link_resources = PrivateLinkResourcesOperations( self._client, self._config, self._serialize, self._deserialize ) - self.private_endpoint_connections = PrivateEndpointConnectionsOperations( + self.script_actions = ScriptActionsOperations(self._client, self._config, self._serialize, self._deserialize) + self.script_execution_history = ScriptExecutionHistoryOperations( self._client, self._config, self._serialize, self._deserialize ) - self.private_link_resources = PrivateLinkResourcesOperations( + self.virtual_machines = VirtualMachinesOperations( self._client, self._config, self._serialize, self._deserialize ) @@ -141,5 +141,5 @@ async def __aenter__(self) -> "HDInsightManagementClient": await self._client.__aenter__() return self - async def __aexit__(self, *exc_details) -> None: + async def __aexit__(self, *exc_details: Any) -> None: await self._client.__aexit__(*exc_details) diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/operations/__init__.py b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/operations/__init__.py index ddb7a2fc5c54..56f912c2d179 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/operations/__init__.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/operations/__init__.py @@ -6,34 +6,34 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from ._clusters_operations import ClustersOperations from ._applications_operations import ApplicationsOperations -from ._locations_operations import LocationsOperations +from ._clusters_operations import ClustersOperations from ._configurations_operations import ConfigurationsOperations from ._extensions_operations import ExtensionsOperations -from ._script_actions_operations import ScriptActionsOperations -from ._script_execution_history_operations import ScriptExecutionHistoryOperations +from ._locations_operations import LocationsOperations from ._operations import Operations -from ._virtual_machines_operations import VirtualMachinesOperations from ._private_endpoint_connections_operations import PrivateEndpointConnectionsOperations from ._private_link_resources_operations import PrivateLinkResourcesOperations +from ._script_actions_operations import ScriptActionsOperations +from ._script_execution_history_operations import ScriptExecutionHistoryOperations +from ._virtual_machines_operations import VirtualMachinesOperations from ._patch import __all__ as _patch_all from ._patch import * # pylint: disable=unused-wildcard-import from ._patch import patch_sdk as _patch_sdk __all__ = [ - "ClustersOperations", "ApplicationsOperations", - "LocationsOperations", + "ClustersOperations", "ConfigurationsOperations", "ExtensionsOperations", - "ScriptActionsOperations", - "ScriptExecutionHistoryOperations", + "LocationsOperations", "Operations", - "VirtualMachinesOperations", "PrivateEndpointConnectionsOperations", "PrivateLinkResourcesOperations", + "ScriptActionsOperations", + "ScriptExecutionHistoryOperations", + "VirtualMachinesOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) _patch_sdk() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/operations/_applications_operations.py b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/operations/_applications_operations.py index f46740cfb347..26d6863b2e0d 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/operations/_applications_operations.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/operations/_applications_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload import urllib.parse @@ -39,10 +38,6 @@ build_list_by_cluster_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -84,9 +79,7 @@ def list_by_cluster( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ApplicationListResult] = kwargs.pop("cls", None) error_map = { @@ -140,8 +133,9 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -186,9 +180,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.Application] = kwargs.pop("cls", None) request = build_get_request( @@ -204,8 +196,9 @@ async def get( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -245,9 +238,7 @@ async def _create_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.Application] = kwargs.pop("cls", None) @@ -275,8 +266,9 @@ async def _create_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -390,7 +382,7 @@ async def begin_create( :type cluster_name: str :param application_name: The constant value for the application name. Required. :type application_name: str - :param parameters: The application create request. Is either a model type or a IO type. + :param parameters: The application create request. Is either a Application type or a IO type. Required. :type parameters: ~azure.mgmt.hdinsight.models.Application or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -412,9 +404,7 @@ async def begin_create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.Application] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -476,9 +466,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -494,8 +482,9 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -539,9 +528,7 @@ async def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -614,9 +601,7 @@ async def get_azure_async_operation_status( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.AsyncOperationResult] = kwargs.pop("cls", None) request = build_get_azure_async_operation_status_request( @@ -633,8 +618,9 @@ async def get_azure_async_operation_status( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/operations/_clusters_operations.py b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/operations/_clusters_operations.py index 2dac50696cf4..b8c2bfe96d4d 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/operations/_clusters_operations.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/operations/_clusters_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload import urllib.parse @@ -48,10 +47,6 @@ build_update_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -93,9 +88,7 @@ async def _create_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.Cluster] = kwargs.pop("cls", None) @@ -122,8 +115,9 @@ async def _create_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -228,7 +222,8 @@ async def begin_create( :type resource_group_name: str :param cluster_name: The name of the cluster. Required. :type cluster_name: str - :param parameters: The cluster create request. Is either a model type or a IO type. Required. + :param parameters: The cluster create request. Is either a ClusterCreateParametersExtended type + or a IO type. Required. :type parameters: ~azure.mgmt.hdinsight.models.ClusterCreateParametersExtended or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -249,9 +244,7 @@ async def begin_create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.Cluster] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -366,7 +359,8 @@ async def update( :type resource_group_name: str :param cluster_name: The name of the cluster. Required. :type cluster_name: str - :param parameters: The cluster patch request. Is either a model type or a IO type. Required. + :param parameters: The cluster patch request. Is either a ClusterPatchParameters type or a IO + type. Required. :type parameters: ~azure.mgmt.hdinsight.models.ClusterPatchParameters or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -387,9 +381,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.Cluster] = kwargs.pop("cls", None) @@ -416,8 +408,9 @@ async def update( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -452,9 +445,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -469,8 +460,9 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -510,9 +502,7 @@ async def begin_delete(self, resource_group_name: str, cluster_name: str, **kwar _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -578,9 +568,7 @@ async def get(self, resource_group_name: str, cluster_name: str, **kwargs: Any) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.Cluster] = kwargs.pop("cls", None) request = build_get_request( @@ -595,8 +583,9 @@ async def get(self, resource_group_name: str, cluster_name: str, **kwargs: Any) request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -631,9 +620,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ClusterListResult] = kwargs.pop("cls", None) error_map = { @@ -686,8 +673,9 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -723,9 +711,7 @@ async def _resize_initial( # pylint: disable=inconsistent-return-statements _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) @@ -753,8 +739,9 @@ async def _resize_initial( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -862,8 +849,8 @@ async def begin_resize( :type cluster_name: str :param role_name: The constant value for the roleName. "workernode" Required. :type role_name: str or ~azure.mgmt.hdinsight.models.RoleName - :param parameters: The parameters for the resize operation. Is either a model type or a IO - type. Required. + :param parameters: The parameters for the resize operation. Is either a ClusterResizeParameters + type or a IO type. Required. :type parameters: ~azure.mgmt.hdinsight.models.ClusterResizeParameters or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -883,9 +870,7 @@ async def begin_resize( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -950,9 +935,7 @@ async def _update_auto_scale_configuration_initial( # pylint: disable=inconsist _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) @@ -980,8 +963,9 @@ async def _update_auto_scale_configuration_initial( # pylint: disable=inconsist request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -1090,7 +1074,7 @@ async def begin_update_auto_scale_configuration( :param role_name: The constant value for the roleName. "workernode" Required. :type role_name: str or ~azure.mgmt.hdinsight.models.RoleName :param parameters: The parameters for the update autoscale configuration operation. Is either a - model type or a IO type. Required. + AutoscaleConfigurationUpdateParameter type or a IO type. Required. :type parameters: ~azure.mgmt.hdinsight.models.AutoscaleConfigurationUpdateParameter or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1110,9 +1094,7 @@ async def begin_update_auto_scale_configuration( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -1170,9 +1152,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Cluster"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ClusterListResult] = kwargs.pop("cls", None) error_map = { @@ -1224,8 +1204,9 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -1258,9 +1239,7 @@ async def _rotate_disk_encryption_key_initial( # pylint: disable=inconsistent-r _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) @@ -1287,8 +1266,9 @@ async def _rotate_disk_encryption_key_initial( # pylint: disable=inconsistent-r request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -1387,8 +1367,8 @@ async def begin_rotate_disk_encryption_key( :type resource_group_name: str :param cluster_name: The name of the cluster. Required. :type cluster_name: str - :param parameters: The parameters for the disk encryption operation. Is either a model type or - a IO type. Required. + :param parameters: The parameters for the disk encryption operation. Is either a + ClusterDiskEncryptionParameters type or a IO type. Required. :type parameters: ~azure.mgmt.hdinsight.models.ClusterDiskEncryptionParameters or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1408,9 +1388,7 @@ async def begin_rotate_disk_encryption_key( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -1481,9 +1459,7 @@ async def get_gateway_settings( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.GatewaySettings] = kwargs.pop("cls", None) request = build_get_gateway_settings_request( @@ -1498,8 +1474,9 @@ async def get_gateway_settings( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -1538,9 +1515,7 @@ async def _update_gateway_settings_initial( # pylint: disable=inconsistent-retu _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) @@ -1567,8 +1542,9 @@ async def _update_gateway_settings_initial( # pylint: disable=inconsistent-retu request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -1667,7 +1643,8 @@ async def begin_update_gateway_settings( :type resource_group_name: str :param cluster_name: The name of the cluster. Required. :type cluster_name: str - :param parameters: The cluster configurations. Is either a model type or a IO type. Required. + :param parameters: The cluster configurations. Is either a UpdateGatewaySettingsParameters type + or a IO type. Required. :type parameters: ~azure.mgmt.hdinsight.models.UpdateGatewaySettingsParameters or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1687,9 +1664,7 @@ async def begin_update_gateway_settings( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -1762,9 +1737,7 @@ async def get_azure_async_operation_status( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.AsyncOperationResult] = kwargs.pop("cls", None) request = build_get_azure_async_operation_status_request( @@ -1780,8 +1753,9 @@ async def get_azure_async_operation_status( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -1820,9 +1794,7 @@ async def _update_identity_certificate_initial( # pylint: disable=inconsistent- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) @@ -1849,8 +1821,9 @@ async def _update_identity_certificate_initial( # pylint: disable=inconsistent- request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -1949,7 +1922,8 @@ async def begin_update_identity_certificate( :type resource_group_name: str :param cluster_name: The name of the cluster. Required. :type cluster_name: str - :param parameters: The cluster configurations. Is either a model type or a IO type. Required. + :param parameters: The cluster configurations. Is either a + UpdateClusterIdentityCertificateParameters type or a IO type. Required. :type parameters: ~azure.mgmt.hdinsight.models.UpdateClusterIdentityCertificateParameters or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1969,9 +1943,7 @@ async def begin_update_identity_certificate( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -2034,9 +2006,7 @@ async def _execute_script_actions_initial( # pylint: disable=inconsistent-retur _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) @@ -2063,8 +2033,9 @@ async def _execute_script_actions_initial( # pylint: disable=inconsistent-retur request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -2163,8 +2134,8 @@ async def begin_execute_script_actions( :type resource_group_name: str :param cluster_name: The name of the cluster. Required. :type cluster_name: str - :param parameters: The parameters for executing script actions. Is either a model type or a IO - type. Required. + :param parameters: The parameters for executing script actions. Is either a + ExecuteScriptActionParameters type or a IO type. Required. :type parameters: ~azure.mgmt.hdinsight.models.ExecuteScriptActionParameters or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -2184,9 +2155,7 @@ async def begin_execute_script_actions( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/operations/_configurations_operations.py b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/operations/_configurations_operations.py index 2d0cb0cc3263..33b55a24b1e7 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/operations/_configurations_operations.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/operations/_configurations_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload from azure.core.exceptions import ( @@ -30,10 +29,6 @@ from ..._vendor import _convert_request from ...operations._configurations_operations import build_get_request, build_list_request, build_update_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -81,9 +76,7 @@ async def list(self, resource_group_name: str, cluster_name: str, **kwargs: Any) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ClusterConfigurations] = kwargs.pop("cls", None) request = build_list_request( @@ -98,8 +91,9 @@ async def list(self, resource_group_name: str, cluster_name: str, **kwargs: Any) request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -139,9 +133,7 @@ async def _update_initial( # pylint: disable=inconsistent-return-statements _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) @@ -169,8 +161,9 @@ async def _update_initial( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -281,7 +274,8 @@ async def begin_update( :type cluster_name: str :param configuration_name: The name of the cluster configuration. Required. :type configuration_name: str - :param parameters: The cluster configurations. Is either a dict type or a IO type. Required. + :param parameters: The cluster configurations. Is either a {str: str} type or a IO type. + Required. :type parameters: dict[str, str] or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -301,9 +295,7 @@ async def begin_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -378,9 +370,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[Dict[str, str]] = kwargs.pop("cls", None) request = build_get_request( @@ -396,8 +386,9 @@ async def get( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/operations/_extensions_operations.py b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/operations/_extensions_operations.py index 729105cd9b20..45d77c4af4a8 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/operations/_extensions_operations.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/operations/_extensions_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload from azure.core.exceptions import ( @@ -41,10 +40,6 @@ build_get_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -86,9 +81,7 @@ async def _enable_monitoring_initial( # pylint: disable=inconsistent-return-sta _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) @@ -115,8 +108,9 @@ async def _enable_monitoring_initial( # pylint: disable=inconsistent-return-sta request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -216,7 +210,7 @@ async def begin_enable_monitoring( :param cluster_name: The name of the cluster. Required. :type cluster_name: str :param parameters: The Operations Management Suite (OMS) workspace parameters. Is either a - model type or a IO type. Required. + ClusterMonitoringRequest type or a IO type. Required. :type parameters: ~azure.mgmt.hdinsight.models.ClusterMonitoringRequest or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -236,9 +230,7 @@ async def begin_enable_monitoring( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -309,9 +301,7 @@ async def get_monitoring_status( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ClusterMonitoringResponse] = kwargs.pop("cls", None) request = build_get_monitoring_status_request( @@ -326,8 +316,9 @@ async def get_monitoring_status( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -362,9 +353,7 @@ async def _disable_monitoring_initial( # pylint: disable=inconsistent-return-st _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) request = build_disable_monitoring_request( @@ -379,8 +368,9 @@ async def _disable_monitoring_initial( # pylint: disable=inconsistent-return-st request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -422,9 +412,7 @@ async def begin_disable_monitoring( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -484,9 +472,7 @@ async def _enable_azure_monitor_initial( # pylint: disable=inconsistent-return- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) @@ -513,8 +499,9 @@ async def _enable_azure_monitor_initial( # pylint: disable=inconsistent-return- request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -613,8 +600,8 @@ async def begin_enable_azure_monitor( :type resource_group_name: str :param cluster_name: The name of the cluster. Required. :type cluster_name: str - :param parameters: The Log Analytics workspace parameters. Is either a model type or a IO type. - Required. + :param parameters: The Log Analytics workspace parameters. Is either a AzureMonitorRequest type + or a IO type. Required. :type parameters: ~azure.mgmt.hdinsight.models.AzureMonitorRequest or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -634,9 +621,7 @@ async def begin_enable_azure_monitor( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -707,9 +692,7 @@ async def get_azure_monitor_status( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.AzureMonitorResponse] = kwargs.pop("cls", None) request = build_get_azure_monitor_status_request( @@ -724,8 +707,9 @@ async def get_azure_monitor_status( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -760,9 +744,7 @@ async def _disable_azure_monitor_initial( # pylint: disable=inconsistent-return _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) request = build_disable_azure_monitor_request( @@ -777,8 +759,9 @@ async def _disable_azure_monitor_initial( # pylint: disable=inconsistent-return request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -820,9 +803,7 @@ async def begin_disable_azure_monitor( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -883,9 +864,7 @@ async def _create_initial( # pylint: disable=inconsistent-return-statements _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) @@ -913,8 +892,9 @@ async def _create_initial( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -1022,8 +1002,8 @@ async def begin_create( :type cluster_name: str :param extension_name: The name of the cluster extension. Required. :type extension_name: str - :param parameters: The cluster extensions create request. Is either a model type or a IO type. - Required. + :param parameters: The cluster extensions create request. Is either a Extension type or a IO + type. Required. :type parameters: ~azure.mgmt.hdinsight.models.Extension or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1043,9 +1023,7 @@ async def begin_create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -1119,9 +1097,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ClusterMonitoringResponse] = kwargs.pop("cls", None) request = build_get_request( @@ -1137,8 +1113,9 @@ async def get( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -1173,9 +1150,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -1191,8 +1166,9 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -1236,9 +1212,7 @@ async def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -1311,9 +1285,7 @@ async def get_azure_async_operation_status( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.AsyncOperationResult] = kwargs.pop("cls", None) request = build_get_azure_async_operation_status_request( @@ -1330,8 +1302,9 @@ async def get_azure_async_operation_status( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/operations/_locations_operations.py b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/operations/_locations_operations.py index dce2f2eddbbc..f2a40926a22a 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/operations/_locations_operations.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/operations/_locations_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( @@ -35,10 +34,6 @@ build_validate_cluster_create_request_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -84,9 +79,7 @@ async def get_capabilities(self, location: str, **kwargs: Any) -> _models.Capabi _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.CapabilitiesResult] = kwargs.pop("cls", None) request = build_get_capabilities_request( @@ -100,8 +93,9 @@ async def get_capabilities(self, location: str, **kwargs: Any) -> _models.Capabi request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -144,9 +138,7 @@ async def list_usages(self, location: str, **kwargs: Any) -> _models.UsagesListR _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.UsagesListResult] = kwargs.pop("cls", None) request = build_list_usages_request( @@ -160,8 +152,9 @@ async def list_usages(self, location: str, **kwargs: Any) -> _models.UsagesListR request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -204,9 +197,7 @@ async def list_billing_specs(self, location: str, **kwargs: Any) -> _models.Bill _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.BillingResponseListResult] = kwargs.pop("cls", None) request = build_list_billing_specs_request( @@ -220,8 +211,9 @@ async def list_billing_specs(self, location: str, **kwargs: Any) -> _models.Bill request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -268,9 +260,7 @@ async def get_azure_async_operation_status( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.AsyncOperationResult] = kwargs.pop("cls", None) request = build_get_azure_async_operation_status_request( @@ -285,8 +275,9 @@ async def get_azure_async_operation_status( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -358,7 +349,8 @@ async def check_name_availability( :param location: The Azure location (region) for which to make the request. Required. :type location: str - :param parameters: Is either a model type or a IO type. Required. + :param parameters: Is either a NameAvailabilityCheckRequestParameters type or a IO type. + Required. :type parameters: ~azure.mgmt.hdinsight.models.NameAvailabilityCheckRequestParameters or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -379,9 +371,7 @@ async def check_name_availability( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.NameAvailabilityCheckResult] = kwargs.pop("cls", None) @@ -407,8 +397,9 @@ async def check_name_availability( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -480,7 +471,8 @@ async def validate_cluster_create_request( :param location: The Azure location (region) for which to make the request. Required. :type location: str - :param parameters: Is either a model type or a IO type. Required. + :param parameters: Is either a ClusterCreateRequestValidationParameters type or a IO type. + Required. :type parameters: ~azure.mgmt.hdinsight.models.ClusterCreateRequestValidationParameters or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -501,9 +493,7 @@ async def validate_cluster_create_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ClusterCreateValidationResult] = kwargs.pop("cls", None) @@ -529,8 +519,9 @@ async def validate_cluster_create_request( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/operations/_operations.py b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/operations/_operations.py index eb20e31ab40f..a13974f466ff 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/operations/_operations.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/operations/_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar import urllib.parse @@ -30,10 +29,6 @@ from ..._vendor import _convert_request from ...operations._operations import build_list_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -69,9 +64,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Operation"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) error_map = { @@ -122,8 +115,9 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/operations/_private_endpoint_connections_operations.py b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/operations/_private_endpoint_connections_operations.py index 05dc87473221..fe933515cb0f 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/operations/_private_endpoint_connections_operations.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/operations/_private_endpoint_connections_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload import urllib.parse @@ -38,10 +37,6 @@ build_list_by_cluster_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -85,9 +80,7 @@ def list_by_cluster( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.PrivateEndpointConnectionListResult] = kwargs.pop("cls", None) error_map = { @@ -141,8 +134,9 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -178,9 +172,7 @@ async def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PrivateEndpointConnection] = kwargs.pop("cls", None) @@ -208,8 +200,9 @@ async def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -329,8 +322,8 @@ async def begin_create_or_update( :type cluster_name: str :param private_endpoint_connection_name: The name of the private endpoint connection. Required. :type private_endpoint_connection_name: str - :param parameters: The private endpoint connection create or update request. Is either a model - type or a IO type. Required. + :param parameters: The private endpoint connection create or update request. Is either a + PrivateEndpointConnection type or a IO type. Required. :type parameters: ~azure.mgmt.hdinsight.models.PrivateEndpointConnection or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -352,9 +345,7 @@ async def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PrivateEndpointConnection] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -431,9 +422,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.PrivateEndpointConnection] = kwargs.pop("cls", None) request = build_get_request( @@ -449,8 +438,9 @@ async def get( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -485,9 +475,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -503,8 +491,9 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -548,9 +537,7 @@ async def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/operations/_private_link_resources_operations.py b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/operations/_private_link_resources_operations.py index f7f2639d4b6e..d7ea84f38296 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/operations/_private_link_resources_operations.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/operations/_private_link_resources_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( @@ -28,10 +27,6 @@ from ..._vendor import _convert_request from ...operations._private_link_resources_operations import build_get_request, build_list_by_cluster_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -81,9 +76,7 @@ async def list_by_cluster( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.PrivateLinkResourceListResult] = kwargs.pop("cls", None) request = build_list_by_cluster_request( @@ -98,8 +91,9 @@ async def list_by_cluster( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -148,9 +142,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.PrivateLinkResource] = kwargs.pop("cls", None) request = build_get_request( @@ -166,8 +158,9 @@ async def get( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/operations/_script_actions_operations.py b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/operations/_script_actions_operations.py index e3433285e60c..32dee98bd3dc 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/operations/_script_actions_operations.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/operations/_script_actions_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar import urllib.parse @@ -36,10 +35,6 @@ build_list_by_cluster_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -91,9 +86,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -109,8 +102,9 @@ async def delete( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -147,9 +141,7 @@ def list_by_cluster( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ScriptActionsList] = kwargs.pop("cls", None) error_map = { @@ -203,8 +195,9 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -249,9 +242,7 @@ async def get_execution_detail( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.RuntimeScriptActionDetail] = kwargs.pop("cls", None) request = build_get_execution_detail_request( @@ -267,8 +258,9 @@ async def get_execution_detail( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -317,9 +309,7 @@ async def get_execution_async_operation_status( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.AsyncOperationResult] = kwargs.pop("cls", None) request = build_get_execution_async_operation_status_request( @@ -335,8 +325,9 @@ async def get_execution_async_operation_status( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/operations/_script_execution_history_operations.py b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/operations/_script_execution_history_operations.py index 216b460d0f5c..68ea6a326245 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/operations/_script_execution_history_operations.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/operations/_script_execution_history_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar import urllib.parse @@ -31,10 +30,6 @@ from ..._vendor import _convert_request from ...operations._script_execution_history_operations import build_list_by_cluster_request, build_promote_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -78,9 +73,7 @@ def list_by_cluster( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ScriptActionExecutionHistoryList] = kwargs.pop("cls", None) error_map = { @@ -134,8 +127,9 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -180,9 +174,7 @@ async def promote( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) request = build_promote_request( @@ -198,8 +190,9 @@ async def promote( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/operations/_virtual_machines_operations.py b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/operations/_virtual_machines_operations.py index 0780eaa4484e..5ddad0d45644 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/operations/_virtual_machines_operations.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/operations/_virtual_machines_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, List, Optional, TypeVar, Union, cast, overload from azure.core.exceptions import ( @@ -34,10 +33,6 @@ build_restart_hosts_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -85,9 +80,7 @@ async def list_hosts(self, resource_group_name: str, cluster_name: str, **kwargs _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[List[_models.HostInfo]] = kwargs.pop("cls", None) request = build_list_hosts_request( @@ -102,8 +95,9 @@ async def list_hosts(self, resource_group_name: str, cluster_name: str, **kwargs request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -138,9 +132,7 @@ async def _restart_hosts_initial( # pylint: disable=inconsistent-return-stateme _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) @@ -167,8 +159,9 @@ async def _restart_hosts_initial( # pylint: disable=inconsistent-return-stateme request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -263,7 +256,7 @@ async def begin_restart_hosts( :type resource_group_name: str :param cluster_name: The name of the cluster. Required. :type cluster_name: str - :param hosts: The list of hosts to restart. Is either a list type or a IO type. Required. + :param hosts: The list of hosts to restart. Is either a [str] type or a IO type. Required. :type hosts: list[str] or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -283,9 +276,7 @@ async def begin_restart_hosts( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -358,9 +349,7 @@ async def get_async_operation_status( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.AsyncOperationResult] = kwargs.pop("cls", None) request = build_get_async_operation_status_request( @@ -376,8 +365,9 @@ async def get_async_operation_status( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/_models_py3.py b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/_models_py3.py index e140f9d6e00e..718cd6152ef2 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/_models_py3.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/_models_py3.py @@ -63,8 +63,8 @@ def __init__( resource_id: Optional[str] = None, subnet_id: Optional[str] = None, tenant_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword domain_name: The Azure active directory domain service name. :paramtype domain_name: str @@ -119,7 +119,7 @@ class Resource(_serialization.Model): "type": {"key": "type", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.id = None @@ -128,7 +128,8 @@ def __init__(self, **kwargs): class ProxyResource(Resource): - """The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location. + """The resource model definition for a Azure Resource Manager proxy resource. It will not have + tags and a location. Variables are only populated by the server, and will be ignored when sending a request. @@ -154,7 +155,7 @@ class ProxyResource(Resource): "type": {"key": "type", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) @@ -205,8 +206,8 @@ def __init__( etag: Optional[str] = None, tags: Optional[Dict[str, str]] = None, properties: Optional["_models.ApplicationProperties"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword etag: The ETag for the application. :paramtype etag: str @@ -249,8 +250,8 @@ def __init__( destination_port: Optional[int] = None, public_port: Optional[int] = None, private_ip_address: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword location: The location of the endpoint. :paramtype location: str @@ -312,8 +313,8 @@ def __init__( private_ip_address: Optional[str] = None, sub_domain_suffix: Optional[str] = None, disable_gateway_auth: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword access_modes: The list of access modes for the application. :paramtype access_modes: list[str] @@ -337,7 +338,8 @@ def __init__( class ApplicationListResult(_serialization.Model): - """Result of the request to list cluster Applications. It contains a list of operations and a URL link to get the next set of results. + """Result of the request to list cluster Applications. It contains a list of operations and a URL + link to get the next set of results. Variables are only populated by the server, and will be ignored when sending a request. @@ -356,7 +358,7 @@ class ApplicationListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.Application"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.Application"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of HDInsight applications installed on HDInsight cluster. :paramtype value: list[~azure.mgmt.hdinsight.models.Application] @@ -431,8 +433,8 @@ def __init__( application_type: Optional[str] = None, errors: Optional[List["_models.Errors"]] = None, private_link_configurations: Optional[List["_models.PrivateLinkConfiguration"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword compute_profile: The list of roles in the cluster. :paramtype compute_profile: ~azure.mgmt.hdinsight.models.ComputeProfile @@ -487,8 +489,8 @@ def __init__( *, status: Optional[Union[str, "_models.AsyncOperationState"]] = None, error: Optional["_models.Errors"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword status: The async operation state. Known values are: "InProgress", "Succeeded", and "Failed". @@ -520,8 +522,8 @@ def __init__( *, capacity: Optional["_models.AutoscaleCapacity"] = None, recurrence: Optional["_models.AutoscaleRecurrence"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword capacity: Parameters for load-based autoscale. :paramtype capacity: ~azure.mgmt.hdinsight.models.AutoscaleCapacity @@ -547,7 +549,9 @@ class AutoscaleCapacity(_serialization.Model): "max_instance_count": {"key": "maxInstanceCount", "type": "int"}, } - def __init__(self, *, min_instance_count: Optional[int] = None, max_instance_count: Optional[int] = None, **kwargs): + def __init__( + self, *, min_instance_count: Optional[int] = None, max_instance_count: Optional[int] = None, **kwargs: Any + ) -> None: """ :keyword min_instance_count: The minimum instance count of the cluster. :paramtype min_instance_count: int @@ -570,7 +574,7 @@ class AutoscaleConfigurationUpdateParameter(_serialization.Model): "autoscale": {"key": "autoscale", "type": "Autoscale"}, } - def __init__(self, *, autoscale: Optional["_models.Autoscale"] = None, **kwargs): + def __init__(self, *, autoscale: Optional["_models.Autoscale"] = None, **kwargs: Any) -> None: """ :keyword autoscale: The autoscale configuration. :paramtype autoscale: ~azure.mgmt.hdinsight.models.Autoscale @@ -594,8 +598,12 @@ class AutoscaleRecurrence(_serialization.Model): } def __init__( - self, *, time_zone: Optional[str] = None, schedule: Optional[List["_models.AutoscaleSchedule"]] = None, **kwargs - ): + self, + *, + time_zone: Optional[str] = None, + schedule: Optional[List["_models.AutoscaleSchedule"]] = None, + **kwargs: Any + ) -> None: """ :keyword time_zone: The time zone for the autoscale schedule times. :paramtype time_zone: str @@ -608,7 +616,8 @@ def __init__( class AutoscaleSchedule(_serialization.Model): - """Parameters for a schedule-based autoscale rule, consisting of an array of days + a time and capacity. + """Parameters for a schedule-based autoscale rule, consisting of an array of days + a time and + capacity. :ivar days: Days of the week for a schedule-based autoscale rule. :vartype days: list[str or ~azure.mgmt.hdinsight.models.DaysOfWeek] @@ -626,8 +635,8 @@ def __init__( *, days: Optional[List[Union[str, "_models.DaysOfWeek"]]] = None, time_and_capacity: Optional["_models.AutoscaleTimeAndCapacity"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword days: Days of the week for a schedule-based autoscale rule. :paramtype days: list[str or ~azure.mgmt.hdinsight.models.DaysOfWeek] @@ -662,8 +671,8 @@ def __init__( time: Optional[str] = None, min_instance_count: Optional[int] = None, max_instance_count: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword time: 24-hour time in the form xx:xx. :paramtype time: str @@ -702,8 +711,8 @@ def __init__( workspace_id: Optional[str] = None, primary_key: Optional[str] = None, selected_configurations: Optional["_models.AzureMonitorSelectedConfigurations"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword workspace_id: The Log Analytics workspace ID. :paramtype workspace_id: str @@ -743,8 +752,8 @@ def __init__( cluster_monitoring_enabled: Optional[bool] = None, workspace_id: Optional[str] = None, selected_configurations: Optional["_models.AzureMonitorSelectedConfigurations"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword cluster_monitoring_enabled: The status of the monitor on the HDInsight cluster. :paramtype cluster_monitoring_enabled: bool @@ -783,8 +792,8 @@ def __init__( configuration_version: Optional[str] = None, global_configurations: Optional[Dict[str, str]] = None, table_list: Optional[List["_models.AzureMonitorTableConfiguration"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword configuration_version: The configuration version. :paramtype configuration_version: str @@ -810,7 +819,7 @@ class AzureMonitorTableConfiguration(_serialization.Model): "name": {"key": "name", "type": "str"}, } - def __init__(self, *, name: Optional[str] = None, **kwargs): + def __init__(self, *, name: Optional[str] = None, **kwargs: Any) -> None: """ :keyword name: The name. :paramtype name: str @@ -842,8 +851,8 @@ def __init__( meter_parameter: Optional[str] = None, meter: Optional[str] = None, unit: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword meter_parameter: The virtual machine sizes. :paramtype meter_parameter: str @@ -881,8 +890,8 @@ def __init__( region: Optional[str] = None, billing_meters: Optional[List["_models.BillingMeters"]] = None, disk_billing_meters: Optional[List["_models.DiskBillingMeters"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword region: The region or location. :paramtype region: str @@ -934,8 +943,8 @@ def __init__( vm_sizes_with_encryption_at_host: Optional[List[str]] = None, vm_size_filters: Optional[List["_models.VmSizeCompatibilityFilterV2"]] = None, billing_resources: Optional[List["_models.BillingResources"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword vm_sizes: The virtual machine sizes to include or exclude. :paramtype vm_sizes: list[str] @@ -987,8 +996,8 @@ def __init__( versions: Optional[Dict[str, "_models.VersionsCapability"]] = None, regions: Optional[Dict[str, "_models.RegionsCapability"]] = None, features: Optional[List[str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword versions: The version capability. :paramtype versions: dict[str, ~azure.mgmt.hdinsight.models.VersionsCapability] @@ -1018,7 +1027,7 @@ class ClientGroupInfo(_serialization.Model): "group_id": {"key": "groupId", "type": "str"}, } - def __init__(self, *, group_name: Optional[str] = None, group_id: Optional[str] = None, **kwargs): + def __init__(self, *, group_name: Optional[str] = None, group_id: Optional[str] = None, **kwargs: Any) -> None: """ :keyword group_name: The AAD security group name. :paramtype group_name: str @@ -1057,7 +1066,7 @@ class ResourceAutoGenerated(_serialization.Model): "type": {"key": "type", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.id = None @@ -1066,7 +1075,8 @@ def __init__(self, **kwargs): class TrackedResource(ResourceAutoGenerated): - """The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'. + """The resource model definition for an Azure Resource Manager tracked top level resource which + has 'tags' and a 'location'. Variables are only populated by the server, and will be ignored when sending a request. @@ -1101,7 +1111,7 @@ class TrackedResource(ResourceAutoGenerated): "location": {"key": "location", "type": "str"}, } - def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -1174,8 +1184,8 @@ def __init__( zones: Optional[List[str]] = None, properties: Optional["_models.ClusterGetProperties"] = None, identity: Optional["_models.ClusterIdentity"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -1210,7 +1220,7 @@ class ClusterConfigurations(_serialization.Model): "configurations": {"key": "configurations", "type": "{{str}}"}, } - def __init__(self, *, configurations: Optional[Dict[str, Dict[str, str]]] = None, **kwargs): + def __init__(self, *, configurations: Optional[Dict[str, Dict[str, str]]] = None, **kwargs: Any) -> None: """ :keyword configurations: The configuration object for the specified configuration for the specified cluster. @@ -1251,8 +1261,8 @@ def __init__( zones: Optional[List[str]] = None, properties: Optional["_models.ClusterCreateProperties"] = None, identity: Optional["_models.ClusterIdentity"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword location: The location of the cluster. :paramtype location: str @@ -1345,8 +1355,8 @@ def __init__( network_properties: Optional["_models.NetworkProperties"] = None, compute_isolation_properties: Optional["_models.ComputeIsolationProperties"] = None, private_link_configurations: Optional[List["_models.PrivateLinkConfiguration"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword cluster_version: The version of the cluster. :paramtype cluster_version: str @@ -1444,8 +1454,8 @@ def __init__( type: Optional[str] = None, tenant_id: Optional[str] = None, fetch_aadds_resource: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword location: The location of the cluster. :paramtype location: str @@ -1500,8 +1510,8 @@ def __init__( validation_warnings: Optional[List["_models.ValidationErrorInfo"]] = None, estimated_creation_duration: Optional[datetime.timedelta] = None, aadds_resources_details: Optional[List["_models.AaddsResourceDetails"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword validation_errors: The validation errors. :paramtype validation_errors: list[~azure.mgmt.hdinsight.models.ValidationErrorInfo] @@ -1546,8 +1556,8 @@ def __init__( kind: Optional[str] = None, component_version: Optional[Dict[str, str]] = None, configurations: Optional[JSON] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword blueprint: The link to the blueprint. :paramtype blueprint: str @@ -1589,8 +1599,8 @@ def __init__( vault_uri: Optional[str] = None, key_name: Optional[str] = None, key_version: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword vault_uri: Base key vault URI where the customers key is located eg. https://myvault.vault.azure.net. @@ -1729,8 +1739,8 @@ def __init__( # pylint: disable=too-many-locals network_properties: Optional["_models.NetworkProperties"] = None, compute_isolation_properties: Optional["_models.ComputeIsolationProperties"] = None, private_link_configurations: Optional[List["_models.PrivateLinkConfiguration"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword cluster_version: The version of the cluster. :paramtype cluster_version: str @@ -1849,8 +1859,8 @@ def __init__( *, type: Optional[Union[str, "_models.ResourceIdentityType"]] = None, user_assigned_identities: Optional[Dict[str, "_models.UserAssignedIdentity"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword type: The type of identity used for the cluster. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user assigned @@ -1890,7 +1900,7 @@ class ClusterListPersistedScriptActionsResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.RuntimeScriptAction"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.RuntimeScriptAction"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of Persisted Script Actions. :paramtype value: list[~azure.mgmt.hdinsight.models.RuntimeScriptAction] @@ -1920,7 +1930,7 @@ class ClusterListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.Cluster"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.Cluster"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of Clusters. :paramtype value: list[~azure.mgmt.hdinsight.models.Cluster] @@ -1944,7 +1954,7 @@ class ClusterMonitoringRequest(_serialization.Model): "primary_key": {"key": "primaryKey", "type": "str"}, } - def __init__(self, *, workspace_id: Optional[str] = None, primary_key: Optional[str] = None, **kwargs): + def __init__(self, *, workspace_id: Optional[str] = None, primary_key: Optional[str] = None, **kwargs: Any) -> None: """ :keyword workspace_id: The cluster monitor workspace ID. :paramtype workspace_id: str @@ -1971,8 +1981,8 @@ class ClusterMonitoringResponse(_serialization.Model): } def __init__( - self, *, cluster_monitoring_enabled: Optional[bool] = None, workspace_id: Optional[str] = None, **kwargs - ): + self, *, cluster_monitoring_enabled: Optional[bool] = None, workspace_id: Optional[str] = None, **kwargs: Any + ) -> None: """ :keyword cluster_monitoring_enabled: The status of the monitor on the HDInsight cluster. :paramtype cluster_monitoring_enabled: bool @@ -1995,7 +2005,7 @@ class ClusterPatchParameters(_serialization.Model): "tags": {"key": "tags", "type": "{str}"}, } - def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword tags: The resource tags. :paramtype tags: dict[str, str] @@ -2015,7 +2025,7 @@ class ClusterResizeParameters(_serialization.Model): "target_instance_count": {"key": "targetInstanceCount", "type": "int"}, } - def __init__(self, *, target_instance_count: Optional[int] = None, **kwargs): + def __init__(self, *, target_instance_count: Optional[int] = None, **kwargs: Any) -> None: """ :keyword target_instance_count: The target instance count for the operation. :paramtype target_instance_count: int @@ -2038,7 +2048,9 @@ class ComputeIsolationProperties(_serialization.Model): "host_sku": {"key": "hostSku", "type": "str"}, } - def __init__(self, *, enable_compute_isolation: bool = False, host_sku: Optional[str] = None, **kwargs): + def __init__( + self, *, enable_compute_isolation: bool = False, host_sku: Optional[str] = None, **kwargs: Any + ) -> None: """ :keyword enable_compute_isolation: The flag indicates whether enable compute isolation or not. :paramtype enable_compute_isolation: bool @@ -2061,7 +2073,7 @@ class ComputeProfile(_serialization.Model): "roles": {"key": "roles", "type": "[Role]"}, } - def __init__(self, *, roles: Optional[List["_models.Role"]] = None, **kwargs): + def __init__(self, *, roles: Optional[List["_models.Role"]] = None, **kwargs: Any) -> None: """ :keyword roles: The list of roles in the cluster. :paramtype roles: list[~azure.mgmt.hdinsight.models.Role] @@ -2101,8 +2113,8 @@ def __init__( location: Optional[str] = None, port: Optional[int] = None, private_ip_address: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: The name of the endpoint. :paramtype name: str @@ -2147,7 +2159,7 @@ class DataDisksGroups(_serialization.Model): "disk_size_gb": {"key": "diskSizeGB", "type": "int"}, } - def __init__(self, *, disks_per_node: Optional[int] = None, **kwargs): + def __init__(self, *, disks_per_node: Optional[int] = None, **kwargs: Any) -> None: """ :keyword disks_per_node: The number of disks per node. :paramtype disks_per_node: int @@ -2186,8 +2198,8 @@ def __init__( display_name: Optional[str] = None, internal_name: Optional[str] = None, to_be_exported_for_shoebox: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: The name of the dimension. :paramtype name: str @@ -2230,8 +2242,8 @@ def __init__( disk_rp_meter: Optional[str] = None, sku: Optional[str] = None, tier: Optional[Union[str, "_models.Tier"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword disk_rp_meter: The managed disk meter guid. :paramtype disk_rp_meter: str @@ -2285,8 +2297,8 @@ def __init__( encryption_algorithm: Optional[Union[str, "_models.JsonWebKeyEncryptionAlgorithm"]] = None, msi_resource_id: Optional[str] = None, encryption_at_host: bool = False, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword vault_uri: Base key vault URI where the customers key is located eg. https://myvault.vault.azure.net. @@ -2325,7 +2337,7 @@ class EncryptionInTransitProperties(_serialization.Model): "is_encryption_in_transit_enabled": {"key": "isEncryptionInTransitEnabled", "type": "bool"}, } - def __init__(self, *, is_encryption_in_transit_enabled: bool = False, **kwargs): + def __init__(self, *, is_encryption_in_transit_enabled: bool = False, **kwargs: Any) -> None: """ :keyword is_encryption_in_transit_enabled: Indicates whether or not inter cluster node communication is encrypted in transit. @@ -2349,7 +2361,7 @@ class ErrorResponse(_serialization.Model): "message": {"key": "message", "type": "str"}, } - def __init__(self, *, code: Optional[str] = None, message: Optional[str] = None, **kwargs): + def __init__(self, *, code: Optional[str] = None, message: Optional[str] = None, **kwargs: Any) -> None: """ :keyword code: Error code. :paramtype code: str @@ -2375,7 +2387,7 @@ class Errors(_serialization.Model): "message": {"key": "message", "type": "str"}, } - def __init__(self, *, code: Optional[str] = None, message: Optional[str] = None, **kwargs): + def __init__(self, *, code: Optional[str] = None, message: Optional[str] = None, **kwargs: Any) -> None: """ :keyword code: The error code. :paramtype code: str @@ -2406,8 +2418,8 @@ def __init__( *, excluded_services_config_id: Optional[str] = None, excluded_services_list: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword excluded_services_config_id: The config id of excluded services. :paramtype excluded_services_config_id: str @@ -2444,8 +2456,8 @@ def __init__( *, persist_on_success: bool, script_actions: Optional[List["_models.RuntimeScriptAction"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword script_actions: The list of run time script actions. :paramtype script_actions: list[~azure.mgmt.hdinsight.models.RuntimeScriptAction] @@ -2471,7 +2483,7 @@ class Extension(_serialization.Model): "primary_key": {"key": "primaryKey", "type": "str"}, } - def __init__(self, *, workspace_id: Optional[str] = None, primary_key: Optional[str] = None, **kwargs): + def __init__(self, *, workspace_id: Optional[str] = None, primary_key: Optional[str] = None, **kwargs: Any) -> None: """ :keyword workspace_id: The workspace ID for the cluster monitoring extension. :paramtype workspace_id: str @@ -2509,7 +2521,7 @@ class GatewaySettings(_serialization.Model): "password": {"key": "restAuthCredential\\.password", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.is_credential_enabled = None @@ -2528,7 +2540,7 @@ class HardwareProfile(_serialization.Model): "vm_size": {"key": "vmSize", "type": "str"}, } - def __init__(self, *, vm_size: Optional[str] = None, **kwargs): + def __init__(self, *, vm_size: Optional[str] = None, **kwargs: Any) -> None: """ :keyword vm_size: The size of the VM. :paramtype vm_size: str @@ -2561,8 +2573,8 @@ def __init__( name: Optional[str] = None, fqdn: Optional[str] = None, effective_disk_encryption_key_url: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: The host name. :paramtype name: str @@ -2634,8 +2646,8 @@ def __init__( private_ip_address: Optional[str] = None, private_ip_allocation_method: Optional[Union[str, "_models.PrivateIPAllocationMethod"]] = None, subnet: Optional["_models.ResourceId"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: The name of private link IP configuration. Required. :paramtype name: str @@ -2680,8 +2692,8 @@ def __init__( *, client_group_info: Optional["_models.ClientGroupInfo"] = None, configuration_override: Optional[Dict[str, str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword client_group_info: The information of AAD security group. :paramtype client_group_info: ~azure.mgmt.hdinsight.models.ClientGroupInfo @@ -2716,8 +2728,8 @@ def __init__( username: Optional[str] = None, password: Optional[str] = None, ssh_profile: Optional["_models.SshProfile"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword username: The username. :paramtype username: str @@ -2746,7 +2758,7 @@ class LocalizedName(_serialization.Model): "localized_value": {"key": "localizedValue", "type": "str"}, } - def __init__(self, *, value: Optional[str] = None, localized_value: Optional[str] = None, **kwargs): + def __init__(self, *, value: Optional[str] = None, localized_value: Optional[str] = None, **kwargs: Any) -> None: """ :keyword value: The name of the used resource. :paramtype value: str @@ -2838,8 +2850,8 @@ def __init__( is_internal: Optional[bool] = None, delegate_metric_name_override: Optional[str] = None, dimensions: Optional[List["_models.Dimension"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: The name of the metric specification. :paramtype name: str @@ -2913,7 +2925,7 @@ class NameAvailabilityCheckRequestParameters(_serialization.Model): "type": {"key": "type", "type": "str"}, } - def __init__(self, *, name: Optional[str] = None, type: Optional[str] = None, **kwargs): + def __init__(self, *, name: Optional[str] = None, type: Optional[str] = None, **kwargs: Any) -> None: """ :keyword name: The resource name. :paramtype name: str @@ -2949,7 +2961,7 @@ class NameAvailabilityCheckResult(_serialization.Model): "message": {"key": "message", "type": "str"}, } - def __init__(self, *, name_available: Optional[bool] = None, **kwargs): + def __init__(self, *, name_available: Optional[bool] = None, **kwargs: Any) -> None: """ :keyword name_available: This indicates whether the name is available. :paramtype name_available: bool @@ -2982,8 +2994,8 @@ def __init__( *, resource_provider_connection: Optional[Union[str, "_models.ResourceProviderConnection"]] = None, private_link: Optional[Union[str, "_models.PrivateLink"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword resource_provider_connection: The direction for the resource provider connection. Known values are: "Inbound" and "Outbound". @@ -3021,8 +3033,8 @@ def __init__( name: Optional[str] = None, display: Optional["_models.OperationDisplay"] = None, properties: Optional["_models.OperationProperties"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: The operation name: {provider}/{resource}/{operation}. :paramtype name: str @@ -3064,8 +3076,8 @@ def __init__( resource: Optional[str] = None, operation: Optional[str] = None, description: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword provider: The service provider: Microsoft.HDInsight. :paramtype provider: str @@ -3085,7 +3097,8 @@ def __init__( class OperationListResult(_serialization.Model): - """Result of the request to list HDInsight operations. It contains a list of operations and a URL link to get the next set of results. + """Result of the request to list HDInsight operations. It contains a list of operations and a URL + link to get the next set of results. :ivar value: The list of HDInsight operations supported by the HDInsight resource provider. :vartype value: list[~azure.mgmt.hdinsight.models.Operation] @@ -3098,7 +3111,9 @@ class OperationListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.Operation"]] = None, next_link: Optional[str] = None, **kwargs): + def __init__( + self, *, value: Optional[List["_models.Operation"]] = None, next_link: Optional[str] = None, **kwargs: Any + ) -> None: """ :keyword value: The list of HDInsight operations supported by the HDInsight resource provider. :paramtype value: list[~azure.mgmt.hdinsight.models.Operation] @@ -3121,7 +3136,9 @@ class OperationProperties(_serialization.Model): "service_specification": {"key": "serviceSpecification", "type": "ServiceSpecification"}, } - def __init__(self, *, service_specification: Optional["_models.ServiceSpecification"] = None, **kwargs): + def __init__( + self, *, service_specification: Optional["_models.ServiceSpecification"] = None, **kwargs: Any + ) -> None: """ :keyword service_specification: The specification of the service. :paramtype service_specification: ~azure.mgmt.hdinsight.models.ServiceSpecification @@ -3143,8 +3160,8 @@ class OsProfile(_serialization.Model): } def __init__( - self, *, linux_operating_system_profile: Optional["_models.LinuxOperatingSystemProfile"] = None, **kwargs - ): + self, *, linux_operating_system_profile: Optional["_models.LinuxOperatingSystemProfile"] = None, **kwargs: Any + ) -> None: """ :keyword linux_operating_system_profile: The Linux OS profile. :paramtype linux_operating_system_profile: @@ -3165,7 +3182,7 @@ class PrivateEndpoint(_serialization.Model): "id": {"key": "id", "type": "str"}, } - def __init__(self, *, id: Optional[str] = None, **kwargs): # pylint: disable=redefined-builtin + def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylint: disable=redefined-builtin """ :keyword id: The private endpoint id. :paramtype id: str @@ -3230,7 +3247,9 @@ class PrivateEndpointConnection(Resource): "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, } - def __init__(self, *, private_link_service_connection_state: "_models.PrivateLinkServiceConnectionState", **kwargs): + def __init__( + self, *, private_link_service_connection_state: "_models.PrivateLinkServiceConnectionState", **kwargs: Any + ) -> None: """ :keyword private_link_service_connection_state: The private link service connection state. Required. @@ -3265,7 +3284,7 @@ class PrivateEndpointConnectionListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.PrivateEndpointConnection"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.PrivateEndpointConnection"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of private endpoint connections. :paramtype value: list[~azure.mgmt.hdinsight.models.PrivateEndpointConnection] @@ -3318,7 +3337,9 @@ class PrivateLinkConfiguration(_serialization.Model): "ip_configurations": {"key": "properties.ipConfigurations", "type": "[IPConfiguration]"}, } - def __init__(self, *, name: str, group_id: str, ip_configurations: List["_models.IPConfiguration"], **kwargs): + def __init__( + self, *, name: str, group_id: str, ip_configurations: List["_models.IPConfiguration"], **kwargs: Any + ) -> None: """ :keyword name: The name of private link configuration. Required. :paramtype name: str @@ -3379,7 +3400,7 @@ class PrivateLinkResource(ResourceAutoGenerated): "required_zone_names": {"key": "properties.requiredZoneNames", "type": "[str]"}, } - def __init__(self, *, required_zone_names: Optional[List[str]] = None, **kwargs): + def __init__(self, *, required_zone_names: Optional[List[str]] = None, **kwargs: Any) -> None: """ :keyword required_zone_names: The private link resource Private link DNS zone name. :paramtype required_zone_names: list[str] @@ -3402,7 +3423,7 @@ class PrivateLinkResourceListResult(_serialization.Model): "value": {"key": "value", "type": "[PrivateLinkResource]"}, } - def __init__(self, *, value: Optional[List["_models.PrivateLinkResource"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.PrivateLinkResource"]] = None, **kwargs: Any) -> None: """ :keyword value: Array of private link resources. :paramtype value: list[~azure.mgmt.hdinsight.models.PrivateLinkResource] @@ -3441,8 +3462,8 @@ def __init__( status: Union[str, "_models.PrivateLinkServiceConnectionStatus"], description: Optional[str] = None, actions_required: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword status: The concrete private link service connection. Required. Known values are: "Approved", "Rejected", "Pending", and "Removed". @@ -3481,8 +3502,8 @@ def __init__( cores_used: Optional[int] = None, max_cores_allowed: Optional[int] = None, regional_quotas: Optional[List["_models.RegionalQuotaCapability"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword cores_used: The number of cores used in the subscription. :paramtype cores_used: int @@ -3508,7 +3529,7 @@ class QuotaInfo(_serialization.Model): "cores_used": {"key": "coresUsed", "type": "int"}, } - def __init__(self, *, cores_used: Optional[int] = None, **kwargs): + def __init__(self, *, cores_used: Optional[int] = None, **kwargs: Any) -> None: """ :keyword cores_used: The cores used by the cluster. :paramtype cores_used: int @@ -3540,8 +3561,8 @@ def __init__( region_name: Optional[str] = None, cores_used: Optional[int] = None, cores_available: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword region_name: The region name. :paramtype region_name: str @@ -3567,7 +3588,7 @@ class RegionsCapability(_serialization.Model): "available": {"key": "available", "type": "[str]"}, } - def __init__(self, *, available: Optional[List[str]] = None, **kwargs): + def __init__(self, *, available: Optional[List[str]] = None, **kwargs: Any) -> None: """ :keyword available: The list of region capabilities. :paramtype available: list[str] @@ -3587,7 +3608,7 @@ class ResourceId(_serialization.Model): "id": {"key": "id", "type": "str"}, } - def __init__(self, *, id: Optional[str] = None, **kwargs): # pylint: disable=redefined-builtin + def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylint: disable=redefined-builtin """ :keyword id: The azure resource id. :paramtype id: str @@ -3651,8 +3672,8 @@ def __init__( data_disks_groups: Optional[List["_models.DataDisksGroups"]] = None, script_actions: Optional[List["_models.ScriptAction"]] = None, encrypt_data_disks: bool = False, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: The name of the role. :paramtype name: str @@ -3725,7 +3746,9 @@ class RuntimeScriptAction(_serialization.Model): "application_name": {"key": "applicationName", "type": "str"}, } - def __init__(self, *, name: str, uri: str, roles: List[str], parameters: Optional[str] = None, **kwargs): + def __init__( + self, *, name: str, uri: str, roles: List[str], parameters: Optional[str] = None, **kwargs: Any + ) -> None: """ :keyword name: The name of the script action. Required. :paramtype name: str @@ -3806,7 +3829,9 @@ class RuntimeScriptActionDetail(RuntimeScriptAction): # pylint: disable=too-man "debug_information": {"key": "debugInformation", "type": "str"}, } - def __init__(self, *, name: str, uri: str, roles: List[str], parameters: Optional[str] = None, **kwargs): + def __init__( + self, *, name: str, uri: str, roles: List[str], parameters: Optional[str] = None, **kwargs: Any + ) -> None: """ :keyword name: The name of the script action. Required. :paramtype name: str @@ -3852,7 +3877,7 @@ class ScriptAction(_serialization.Model): "parameters": {"key": "parameters", "type": "str"}, } - def __init__(self, *, name: str, uri: str, parameters: str, **kwargs): + def __init__(self, *, name: str, uri: str, parameters: str, **kwargs: Any) -> None: """ :keyword name: The name of the script action. Required. :paramtype name: str @@ -3888,7 +3913,7 @@ class ScriptActionExecutionHistoryList(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.value = None @@ -3916,7 +3941,7 @@ class ScriptActionExecutionSummary(_serialization.Model): "instance_count": {"key": "instanceCount", "type": "int"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.status = None @@ -3954,8 +3979,8 @@ def __init__( parameters: Optional[str] = None, roles: Optional[List[str]] = None, application_name: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: The name of script action. :paramtype name: str @@ -3996,7 +4021,7 @@ class ScriptActionsList(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.RuntimeScriptActionDetail"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.RuntimeScriptActionDetail"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of persisted script action details for the cluster. :paramtype value: list[~azure.mgmt.hdinsight.models.RuntimeScriptActionDetail] @@ -4055,8 +4080,8 @@ def __init__( cluster_users_group_d_ns: Optional[List[str]] = None, aadds_resource_id: Optional[str] = None, msi_resource_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword directory_type: The directory type. "ActiveDirectory" :paramtype directory_type: str or ~azure.mgmt.hdinsight.models.DirectoryType @@ -4104,7 +4129,9 @@ class ServiceSpecification(_serialization.Model): "metric_specifications": {"key": "metricSpecifications", "type": "[MetricSpecifications]"}, } - def __init__(self, *, metric_specifications: Optional[List["_models.MetricSpecifications"]] = None, **kwargs): + def __init__( + self, *, metric_specifications: Optional[List["_models.MetricSpecifications"]] = None, **kwargs: Any + ) -> None: """ :keyword metric_specifications: The metric specifications. :paramtype metric_specifications: list[~azure.mgmt.hdinsight.models.MetricSpecifications] @@ -4124,7 +4151,7 @@ class SshProfile(_serialization.Model): "public_keys": {"key": "publicKeys", "type": "[SshPublicKey]"}, } - def __init__(self, *, public_keys: Optional[List["_models.SshPublicKey"]] = None, **kwargs): + def __init__(self, *, public_keys: Optional[List["_models.SshPublicKey"]] = None, **kwargs: Any) -> None: """ :keyword public_keys: The list of SSH public keys. :paramtype public_keys: list[~azure.mgmt.hdinsight.models.SshPublicKey] @@ -4144,7 +4171,7 @@ class SshPublicKey(_serialization.Model): "certificate_data": {"key": "certificateData", "type": "str"}, } - def __init__(self, *, certificate_data: Optional[str] = None, **kwargs): + def __init__(self, *, certificate_data: Optional[str] = None, **kwargs: Any) -> None: """ :keyword certificate_data: The certificate for SSH. :paramtype certificate_data: str @@ -4177,6 +4204,9 @@ class StorageAccount(_serialization.Model): :vartype saskey: str :ivar fileshare: The file share name. :vartype fileshare: str + :ivar enable_secure_channel: Enable secure channel or not, it's an optional field. Default + value is false when cluster version < 5.1 and true when cluster version >= 5.1 ,. + :vartype enable_secure_channel: bool """ _attribute_map = { @@ -4189,6 +4219,7 @@ class StorageAccount(_serialization.Model): "msi_resource_id": {"key": "msiResourceId", "type": "str"}, "saskey": {"key": "saskey", "type": "str"}, "fileshare": {"key": "fileshare", "type": "str"}, + "enable_secure_channel": {"key": "enableSecureChannel", "type": "bool"}, } def __init__( @@ -4203,8 +4234,9 @@ def __init__( msi_resource_id: Optional[str] = None, saskey: Optional[str] = None, fileshare: Optional[str] = None, - **kwargs - ): + enable_secure_channel: Optional[bool] = None, + **kwargs: Any + ) -> None: """ :keyword name: The name of the storage account. :paramtype name: str @@ -4227,6 +4259,9 @@ def __init__( :paramtype saskey: str :keyword fileshare: The file share name. :paramtype fileshare: str + :keyword enable_secure_channel: Enable secure channel or not, it's an optional field. Default + value is false when cluster version < 5.1 and true when cluster version >= 5.1 ,. + :paramtype enable_secure_channel: bool """ super().__init__(**kwargs) self.name = name @@ -4238,6 +4273,7 @@ def __init__( self.msi_resource_id = msi_resource_id self.saskey = saskey self.fileshare = fileshare + self.enable_secure_channel = enable_secure_channel class StorageProfile(_serialization.Model): @@ -4251,7 +4287,7 @@ class StorageProfile(_serialization.Model): "storageaccounts": {"key": "storageaccounts", "type": "[StorageAccount]"}, } - def __init__(self, *, storageaccounts: Optional[List["_models.StorageAccount"]] = None, **kwargs): + def __init__(self, *, storageaccounts: Optional[List["_models.StorageAccount"]] = None, **kwargs: Any) -> None: """ :keyword storageaccounts: The list of storage accounts in the cluster. :paramtype storageaccounts: list[~azure.mgmt.hdinsight.models.StorageAccount] @@ -4297,8 +4333,8 @@ def __init__( last_modified_by: Optional[str] = None, last_modified_by_type: Optional[Union[str, "_models.CreatedByType"]] = None, last_modified_at: Optional[datetime.datetime] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword created_by: The identity that created the resource. :paramtype created_by: str @@ -4347,8 +4383,8 @@ def __init__( application_id: Optional[str] = None, certificate: Optional[str] = None, certificate_password: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword application_id: The application id. :paramtype application_id: str @@ -4387,8 +4423,8 @@ def __init__( is_credential_enabled: bool = True, user_name: Optional[str] = None, password: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword is_credential_enabled: Indicates whether or not the gateway settings based authorization is enabled. @@ -4431,8 +4467,13 @@ class Usage(_serialization.Model): } def __init__( - self, *, unit: Optional[str] = None, current_value: Optional[int] = None, limit: Optional[int] = None, **kwargs - ): + self, + *, + unit: Optional[str] = None, + current_value: Optional[int] = None, + limit: Optional[int] = None, + **kwargs: Any + ) -> None: """ :keyword unit: The type of measurement for usage. :paramtype unit: str @@ -4459,7 +4500,7 @@ class UsagesListResult(_serialization.Model): "value": {"key": "value", "type": "[Usage]"}, } - def __init__(self, *, value: Optional[List["_models.Usage"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.Usage"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of usages. :paramtype value: list[~azure.mgmt.hdinsight.models.Usage] @@ -4492,7 +4533,7 @@ class UserAssignedIdentity(_serialization.Model): "tenant_id": {"key": "tenantId", "type": "str"}, } - def __init__(self, *, tenant_id: Optional[str] = None, **kwargs): + def __init__(self, *, tenant_id: Optional[str] = None, **kwargs: Any) -> None: """ :keyword tenant_id: The tenant id of user assigned identity. :paramtype tenant_id: str @@ -4530,8 +4571,8 @@ def __init__( message: Optional[str] = None, error_resource: Optional[str] = None, message_arguments: Optional[List[str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword code: The error code. :paramtype code: str @@ -4560,7 +4601,7 @@ class VersionsCapability(_serialization.Model): "available": {"key": "available", "type": "[VersionSpec]"}, } - def __init__(self, *, available: Optional[List["_models.VersionSpec"]] = None, **kwargs): + def __init__(self, *, available: Optional[List["_models.VersionSpec"]] = None, **kwargs: Any) -> None: """ :keyword available: The list of version capabilities. :paramtype available: list[~azure.mgmt.hdinsight.models.VersionSpec] @@ -4596,8 +4637,8 @@ def __init__( display_name: Optional[str] = None, is_default: Optional[bool] = None, component_versions: Optional[Dict[str, str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword friendly_name: The friendly name. :paramtype friendly_name: str @@ -4630,8 +4671,12 @@ class VirtualNetworkProfile(_serialization.Model): } def __init__( - self, *, id: Optional[str] = None, subnet: Optional[str] = None, **kwargs # pylint: disable=redefined-builtin - ): + self, + *, + id: Optional[str] = None, # pylint: disable=redefined-builtin + subnet: Optional[str] = None, + **kwargs: Any + ) -> None: """ :keyword id: The ID of the virtual network. :paramtype id: str @@ -4644,7 +4689,11 @@ def __init__( class VmSizeCompatibilityFilterV2(_serialization.Model): - """This class represent a single filter object that defines a multidimensional set. The dimensions of this set are Regions, ClusterFlavors, NodeTypes and ClusterVersions. The constraint should be defined based on the following: FilterMode (Exclude vs Include), VMSizes (the vm sizes in affect of exclusion/inclusion) and the ordering of the Filters. Later filters override previous settings if conflicted. + """This class represent a single filter object that defines a multidimensional set. The dimensions + of this set are Regions, ClusterFlavors, NodeTypes and ClusterVersions. The constraint should + be defined based on the following: FilterMode (Exclude vs Include), VMSizes (the vm sizes in + affect of exclusion/inclusion) and the ordering of the Filters. Later filters override previous + settings if conflicted. :ivar filter_mode: The filtering mode. Effectively this can enabling or disabling the VM sizes in a particular set. Known values are: "Exclude", "Include", "Recommend", and "Default". @@ -4693,8 +4742,8 @@ def __init__( vm_sizes: Optional[List[str]] = None, esp_applied: Optional[str] = None, compute_isolation_supported: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword filter_mode: The filtering mode. Effectively this can enabling or disabling the VM sizes in a particular set. Known values are: "Exclude", "Include", "Recommend", and "Default". @@ -4785,8 +4834,8 @@ def __init__( supported_by_web_worker_roles: Optional[bool] = None, virtual_machine_resource_disk_size_in_mb: Optional[int] = None, web_worker_resource_disk_size_in_mb: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: The vm size name. :paramtype name: str diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/__init__.py b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/__init__.py index ddb7a2fc5c54..56f912c2d179 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/__init__.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/__init__.py @@ -6,34 +6,34 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from ._clusters_operations import ClustersOperations from ._applications_operations import ApplicationsOperations -from ._locations_operations import LocationsOperations +from ._clusters_operations import ClustersOperations from ._configurations_operations import ConfigurationsOperations from ._extensions_operations import ExtensionsOperations -from ._script_actions_operations import ScriptActionsOperations -from ._script_execution_history_operations import ScriptExecutionHistoryOperations +from ._locations_operations import LocationsOperations from ._operations import Operations -from ._virtual_machines_operations import VirtualMachinesOperations from ._private_endpoint_connections_operations import PrivateEndpointConnectionsOperations from ._private_link_resources_operations import PrivateLinkResourcesOperations +from ._script_actions_operations import ScriptActionsOperations +from ._script_execution_history_operations import ScriptExecutionHistoryOperations +from ._virtual_machines_operations import VirtualMachinesOperations from ._patch import __all__ as _patch_all from ._patch import * # pylint: disable=unused-wildcard-import from ._patch import patch_sdk as _patch_sdk __all__ = [ - "ClustersOperations", "ApplicationsOperations", - "LocationsOperations", + "ClustersOperations", "ConfigurationsOperations", "ExtensionsOperations", - "ScriptActionsOperations", - "ScriptExecutionHistoryOperations", + "LocationsOperations", "Operations", - "VirtualMachinesOperations", "PrivateEndpointConnectionsOperations", "PrivateLinkResourcesOperations", + "ScriptActionsOperations", + "ScriptExecutionHistoryOperations", + "VirtualMachinesOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) _patch_sdk() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/_applications_operations.py b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/_applications_operations.py index 154ee6912873..8bb9676b87f8 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/_applications_operations.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/_applications_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload import urllib.parse @@ -32,10 +31,6 @@ from .._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -49,7 +44,7 @@ def build_list_by_cluster_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-15-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -80,7 +75,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-15-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -112,7 +107,7 @@ def build_create_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-15-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -147,7 +142,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-15-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -173,7 +168,7 @@ def build_delete_request( return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_get_azure_async_operation_status_request( +def build_get_azure_async_operation_status_request( # pylint: disable=name-too-long resource_group_name: str, cluster_name: str, application_name: str, @@ -184,7 +179,7 @@ def build_get_azure_async_operation_status_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-15-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -248,9 +243,7 @@ def list_by_cluster( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ApplicationListResult] = kwargs.pop("cls", None) error_map = { @@ -304,8 +297,9 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -350,9 +344,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.Application] = kwargs.pop("cls", None) request = build_get_request( @@ -368,8 +360,9 @@ def get( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -409,9 +402,7 @@ def _create_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.Application] = kwargs.pop("cls", None) @@ -439,8 +430,9 @@ def _create_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -554,7 +546,7 @@ def begin_create( :type cluster_name: str :param application_name: The constant value for the application name. Required. :type application_name: str - :param parameters: The application create request. Is either a model type or a IO type. + :param parameters: The application create request. Is either a Application type or a IO type. Required. :type parameters: ~azure.mgmt.hdinsight.models.Application or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -576,9 +568,7 @@ def begin_create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.Application] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -640,9 +630,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -658,8 +646,9 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -703,9 +692,7 @@ def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -778,9 +765,7 @@ def get_azure_async_operation_status( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.AsyncOperationResult] = kwargs.pop("cls", None) request = build_get_azure_async_operation_status_request( @@ -797,8 +782,9 @@ def get_azure_async_operation_status( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/_clusters_operations.py b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/_clusters_operations.py index 6ffb600d653d..388297cd5e66 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/_clusters_operations.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/_clusters_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload import urllib.parse @@ -32,10 +31,6 @@ from .._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -49,7 +44,7 @@ def build_create_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-15-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -83,7 +78,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-15-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -117,7 +112,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-15-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -146,7 +141,7 @@ def build_get_request(resource_group_name: str, cluster_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-15-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -175,7 +170,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-15-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -209,7 +204,7 @@ def build_resize_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-15-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -238,7 +233,7 @@ def build_resize_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_update_auto_scale_configuration_request( +def build_update_auto_scale_configuration_request( # pylint: disable=name-too-long resource_group_name: str, cluster_name: str, role_name: Union[str, _models.RoleName], @@ -248,7 +243,7 @@ def build_update_auto_scale_configuration_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-15-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -281,7 +276,7 @@ def build_list_request(subscription_id: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-15-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -307,7 +302,7 @@ def build_rotate_disk_encryption_key_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-15-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -341,7 +336,7 @@ def build_get_gateway_settings_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-15-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -372,7 +367,7 @@ def build_update_gateway_settings_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-15-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -400,13 +395,13 @@ def build_update_gateway_settings_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_get_azure_async_operation_status_request( +def build_get_azure_async_operation_status_request( # pylint: disable=name-too-long resource_group_name: str, cluster_name: str, operation_id: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-15-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -432,13 +427,13 @@ def build_get_azure_async_operation_status_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_update_identity_certificate_request( +def build_update_identity_certificate_request( # pylint: disable=name-too-long resource_group_name: str, cluster_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-15-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -472,7 +467,7 @@ def build_execute_script_actions_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-15-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -537,9 +532,7 @@ def _create_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.Cluster] = kwargs.pop("cls", None) @@ -566,8 +559,9 @@ def _create_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -670,7 +664,8 @@ def begin_create( :type resource_group_name: str :param cluster_name: The name of the cluster. Required. :type cluster_name: str - :param parameters: The cluster create request. Is either a model type or a IO type. Required. + :param parameters: The cluster create request. Is either a ClusterCreateParametersExtended type + or a IO type. Required. :type parameters: ~azure.mgmt.hdinsight.models.ClusterCreateParametersExtended or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -690,9 +685,7 @@ def begin_create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.Cluster] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -807,7 +800,8 @@ def update( :type resource_group_name: str :param cluster_name: The name of the cluster. Required. :type cluster_name: str - :param parameters: The cluster patch request. Is either a model type or a IO type. Required. + :param parameters: The cluster patch request. Is either a ClusterPatchParameters type or a IO + type. Required. :type parameters: ~azure.mgmt.hdinsight.models.ClusterPatchParameters or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -828,9 +822,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.Cluster] = kwargs.pop("cls", None) @@ -857,8 +849,9 @@ def update( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -893,9 +886,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -910,8 +901,9 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -951,9 +943,7 @@ def begin_delete(self, resource_group_name: str, cluster_name: str, **kwargs: An _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -1019,9 +1009,7 @@ def get(self, resource_group_name: str, cluster_name: str, **kwargs: Any) -> _mo _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.Cluster] = kwargs.pop("cls", None) request = build_get_request( @@ -1036,8 +1024,9 @@ def get(self, resource_group_name: str, cluster_name: str, **kwargs: Any) -> _mo request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -1072,9 +1061,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ClusterListResult] = kwargs.pop("cls", None) error_map = { @@ -1127,8 +1114,9 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -1164,9 +1152,7 @@ def _resize_initial( # pylint: disable=inconsistent-return-statements _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) @@ -1194,8 +1180,9 @@ def _resize_initial( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -1303,8 +1290,8 @@ def begin_resize( :type cluster_name: str :param role_name: The constant value for the roleName. "workernode" Required. :type role_name: str or ~azure.mgmt.hdinsight.models.RoleName - :param parameters: The parameters for the resize operation. Is either a model type or a IO - type. Required. + :param parameters: The parameters for the resize operation. Is either a ClusterResizeParameters + type or a IO type. Required. :type parameters: ~azure.mgmt.hdinsight.models.ClusterResizeParameters or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1324,9 +1311,7 @@ def begin_resize( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -1391,9 +1376,7 @@ def _update_auto_scale_configuration_initial( # pylint: disable=inconsistent-re _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) @@ -1421,8 +1404,9 @@ def _update_auto_scale_configuration_initial( # pylint: disable=inconsistent-re request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -1531,7 +1515,7 @@ def begin_update_auto_scale_configuration( :param role_name: The constant value for the roleName. "workernode" Required. :type role_name: str or ~azure.mgmt.hdinsight.models.RoleName :param parameters: The parameters for the update autoscale configuration operation. Is either a - model type or a IO type. Required. + AutoscaleConfigurationUpdateParameter type or a IO type. Required. :type parameters: ~azure.mgmt.hdinsight.models.AutoscaleConfigurationUpdateParameter or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1551,9 +1535,7 @@ def begin_update_auto_scale_configuration( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -1611,9 +1593,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Cluster"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ClusterListResult] = kwargs.pop("cls", None) error_map = { @@ -1665,8 +1645,9 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -1699,9 +1680,7 @@ def _rotate_disk_encryption_key_initial( # pylint: disable=inconsistent-return- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) @@ -1728,8 +1707,9 @@ def _rotate_disk_encryption_key_initial( # pylint: disable=inconsistent-return- request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -1828,8 +1808,8 @@ def begin_rotate_disk_encryption_key( :type resource_group_name: str :param cluster_name: The name of the cluster. Required. :type cluster_name: str - :param parameters: The parameters for the disk encryption operation. Is either a model type or - a IO type. Required. + :param parameters: The parameters for the disk encryption operation. Is either a + ClusterDiskEncryptionParameters type or a IO type. Required. :type parameters: ~azure.mgmt.hdinsight.models.ClusterDiskEncryptionParameters or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1849,9 +1829,7 @@ def begin_rotate_disk_encryption_key( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -1922,9 +1900,7 @@ def get_gateway_settings( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.GatewaySettings] = kwargs.pop("cls", None) request = build_get_gateway_settings_request( @@ -1939,8 +1915,9 @@ def get_gateway_settings( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -1979,9 +1956,7 @@ def _update_gateway_settings_initial( # pylint: disable=inconsistent-return-sta _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) @@ -2008,8 +1983,9 @@ def _update_gateway_settings_initial( # pylint: disable=inconsistent-return-sta request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -2108,7 +2084,8 @@ def begin_update_gateway_settings( :type resource_group_name: str :param cluster_name: The name of the cluster. Required. :type cluster_name: str - :param parameters: The cluster configurations. Is either a model type or a IO type. Required. + :param parameters: The cluster configurations. Is either a UpdateGatewaySettingsParameters type + or a IO type. Required. :type parameters: ~azure.mgmt.hdinsight.models.UpdateGatewaySettingsParameters or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -2128,9 +2105,7 @@ def begin_update_gateway_settings( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -2203,9 +2178,7 @@ def get_azure_async_operation_status( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.AsyncOperationResult] = kwargs.pop("cls", None) request = build_get_azure_async_operation_status_request( @@ -2221,8 +2194,9 @@ def get_azure_async_operation_status( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -2261,9 +2235,7 @@ def _update_identity_certificate_initial( # pylint: disable=inconsistent-return _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) @@ -2290,8 +2262,9 @@ def _update_identity_certificate_initial( # pylint: disable=inconsistent-return request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -2390,7 +2363,8 @@ def begin_update_identity_certificate( :type resource_group_name: str :param cluster_name: The name of the cluster. Required. :type cluster_name: str - :param parameters: The cluster configurations. Is either a model type or a IO type. Required. + :param parameters: The cluster configurations. Is either a + UpdateClusterIdentityCertificateParameters type or a IO type. Required. :type parameters: ~azure.mgmt.hdinsight.models.UpdateClusterIdentityCertificateParameters or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -2410,9 +2384,7 @@ def begin_update_identity_certificate( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -2475,9 +2447,7 @@ def _execute_script_actions_initial( # pylint: disable=inconsistent-return-stat _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) @@ -2504,8 +2474,9 @@ def _execute_script_actions_initial( # pylint: disable=inconsistent-return-stat request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -2604,8 +2575,8 @@ def begin_execute_script_actions( :type resource_group_name: str :param cluster_name: The name of the cluster. Required. :type cluster_name: str - :param parameters: The parameters for executing script actions. Is either a model type or a IO - type. Required. + :param parameters: The parameters for executing script actions. Is either a + ExecuteScriptActionParameters type or a IO type. Required. :type parameters: ~azure.mgmt.hdinsight.models.ExecuteScriptActionParameters or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -2625,9 +2596,7 @@ def begin_execute_script_actions( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/_configurations_operations.py b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/_configurations_operations.py index b2af5f9c45fd..d134edc0a200 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/_configurations_operations.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/_configurations_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload from azure.core.exceptions import ( @@ -30,10 +29,6 @@ from .._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -45,7 +40,7 @@ def build_list_request(resource_group_name: str, cluster_name: str, subscription _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-15-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -76,7 +71,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-15-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -111,7 +106,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-15-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -180,9 +175,7 @@ def list(self, resource_group_name: str, cluster_name: str, **kwargs: Any) -> _m _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ClusterConfigurations] = kwargs.pop("cls", None) request = build_list_request( @@ -197,8 +190,9 @@ def list(self, resource_group_name: str, cluster_name: str, **kwargs: Any) -> _m request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -238,9 +232,7 @@ def _update_initial( # pylint: disable=inconsistent-return-statements _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) @@ -268,8 +260,9 @@ def _update_initial( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -380,7 +373,8 @@ def begin_update( :type cluster_name: str :param configuration_name: The name of the cluster configuration. Required. :type configuration_name: str - :param parameters: The cluster configurations. Is either a dict type or a IO type. Required. + :param parameters: The cluster configurations. Is either a {str: str} type or a IO type. + Required. :type parameters: dict[str, str] or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -400,9 +394,7 @@ def begin_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -477,9 +469,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[Dict[str, str]] = kwargs.pop("cls", None) request = build_get_request( @@ -495,8 +485,9 @@ def get( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/_extensions_operations.py b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/_extensions_operations.py index a7d2ada00829..b5f880f9d183 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/_extensions_operations.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/_extensions_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload from azure.core.exceptions import ( @@ -30,10 +29,6 @@ from .._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -47,7 +42,7 @@ def build_enable_monitoring_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-15-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -81,7 +76,7 @@ def build_get_monitoring_status_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-15-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -112,7 +107,7 @@ def build_disable_monitoring_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-15-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -143,7 +138,7 @@ def build_enable_azure_monitor_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-15-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -177,7 +172,7 @@ def build_get_azure_monitor_status_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-15-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -208,7 +203,7 @@ def build_disable_azure_monitor_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-15-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -239,7 +234,7 @@ def build_create_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-15-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -274,7 +269,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-15-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -306,7 +301,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-15-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -332,7 +327,7 @@ def build_delete_request( return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_get_azure_async_operation_status_request( +def build_get_azure_async_operation_status_request( # pylint: disable=name-too-long resource_group_name: str, cluster_name: str, extension_name: str, @@ -343,7 +338,7 @@ def build_get_azure_async_operation_status_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-15-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -407,9 +402,7 @@ def _enable_monitoring_initial( # pylint: disable=inconsistent-return-statement _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) @@ -436,8 +429,9 @@ def _enable_monitoring_initial( # pylint: disable=inconsistent-return-statement request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -537,7 +531,7 @@ def begin_enable_monitoring( :param cluster_name: The name of the cluster. Required. :type cluster_name: str :param parameters: The Operations Management Suite (OMS) workspace parameters. Is either a - model type or a IO type. Required. + ClusterMonitoringRequest type or a IO type. Required. :type parameters: ~azure.mgmt.hdinsight.models.ClusterMonitoringRequest or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -557,9 +551,7 @@ def begin_enable_monitoring( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -630,9 +622,7 @@ def get_monitoring_status( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ClusterMonitoringResponse] = kwargs.pop("cls", None) request = build_get_monitoring_status_request( @@ -647,8 +637,9 @@ def get_monitoring_status( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -683,9 +674,7 @@ def _disable_monitoring_initial( # pylint: disable=inconsistent-return-statemen _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) request = build_disable_monitoring_request( @@ -700,8 +689,9 @@ def _disable_monitoring_initial( # pylint: disable=inconsistent-return-statemen request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -741,9 +731,7 @@ def begin_disable_monitoring(self, resource_group_name: str, cluster_name: str, _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -803,9 +791,7 @@ def _enable_azure_monitor_initial( # pylint: disable=inconsistent-return-statem _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) @@ -832,8 +818,9 @@ def _enable_azure_monitor_initial( # pylint: disable=inconsistent-return-statem request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -932,8 +919,8 @@ def begin_enable_azure_monitor( :type resource_group_name: str :param cluster_name: The name of the cluster. Required. :type cluster_name: str - :param parameters: The Log Analytics workspace parameters. Is either a model type or a IO type. - Required. + :param parameters: The Log Analytics workspace parameters. Is either a AzureMonitorRequest type + or a IO type. Required. :type parameters: ~azure.mgmt.hdinsight.models.AzureMonitorRequest or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -953,9 +940,7 @@ def begin_enable_azure_monitor( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -1026,9 +1011,7 @@ def get_azure_monitor_status( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.AzureMonitorResponse] = kwargs.pop("cls", None) request = build_get_azure_monitor_status_request( @@ -1043,8 +1026,9 @@ def get_azure_monitor_status( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -1079,9 +1063,7 @@ def _disable_azure_monitor_initial( # pylint: disable=inconsistent-return-state _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) request = build_disable_azure_monitor_request( @@ -1096,8 +1078,9 @@ def _disable_azure_monitor_initial( # pylint: disable=inconsistent-return-state request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -1139,9 +1122,7 @@ def begin_disable_azure_monitor( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -1202,9 +1183,7 @@ def _create_initial( # pylint: disable=inconsistent-return-statements _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) @@ -1232,8 +1211,9 @@ def _create_initial( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -1341,8 +1321,8 @@ def begin_create( :type cluster_name: str :param extension_name: The name of the cluster extension. Required. :type extension_name: str - :param parameters: The cluster extensions create request. Is either a model type or a IO type. - Required. + :param parameters: The cluster extensions create request. Is either a Extension type or a IO + type. Required. :type parameters: ~azure.mgmt.hdinsight.models.Extension or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1362,9 +1342,7 @@ def begin_create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -1438,9 +1416,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ClusterMonitoringResponse] = kwargs.pop("cls", None) request = build_get_request( @@ -1456,8 +1432,9 @@ def get( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -1492,9 +1469,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -1510,8 +1485,9 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -1555,9 +1531,7 @@ def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -1630,9 +1604,7 @@ def get_azure_async_operation_status( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.AsyncOperationResult] = kwargs.pop("cls", None) request = build_get_azure_async_operation_status_request( @@ -1649,8 +1621,9 @@ def get_azure_async_operation_status( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/_locations_operations.py b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/_locations_operations.py index 6b777bf2579e..b39adbbd1e6e 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/_locations_operations.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/_locations_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( @@ -28,10 +27,6 @@ from .._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -43,7 +38,7 @@ def build_get_capabilities_request(location: str, subscription_id: str, **kwargs _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-15-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -71,7 +66,7 @@ def build_list_usages_request(location: str, subscription_id: str, **kwargs: Any _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-15-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -98,7 +93,7 @@ def build_list_billing_specs_request(location: str, subscription_id: str, **kwar _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-15-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -122,13 +117,13 @@ def build_list_billing_specs_request(location: str, subscription_id: str, **kwar return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_get_azure_async_operation_status_request( +def build_get_azure_async_operation_status_request( # pylint: disable=name-too-long location: str, operation_id: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-15-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -157,7 +152,7 @@ def build_check_name_availability_request(location: str, subscription_id: str, * _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-15-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -184,11 +179,13 @@ def build_check_name_availability_request(location: str, subscription_id: str, * return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_validate_cluster_create_request_request(location: str, subscription_id: str, **kwargs: Any) -> HttpRequest: +def build_validate_cluster_create_request_request( # pylint: disable=name-too-long + location: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-15-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -256,9 +253,7 @@ def get_capabilities(self, location: str, **kwargs: Any) -> _models.Capabilities _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.CapabilitiesResult] = kwargs.pop("cls", None) request = build_get_capabilities_request( @@ -272,8 +267,9 @@ def get_capabilities(self, location: str, **kwargs: Any) -> _models.Capabilities request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -316,9 +312,7 @@ def list_usages(self, location: str, **kwargs: Any) -> _models.UsagesListResult: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.UsagesListResult] = kwargs.pop("cls", None) request = build_list_usages_request( @@ -332,8 +326,9 @@ def list_usages(self, location: str, **kwargs: Any) -> _models.UsagesListResult: request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -376,9 +371,7 @@ def list_billing_specs(self, location: str, **kwargs: Any) -> _models.BillingRes _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.BillingResponseListResult] = kwargs.pop("cls", None) request = build_list_billing_specs_request( @@ -392,8 +385,9 @@ def list_billing_specs(self, location: str, **kwargs: Any) -> _models.BillingRes request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -440,9 +434,7 @@ def get_azure_async_operation_status( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.AsyncOperationResult] = kwargs.pop("cls", None) request = build_get_azure_async_operation_status_request( @@ -457,8 +449,9 @@ def get_azure_async_operation_status( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -530,7 +523,8 @@ def check_name_availability( :param location: The Azure location (region) for which to make the request. Required. :type location: str - :param parameters: Is either a model type or a IO type. Required. + :param parameters: Is either a NameAvailabilityCheckRequestParameters type or a IO type. + Required. :type parameters: ~azure.mgmt.hdinsight.models.NameAvailabilityCheckRequestParameters or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -551,9 +545,7 @@ def check_name_availability( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.NameAvailabilityCheckResult] = kwargs.pop("cls", None) @@ -579,8 +571,9 @@ def check_name_availability( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -652,7 +645,8 @@ def validate_cluster_create_request( :param location: The Azure location (region) for which to make the request. Required. :type location: str - :param parameters: Is either a model type or a IO type. Required. + :param parameters: Is either a ClusterCreateRequestValidationParameters type or a IO type. + Required. :type parameters: ~azure.mgmt.hdinsight.models.ClusterCreateRequestValidationParameters or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -673,9 +667,7 @@ def validate_cluster_create_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ClusterCreateValidationResult] = kwargs.pop("cls", None) @@ -701,8 +693,9 @@ def validate_cluster_create_request( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/_operations.py b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/_operations.py index 7a615538078f..233944e34b96 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/_operations.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, Iterable, Optional, TypeVar import urllib.parse @@ -30,10 +29,6 @@ from .._serialization import Serializer from .._vendor import _convert_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -45,7 +40,7 @@ def build_list_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-15-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -91,9 +86,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Operation"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) error_map = { @@ -144,8 +137,9 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/_private_endpoint_connections_operations.py b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/_private_endpoint_connections_operations.py index 23ed4fa14d98..78796955f87a 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/_private_endpoint_connections_operations.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/_private_endpoint_connections_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload import urllib.parse @@ -32,10 +31,6 @@ from .._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -49,7 +44,7 @@ def build_list_by_cluster_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-15-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -84,7 +79,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-15-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -125,7 +120,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-15-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -163,7 +158,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-15-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -229,9 +224,7 @@ def list_by_cluster( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.PrivateEndpointConnectionListResult] = kwargs.pop("cls", None) error_map = { @@ -285,8 +278,9 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -322,9 +316,7 @@ def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PrivateEndpointConnection] = kwargs.pop("cls", None) @@ -352,8 +344,9 @@ def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -471,8 +464,8 @@ def begin_create_or_update( :type cluster_name: str :param private_endpoint_connection_name: The name of the private endpoint connection. Required. :type private_endpoint_connection_name: str - :param parameters: The private endpoint connection create or update request. Is either a model - type or a IO type. Required. + :param parameters: The private endpoint connection create or update request. Is either a + PrivateEndpointConnection type or a IO type. Required. :type parameters: ~azure.mgmt.hdinsight.models.PrivateEndpointConnection or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -493,9 +486,7 @@ def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PrivateEndpointConnection] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -571,9 +562,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.PrivateEndpointConnection] = kwargs.pop("cls", None) request = build_get_request( @@ -589,8 +578,9 @@ def get( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -625,9 +615,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -643,8 +631,9 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -688,9 +677,7 @@ def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/_private_link_resources_operations.py b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/_private_link_resources_operations.py index 5038dd518d00..ef1f9906bc50 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/_private_link_resources_operations.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/_private_link_resources_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( @@ -28,10 +27,6 @@ from .._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -45,7 +40,7 @@ def build_list_by_cluster_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-15-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -76,7 +71,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-15-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -147,9 +142,7 @@ def list_by_cluster( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.PrivateLinkResourceListResult] = kwargs.pop("cls", None) request = build_list_by_cluster_request( @@ -164,8 +157,9 @@ def list_by_cluster( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -214,9 +208,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.PrivateLinkResource] = kwargs.pop("cls", None) request = build_get_request( @@ -232,8 +224,9 @@ def get( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/_script_actions_operations.py b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/_script_actions_operations.py index cebac5807794..8c48a99d912c 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/_script_actions_operations.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/_script_actions_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, Iterable, Optional, TypeVar import urllib.parse @@ -30,10 +29,6 @@ from .._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -47,7 +42,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-15-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -79,7 +74,7 @@ def build_list_by_cluster_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-15-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -110,7 +105,7 @@ def build_get_execution_detail_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-15-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -136,13 +131,13 @@ def build_get_execution_detail_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_get_execution_async_operation_status_request( +def build_get_execution_async_operation_status_request( # pylint: disable=name-too-long resource_group_name: str, cluster_name: str, operation_id: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-15-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -215,9 +210,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -233,8 +226,9 @@ def delete( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -270,9 +264,7 @@ def list_by_cluster( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ScriptActionsList] = kwargs.pop("cls", None) error_map = { @@ -326,8 +318,9 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -372,9 +365,7 @@ def get_execution_detail( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.RuntimeScriptActionDetail] = kwargs.pop("cls", None) request = build_get_execution_detail_request( @@ -390,8 +381,9 @@ def get_execution_detail( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -440,9 +432,7 @@ def get_execution_async_operation_status( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.AsyncOperationResult] = kwargs.pop("cls", None) request = build_get_execution_async_operation_status_request( @@ -458,8 +448,9 @@ def get_execution_async_operation_status( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/_script_execution_history_operations.py b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/_script_execution_history_operations.py index 1a5d28cc8f1a..7e76a1f0d12a 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/_script_execution_history_operations.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/_script_execution_history_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, Iterable, Optional, TypeVar import urllib.parse @@ -30,10 +29,6 @@ from .._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -47,7 +42,7 @@ def build_list_by_cluster_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-15-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -78,7 +73,7 @@ def build_promote_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-15-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -142,9 +137,7 @@ def list_by_cluster( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ScriptActionExecutionHistoryList] = kwargs.pop("cls", None) error_map = { @@ -198,8 +191,9 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -244,9 +238,7 @@ def promote( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) request = build_promote_request( @@ -262,8 +254,9 @@ def promote( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/_virtual_machines_operations.py b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/_virtual_machines_operations.py index f6a6222e550c..116185e7cc59 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/_virtual_machines_operations.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/_virtual_machines_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, List, Optional, TypeVar, Union, cast, overload from azure.core.exceptions import ( @@ -30,10 +29,6 @@ from .._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -47,7 +42,7 @@ def build_list_hosts_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-15-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -78,7 +73,7 @@ def build_restart_hosts_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-15-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -112,7 +107,7 @@ def build_get_async_operation_status_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-15-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -181,9 +176,7 @@ def list_hosts(self, resource_group_name: str, cluster_name: str, **kwargs: Any) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[List[_models.HostInfo]] = kwargs.pop("cls", None) request = build_list_hosts_request( @@ -198,8 +191,9 @@ def list_hosts(self, resource_group_name: str, cluster_name: str, **kwargs: Any) request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -234,9 +228,7 @@ def _restart_hosts_initial( # pylint: disable=inconsistent-return-statements _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) @@ -263,8 +255,9 @@ def _restart_hosts_initial( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -359,7 +352,7 @@ def begin_restart_hosts( :type resource_group_name: str :param cluster_name: The name of the cluster. Required. :type cluster_name: str - :param hosts: The list of hosts to restart. Is either a list type or a IO type. Required. + :param hosts: The list of hosts to restart. Is either a [str] type or a IO type. Required. :type hosts: list[str] or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -379,9 +372,7 @@ def begin_restart_hosts( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -454,9 +445,7 @@ def get_async_operation_status( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.AsyncOperationResult] = kwargs.pop("cls", None) request = build_get_async_operation_status_request( @@ -472,8 +461,9 @@ def get_async_operation_status( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/approve_private_endpoint_connection.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/approve_private_endpoint_connection.py index 43bed31c5a2c..e053be438857 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/approve_private_endpoint_connection.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/approve_private_endpoint_connection.py @@ -46,6 +46,6 @@ def main(): print(response) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/ApprovePrivateEndpointConnection.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/ApprovePrivateEndpointConnection.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/change_http_connectivity_disable.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/change_http_connectivity_disable.py index 37af693b7dad..42c6f8b35e27 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/change_http_connectivity_disable.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/change_http_connectivity_disable.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/ChangeHttpConnectivityDisable.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/ChangeHttpConnectivityDisable.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/change_http_connectivity_enable.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/change_http_connectivity_enable.py index 6f540f4f0f3f..1bb936e6f8b3 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/change_http_connectivity_enable.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/change_http_connectivity_enable.py @@ -42,6 +42,6 @@ def main(): print(response) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/ChangeHttpConnectivityEnable.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/ChangeHttpConnectivityEnable.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_application.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_application.py index 5d9c25a34e37..3ea68203b5bb 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_application.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_application.py @@ -58,6 +58,6 @@ def main(): print(response) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/CreateApplication.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/CreateApplication.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_extension.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_extension.py index 5723b1fac2ca..f63399cd87e4 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_extension.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_extension.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/CreateExtension.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/CreateExtension.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_hd_insight_cluster_with_autoscale_config.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_hd_insight_cluster_with_autoscale_config.py index cc73f7a072a4..9dd8cdf752e2 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_hd_insight_cluster_with_autoscale_config.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_hd_insight_cluster_with_autoscale_config.py @@ -106,6 +106,7 @@ def main(): "storageaccounts": [ { "container": "hdinsight-autoscale-tes-2019-06-18t05-49-16-591z", + "enableSecureChannel": True, "isDefault": True, "key": "storagekey", "name": "mystorage.blob.core.windows.net", @@ -119,6 +120,6 @@ def main(): print(response) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/CreateHDInsightClusterWithAutoscaleConfig.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/CreateHDInsightClusterWithAutoscaleConfig.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_hd_insight_cluster_with_availability_zones.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_hd_insight_cluster_with_availability_zones.py index a740fe3f9248..8beea4938732 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_hd_insight_cluster_with_availability_zones.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_hd_insight_cluster_with_availability_zones.py @@ -121,6 +121,7 @@ def main(): "storageaccounts": [ { "container": "containername", + "enableSecureChannel": True, "isDefault": True, "key": "storage account key", "name": "mystorage", @@ -134,6 +135,6 @@ def main(): print(response) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/CreateHDInsightClusterWithAvailabilityZones.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/CreateHDInsightClusterWithAvailabilityZones.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_hd_insight_cluster_with_compute_isolation_properties.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_hd_insight_cluster_with_compute_isolation_properties.py index 2471fa93e191..dc367b2ee5df 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_hd_insight_cluster_with_compute_isolation_properties.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_hd_insight_cluster_with_compute_isolation_properties.py @@ -79,6 +79,7 @@ def main(): "storageaccounts": [ { "container": "containername", + "enableSecureChannel": True, "isDefault": True, "key": "storage account key", "name": "mystorage", @@ -91,6 +92,6 @@ def main(): print(response) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/CreateHDInsightClusterWithComputeIsolationProperties.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/CreateHDInsightClusterWithComputeIsolationProperties.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_hd_insight_cluster_with_custom_network_properties.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_hd_insight_cluster_with_custom_network_properties.py index d50c5bd508c8..0b6af2c85a65 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_hd_insight_cluster_with_custom_network_properties.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_hd_insight_cluster_with_custom_network_properties.py @@ -87,6 +87,7 @@ def main(): "storageaccounts": [ { "container": "containername", + "enableSecureChannel": True, "isDefault": True, "key": "storage account key", "name": "mystorage", @@ -99,6 +100,6 @@ def main(): print(response) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/CreateHDInsightClusterWithCustomNetworkProperties.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/CreateHDInsightClusterWithCustomNetworkProperties.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_hd_insight_cluster_with_encryption_at_host.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_hd_insight_cluster_with_encryption_at_host.py index 89c6fb5d921d..e5bea5d0f45b 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_hd_insight_cluster_with_encryption_at_host.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_hd_insight_cluster_with_encryption_at_host.py @@ -79,6 +79,7 @@ def main(): "storageaccounts": [ { "container": "default8525", + "enableSecureChannel": True, "isDefault": True, "key": "storagekey", "name": "mystorage.blob.core.windows.net", @@ -92,6 +93,6 @@ def main(): print(response) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/CreateHDInsightClusterWithEncryptionAtHost.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/CreateHDInsightClusterWithEncryptionAtHost.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_hd_insight_cluster_with_encryption_in_transit.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_hd_insight_cluster_with_encryption_in_transit.py index 757af4b7eebe..1e7e9ca58b98 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_hd_insight_cluster_with_encryption_in_transit.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_hd_insight_cluster_with_encryption_in_transit.py @@ -79,6 +79,7 @@ def main(): "storageaccounts": [ { "container": "default8525", + "enableSecureChannel": True, "isDefault": True, "key": "storagekey", "name": "mystorage.blob.core.windows.net", @@ -92,6 +93,6 @@ def main(): print(response) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/CreateHDInsightClusterWithEncryptionInTransit.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/CreateHDInsightClusterWithEncryptionInTransit.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_hd_insight_cluster_with_tls12.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_hd_insight_cluster_with_tls12.py index d6d79ff73a4f..091a270a1f14 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_hd_insight_cluster_with_tls12.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_hd_insight_cluster_with_tls12.py @@ -79,6 +79,7 @@ def main(): "storageaccounts": [ { "container": "default8525", + "enableSecureChannel": True, "isDefault": True, "key": "storagekey", "name": "mystorage.blob.core.windows.net", @@ -92,6 +93,6 @@ def main(): print(response) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/CreateHDInsightClusterWithTLS12.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/CreateHDInsightClusterWithTLS12.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_kafka_cluster_with_kafka_rest_proxy.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_kafka_cluster_with_kafka_rest_proxy.py index 590f84df8dbe..05751be2eac9 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_kafka_cluster_with_kafka_rest_proxy.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_kafka_cluster_with_kafka_rest_proxy.py @@ -94,6 +94,7 @@ def main(): "storageaccounts": [ { "container": "containername", + "enableSecureChannel": True, "isDefault": True, "key": "storagekey", "name": "mystorage.blob.core.windows.net", @@ -107,6 +108,6 @@ def main(): print(response) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/CreateKafkaClusterWithKafkaRestProxy.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/CreateKafkaClusterWithKafkaRestProxy.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_linux_hadoop_adls_gen2.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_linux_hadoop_adls_gen2.py index 08c7c7b134d1..d04e5a6d315d 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_linux_hadoop_adls_gen2.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_linux_hadoop_adls_gen2.py @@ -80,6 +80,7 @@ def main(): "storageProfile": { "storageaccounts": [ { + "enableSecureChannel": True, "fileSystem": "default", "isDefault": True, "key": "storagekey", @@ -95,6 +96,6 @@ def main(): print(response) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/CreateLinuxHadoopAdlsGen2.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/CreateLinuxHadoopAdlsGen2.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_linux_hadoop_secure_hadoop.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_linux_hadoop_secure_hadoop.py index 02b7bdf5b505..29ec96b38652 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_linux_hadoop_secure_hadoop.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_linux_hadoop_secure_hadoop.py @@ -117,6 +117,7 @@ def main(): "storageaccounts": [ { "container": "containername", + "enableSecureChannel": True, "isDefault": True, "key": "storage account key", "name": "mystorage.blob.core.windows.net", @@ -131,6 +132,6 @@ def main(): print(response) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/CreateLinuxHadoopSecureHadoop.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/CreateLinuxHadoopSecureHadoop.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_linux_hadoop_ssh_password.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_linux_hadoop_ssh_password.py index a2b68526642d..877687e424e6 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_linux_hadoop_ssh_password.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_linux_hadoop_ssh_password.py @@ -81,6 +81,7 @@ def main(): "storageaccounts": [ { "container": "containername", + "enableSecureChannel": True, "isDefault": True, "key": "storagekey", "name": "mystorage.blob.core.windows.net", @@ -95,6 +96,6 @@ def main(): print(response) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/CreateLinuxHadoopSshPassword.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/CreateLinuxHadoopSshPassword.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_linux_hadoop_ssh_public_key.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_linux_hadoop_ssh_public_key.py index 8dd8799b2cce..9dd724490d11 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_linux_hadoop_ssh_public_key.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_linux_hadoop_ssh_public_key.py @@ -84,6 +84,7 @@ def main(): "storageaccounts": [ { "container": "containername", + "enableSecureChannel": True, "isDefault": True, "key": "storagekey", "name": "mystorage.blob.core.windows.net", @@ -98,6 +99,6 @@ def main(): print(response) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/CreateLinuxHadoopSshPublicKey.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/CreateLinuxHadoopSshPublicKey.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_linux_spark_ssh_password.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_linux_spark_ssh_password.py index 4eb4afa7f240..bc9a4c799837 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_linux_spark_ssh_password.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_linux_spark_ssh_password.py @@ -73,6 +73,7 @@ def main(): "storageaccounts": [ { "container": "containername", + "enableSecureChannel": True, "isDefault": True, "key": "storageapikey*", "name": "mystorage.blob.core.windows.net", @@ -87,6 +88,6 @@ def main(): print(response) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/CreateLinuxSparkSshPassword.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/CreateLinuxSparkSshPassword.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/delete_application.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/delete_application.py index 404738421828..6aac695dc3ae 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/delete_application.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/delete_application.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/DeleteApplication.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/DeleteApplication.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/delete_extension.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/delete_extension.py index 8401a35293e4..aaa35d309bc8 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/delete_extension.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/delete_extension.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/DeleteExtension.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/DeleteExtension.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/delete_linux_hadoop_cluster.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/delete_linux_hadoop_cluster.py index faf192941ed0..98d0138d6ed9 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/delete_linux_hadoop_cluster.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/delete_linux_hadoop_cluster.py @@ -36,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/DeleteLinuxHadoopCluster.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/DeleteLinuxHadoopCluster.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/delete_private_endpoint_connection.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/delete_private_endpoint_connection.py index 13adc86280e8..bad338f6bd2b 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/delete_private_endpoint_connection.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/delete_private_endpoint_connection.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/DeletePrivateEndpointConnection.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/DeletePrivateEndpointConnection.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/delete_script_action.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/delete_script_action.py index 4121e2c0e7eb..08d1ff6994d1 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/delete_script_action.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/delete_script_action.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/DeleteScriptAction.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/DeleteScriptAction.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/disable_linux_cluster_azure_monitor.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/disable_linux_cluster_azure_monitor.py index 01a6d2df0d2b..26ac941942c9 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/disable_linux_cluster_azure_monitor.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/disable_linux_cluster_azure_monitor.py @@ -36,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/DisableLinuxClusterAzureMonitor.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/DisableLinuxClusterAzureMonitor.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/disable_linux_cluster_monitoring.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/disable_linux_cluster_monitoring.py index c2a71f4d6a3b..8b028125c0f3 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/disable_linux_cluster_monitoring.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/disable_linux_cluster_monitoring.py @@ -36,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/DisableLinuxClusterMonitoring.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/DisableLinuxClusterMonitoring.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/enable_linux_cluster_azure_monitor.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/enable_linux_cluster_azure_monitor.py index be9351f0272f..24852e7a2b19 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/enable_linux_cluster_azure_monitor.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/enable_linux_cluster_azure_monitor.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/EnableLinuxClusterAzureMonitor.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/EnableLinuxClusterAzureMonitor.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/enable_linux_cluster_monitoring.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/enable_linux_cluster_monitoring.py index 7842eb7e92c5..27701e1db0ed 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/enable_linux_cluster_monitoring.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/enable_linux_cluster_monitoring.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/EnableLinuxClusterMonitoring.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/EnableLinuxClusterMonitoring.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/enable_or_update_auto_scale_with_load_based_configuration.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/enable_or_update_auto_scale_with_load_based_configuration.py index 4f19cdc29383..2b68b50c6d33 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/enable_or_update_auto_scale_with_load_based_configuration.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/enable_or_update_auto_scale_with_load_based_configuration.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/EnableOrUpdateAutoScaleWithLoadBasedConfiguration.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/EnableOrUpdateAutoScaleWithLoadBasedConfiguration.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/enable_or_update_auto_scale_with_schedule_based_configuration.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/enable_or_update_auto_scale_with_schedule_based_configuration.py index a39bd7a92765..52ee705d75df 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/enable_or_update_auto_scale_with_schedule_based_configuration.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/enable_or_update_auto_scale_with_schedule_based_configuration.py @@ -50,6 +50,6 @@ def main(): print(response) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/EnableOrUpdateAutoScaleWithScheduleBasedConfiguration.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/EnableOrUpdateAutoScaleWithScheduleBasedConfiguration.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_all_applications.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_all_applications.py index a3161cd4df7d..70c94754a21a 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_all_applications.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_all_applications.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetAllApplications.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetAllApplications.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_all_private_endpoint_connections_in_cluster.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_all_private_endpoint_connections_in_cluster.py index 9bee9d2b8671..27805f5509ef 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_all_private_endpoint_connections_in_cluster.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_all_private_endpoint_connections_in_cluster.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetAllPrivateEndpointConnectionsInCluster.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetAllPrivateEndpointConnectionsInCluster.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_all_private_link_resources_in_cluster.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_all_private_link_resources_in_cluster.py index af020cce3006..ce65c9f85eb6 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_all_private_link_resources_in_cluster.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_all_private_link_resources_in_cluster.py @@ -36,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetAllPrivateLinkResourcesInCluster.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetAllPrivateLinkResourcesInCluster.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_application_created.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_application_created.py index 0dfc63d22198..6939b0e4ac47 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_application_created.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_application_created.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetApplicationCreated.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetApplicationCreated.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_application_creation_async_operation_status.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_application_creation_async_operation_status.py index 2200c0f39cf3..75087f8f0aab 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_application_creation_async_operation_status.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_application_creation_async_operation_status.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetApplicationCreationAsyncOperationStatus.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetApplicationCreationAsyncOperationStatus.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_application_in_progress.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_application_in_progress.py index 6b3808a7a10e..882718425b0b 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_application_in_progress.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_application_in_progress.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetApplicationInProgress.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetApplicationInProgress.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_cluster_creating_async_operation_status.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_cluster_creating_async_operation_status.py index 6942337de6fe..fb9d75e1949c 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_cluster_creating_async_operation_status.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_cluster_creating_async_operation_status.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetClusterCreatingAsyncOperationStatus.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetClusterCreatingAsyncOperationStatus.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_cluster_virtual_machines.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_cluster_virtual_machines.py index 0724bcde57d2..ede765c8dcde 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_cluster_virtual_machines.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_cluster_virtual_machines.py @@ -36,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetClusterVirtualMachines.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetClusterVirtualMachines.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_extension.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_extension.py index 74cf8283dae3..fe85a1afa49d 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_extension.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_extension.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetExtension.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetExtension.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_extension_creation_async_operation_status.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_extension_creation_async_operation_status.py index 4f955967669c..cf2f87066d11 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_extension_creation_async_operation_status.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_extension_creation_async_operation_status.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetExtensionCreationAsyncOperationStatus.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetExtensionCreationAsyncOperationStatus.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_hd_insight_capabilities.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_hd_insight_capabilities.py index 6a58737345aa..e5656a28881f 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_hd_insight_capabilities.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_hd_insight_capabilities.py @@ -35,6 +35,6 @@ def main(): print(response) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetHDInsightCapabilities.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetHDInsightCapabilities.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_hd_insight_usages.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_hd_insight_usages.py index 5f61e5b790ba..fbbed06933a3 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_hd_insight_usages.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_hd_insight_usages.py @@ -35,6 +35,6 @@ def main(): print(response) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetHDInsightUsages.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetHDInsightUsages.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_linux_cluster_azure_monitor_status.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_linux_cluster_azure_monitor_status.py index f659580ec377..c08cb7ede7bd 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_linux_cluster_azure_monitor_status.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_linux_cluster_azure_monitor_status.py @@ -36,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetLinuxClusterAzureMonitorStatus.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetLinuxClusterAzureMonitorStatus.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_linux_cluster_monitoring_status.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_linux_cluster_monitoring_status.py index f72820b17be4..e9c0b842c13f 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_linux_cluster_monitoring_status.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_linux_cluster_monitoring_status.py @@ -36,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetLinuxClusterMonitoringStatus.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetLinuxClusterMonitoringStatus.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_linux_hadoop_all_clusters.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_linux_hadoop_all_clusters.py index 4d07841c65f1..8fd9fb448ff8 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_linux_hadoop_all_clusters.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_linux_hadoop_all_clusters.py @@ -34,6 +34,6 @@ def main(): print(item) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetLinuxHadoopAllClusters.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetLinuxHadoopAllClusters.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_linux_hadoop_all_clusters_in_resource_group.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_linux_hadoop_all_clusters_in_resource_group.py index 02c640471f2f..213652722d9b 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_linux_hadoop_all_clusters_in_resource_group.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_linux_hadoop_all_clusters_in_resource_group.py @@ -36,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetLinuxHadoopAllClustersInResourceGroup.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetLinuxHadoopAllClustersInResourceGroup.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_linux_hadoop_cluster.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_linux_hadoop_cluster.py index fe031995fbfb..aa2ebcdd15fb 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_linux_hadoop_cluster.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_linux_hadoop_cluster.py @@ -36,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetLinuxHadoopCluster.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetLinuxHadoopCluster.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_linux_hadoop_script_action.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_linux_hadoop_script_action.py index c384d8c553f8..38b659b04355 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_linux_hadoop_script_action.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_linux_hadoop_script_action.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetLinuxHadoopScriptAction.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetLinuxHadoopScriptAction.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_linux_spark_cluster.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_linux_spark_cluster.py index 670370654aed..2c25bdcb54af 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_linux_spark_cluster.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_linux_spark_cluster.py @@ -36,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetLinuxSparkCluster.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetLinuxSparkCluster.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_private_endpoint_connection.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_private_endpoint_connection.py index 43711854fcce..2439a0075396 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_private_endpoint_connection.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_private_endpoint_connection.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetPrivateEndpointConnection.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetPrivateEndpointConnection.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_private_link_resource.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_private_link_resource.py index 017e72adadc6..0a51dbf3d76e 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_private_link_resource.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_private_link_resource.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetPrivateLinkResource.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetPrivateLinkResource.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_restart_hosts_async_operation_status.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_restart_hosts_async_operation_status.py index a81c386e663a..48ffb6e9a66c 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_restart_hosts_async_operation_status.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_restart_hosts_async_operation_status.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetRestartHostsAsyncOperationStatus.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetRestartHostsAsyncOperationStatus.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_script_action_by_id.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_script_action_by_id.py index 23c311def433..5a544d3bd40c 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_script_action_by_id.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_script_action_by_id.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetScriptActionById.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetScriptActionById.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_script_execution_async_operation_status.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_script_execution_async_operation_status.py index c28f193f6d12..7d76168d48fe 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_script_execution_async_operation_status.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_script_execution_async_operation_status.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetScriptExecutionAsyncOperationStatus.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetScriptExecutionAsyncOperationStatus.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_script_execution_history.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_script_execution_history.py index b61ea567592e..b3cd7fcb40a8 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_script_execution_history.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_script_execution_history.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetScriptExecutionHistory.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetScriptExecutionHistory.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/hdi_clusters_get_gateway_settings.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/hdi_clusters_get_gateway_settings.py index fbf9f5eb6640..1d3dc36593da 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/hdi_clusters_get_gateway_settings.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/hdi_clusters_get_gateway_settings.py @@ -36,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/HDI_Clusters_GetGatewaySettings.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/HDI_Clusters_GetGatewaySettings.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/hdi_clusters_update_cluster_identity_certificate.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/hdi_clusters_update_cluster_identity_certificate.py index 2fd1216b2faa..509409c4b378 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/hdi_clusters_update_cluster_identity_certificate.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/hdi_clusters_update_cluster_identity_certificate.py @@ -41,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/HDI_Clusters_UpdateClusterIdentityCertificate.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/HDI_Clusters_UpdateClusterIdentityCertificate.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/hdi_clusters_update_gateway_settings_enable.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/hdi_clusters_update_gateway_settings_enable.py index b752febd7f72..1e5b40f628e9 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/hdi_clusters_update_gateway_settings_enable.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/hdi_clusters_update_gateway_settings_enable.py @@ -41,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/HDI_Clusters_UpdateGatewaySettings_Enable.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/HDI_Clusters_UpdateGatewaySettings_Enable.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/hdi_configurations_get.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/hdi_configurations_get.py index 5a56fc470898..4ba5a77191f0 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/hdi_configurations_get.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/hdi_configurations_get.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/HDI_Configurations_Get.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/HDI_Configurations_Get.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/hdi_configurations_list.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/hdi_configurations_list.py index ae36cc03feee..ad1e87d7a6ca 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/hdi_configurations_list.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/hdi_configurations_list.py @@ -36,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/HDI_Configurations_List.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/HDI_Configurations_List.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/hdi_locations_check_cluster_name_availability.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/hdi_locations_check_cluster_name_availability.py index d208beef247f..b885e70d2d54 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/hdi_locations_check_cluster_name_availability.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/hdi_locations_check_cluster_name_availability.py @@ -36,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/HDI_Locations_CheckClusterNameAvailability.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/HDI_Locations_CheckClusterNameAvailability.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/hdi_locations_get_async_operation_status.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/hdi_locations_get_async_operation_status.py index d9f45d85b0c3..eadac13e158f 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/hdi_locations_get_async_operation_status.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/hdi_locations_get_async_operation_status.py @@ -36,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/HDI_Locations_GetAsyncOperationStatus.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/HDI_Locations_GetAsyncOperationStatus.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/hdi_locations_list_billing_specs.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/hdi_locations_list_billing_specs.py index 022eed22be64..877b2be52e05 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/hdi_locations_list_billing_specs.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/hdi_locations_list_billing_specs.py @@ -35,6 +35,6 @@ def main(): print(response) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/HDI_Locations_ListBillingSpecs.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/HDI_Locations_ListBillingSpecs.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/hdi_locations_validate_cluster_create_request.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/hdi_locations_validate_cluster_create_request.py index 960b1650ea92..554891c3bbba 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/hdi_locations_validate_cluster_create_request.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/hdi_locations_validate_cluster_create_request.py @@ -96,6 +96,7 @@ def main(): "storageaccounts": [ { "container": "contianername", + "enableSecureChannel": True, "isDefault": True, "key": "*******", "name": "storagename.blob.core.windows.net", @@ -113,6 +114,6 @@ def main(): print(response) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/HDI_Locations_ValidateClusterCreateRequest.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/HDI_Locations_ValidateClusterCreateRequest.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/list_hd_insight_operations.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/list_hd_insight_operations.py index 18de3e6fab6a..1ada2b806f7e 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/list_hd_insight_operations.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/list_hd_insight_operations.py @@ -34,6 +34,6 @@ def main(): print(item) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/ListHDInsightOperations.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/ListHDInsightOperations.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/patch_linux_hadoop_cluster.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/patch_linux_hadoop_cluster.py index d150ba24a3b9..96a40d4ad666 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/patch_linux_hadoop_cluster.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/patch_linux_hadoop_cluster.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/PatchLinuxHadoopCluster.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/PatchLinuxHadoopCluster.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/post_execute_script_action.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/post_execute_script_action.py index 23c25c717fca..226344908e7c 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/post_execute_script_action.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/post_execute_script_action.py @@ -47,6 +47,6 @@ def main(): print(response) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/PostExecuteScriptAction.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/PostExecuteScriptAction.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/promote_linux_hadoop_script_action.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/promote_linux_hadoop_script_action.py index 3ea4ec8e214e..e5a00ce03fd2 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/promote_linux_hadoop_script_action.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/promote_linux_hadoop_script_action.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/PromoteLinuxHadoopScriptAction.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/PromoteLinuxHadoopScriptAction.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/resize_linux_hadoop_cluster.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/resize_linux_hadoop_cluster.py index c3dab7a2ddf1..7ad381dabe7c 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/resize_linux_hadoop_cluster.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/resize_linux_hadoop_cluster.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/ResizeLinuxHadoopCluster.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/ResizeLinuxHadoopCluster.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/restart_virtual_machines_operation.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/restart_virtual_machines_operation.py index bbd65fb06ab4..74e153e15a1e 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/restart_virtual_machines_operation.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/restart_virtual_machines_operation.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/RestartVirtualMachinesOperation.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/RestartVirtualMachinesOperation.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/rotate_linux_hadoop_cluster_disk_encryption_key.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/rotate_linux_hadoop_cluster_disk_encryption_key.py index 363a4576c3f7..2e86998b27ac 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/rotate_linux_hadoop_cluster_disk_encryption_key.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/rotate_linux_hadoop_cluster_disk_encryption_key.py @@ -41,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/RotateLinuxHadoopClusterDiskEncryptionKey.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/RotateLinuxHadoopClusterDiskEncryptionKey.json if __name__ == "__main__": main()