From 27be24930181602cadec4ada3227ab566c33a550 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Tue, 29 Aug 2023 12:44:59 +0000 Subject: [PATCH] CodeGen from PR 25434 in Azure/azure-rest-api-specs Merge 6b5357bc5a3756928751c99b20acb7aa91daa1d0 into 0762e82bcccef4a032e29dda5e4c07fd7cc822a6 --- sdk/kusto/azure-mgmt-kusto/_meta.json | 10 +- .../azure/mgmt/kusto/_configuration.py | 4 +- .../mgmt/kusto/_kusto_management_client.py | 8 +- .../azure/mgmt/kusto/_serialization.py | 26 +- .../azure/mgmt/kusto/_vendor.py | 14 - .../azure/mgmt/kusto/_version.py | 2 +- .../azure/mgmt/kusto/aio/_configuration.py | 4 +- .../kusto/aio/_kusto_management_client.py | 8 +- .../mgmt/kusto/aio/operations/__init__.py | 2 + ...ched_database_configurations_operations.py | 9 +- ...luster_principal_assignments_operations.py | 9 +- .../aio/operations/_clusters_operations.py | 50 +- .../_data_connections_operations.py | 20 +- ...tabase_principal_assignments_operations.py | 9 +- .../aio/operations/_databases_operations.py | 15 +- .../_managed_private_endpoints_operations.py | 14 +- ...private_endpoint_connections_operations.py | 9 +- .../_sandbox_custom_images_operations.py | 977 ++++++++++++++ .../aio/operations/_scripts_operations.py | 14 +- .../azure/mgmt/kusto/models/__init__.py | 10 + .../models/_kusto_management_client_enums.py | 17 + .../azure/mgmt/kusto/models/_models_py3.py | 173 ++- .../azure/mgmt/kusto/operations/__init__.py | 2 + ...ched_database_configurations_operations.py | 31 +- ...luster_principal_assignments_operations.py | 31 +- .../kusto/operations/_clusters_operations.py | 128 +- .../_data_connections_operations.py | 50 +- .../kusto/operations/_database_operations.py | 6 +- ...tabase_principal_assignments_operations.py | 31 +- .../kusto/operations/_databases_operations.py | 53 +- .../_managed_private_endpoints_operations.py | 40 +- .../mgmt/kusto/operations/_operations.py | 2 +- ..._operations_results_location_operations.py | 6 +- .../_operations_results_operations.py | 6 +- ...private_endpoint_connections_operations.py | 27 +- .../_private_link_resources_operations.py | 10 +- .../_sandbox_custom_images_operations.py | 1191 +++++++++++++++++ .../kusto/operations/_scripts_operations.py | 40 +- .../mgmt/kusto/operations/_skus_operations.py | 6 +- ...e_configuration_check_name_availability.py | 2 +- ...atabase_configurations_create_or_update.py | 2 +- ...attached_database_configurations_delete.py | 2 +- ...to_attached_database_configurations_get.py | 2 +- ...database_configurations_list_by_cluster.py | 2 +- .../kusto_cluster_add_language_extensions.py | 2 +- ...kusto_cluster_detach_follower_databases.py | 2 +- .../kusto_cluster_list_follower_databases.py | 2 +- .../kusto_cluster_list_language_extensions.py | 2 +- .../kusto_cluster_migrate.py | 2 +- ...pal_assignments_check_name_availability.py | 2 +- ..._principal_assignments_create_or_update.py | 2 +- ...to_cluster_principal_assignments_delete.py | 2 +- ...kusto_cluster_principal_assignments_get.py | 2 +- ...usto_cluster_principal_assignments_list.py | 2 +- ...usto_cluster_remove_language_extensions.py | 2 +- .../kusto_clusters_check_name_availability.py | 2 +- .../kusto_clusters_create_or_update.py | 8 +- .../kusto_clusters_delete.py | 2 +- ...kusto_clusters_diagnose_virtual_network.py | 2 +- .../generated_samples/kusto_clusters_get.py | 2 +- .../generated_samples/kusto_clusters_list.py | 2 +- .../kusto_clusters_list_by_resource_group.py | 2 +- .../kusto_clusters_list_resource_skus.py | 2 +- .../kusto_clusters_list_skus.py | 2 +- .../generated_samples/kusto_clusters_start.py | 2 +- .../generated_samples/kusto_clusters_stop.py | 2 +- .../kusto_clusters_update.py | 2 +- ..._connection_event_grid_validation_async.py | 2 +- .../kusto_data_connection_validation_async.py | 2 +- ...ata_connections_check_name_availability.py | 2 +- ..._connections_cosmos_db_create_or_update.py | 2 +- .../kusto_data_connections_cosmos_db_get.py | 2 +- ...kusto_data_connections_cosmos_db_update.py | 2 +- ...kusto_data_connections_create_or_update.py | 2 +- .../kusto_data_connections_delete.py | 2 +- ...connections_event_grid_create_or_update.py | 2 +- .../kusto_data_connections_event_grid_get.py | 2 +- ...usto_data_connections_event_grid_update.py | 2 +- .../kusto_data_connections_get.py | 2 +- ...kusto_data_connections_list_by_database.py | 2 +- .../kusto_data_connections_update.py | 2 +- .../kusto_database_add_principals.py | 2 +- .../kusto_database_invite_follower.py | 2 +- .../kusto_database_list_principals.py | 2 +- ...pal_assignments_check_name_availability.py | 2 +- ..._principal_assignments_create_or_update.py | 2 +- ...o_database_principal_assignments_delete.py | 2 +- ...usto_database_principal_assignments_get.py | 2 +- ...sto_database_principal_assignments_list.py | 2 +- .../kusto_database_readonly_update.py | 2 +- .../kusto_database_remove_principals.py | 2 +- ...kusto_databases_check_name_availability.py | 2 +- .../kusto_databases_create_or_update.py | 2 +- .../kusto_databases_delete.py | 2 +- .../generated_samples/kusto_databases_get.py | 2 +- .../kusto_databases_list_by_cluster.py | 2 +- .../kusto_databases_update.py | 2 +- ...ivate_endpoints_check_name_availability.py | 2 +- ...aged_private_endpoints_create_or_update.py | 2 +- .../kusto_managed_private_endpoints_delete.py | 2 +- .../kusto_managed_private_endpoints_get.py | 2 +- .../kusto_managed_private_endpoints_list.py | 2 +- .../kusto_managed_private_endpoints_update.py | 2 +- .../kusto_operation_results_get.py | 2 +- ...ults_operation_result_response_type_get.py | 2 +- .../kusto_operations_list.py | 2 +- ...usto_outbound_network_dependencies_list.py | 2 +- ...e_endpoint_connections_create_or_update.py | 2 +- ...sto_private_endpoint_connections_delete.py | 2 +- .../kusto_private_endpoint_connections_get.py | 2 +- ...kusto_private_endpoint_connections_list.py | 2 +- .../kusto_private_link_resources_get.py | 2 +- .../kusto_private_link_resources_list.py | 2 +- .../kusto_sandbox_custom_image_delete.py | 41 + .../kusto_sandbox_custom_image_update.py | 45 + ...x_custom_images_check_name_availability.py | 42 + ..._sandbox_custom_images_create_or_update.py | 45 + .../kusto_sandbox_custom_images_get.py | 42 + .../kusto_sandbox_custom_images_list.py | 42 + .../kusto_scripts_check_name_availability.py | 2 +- .../kusto_scripts_create_or_update.py | 2 +- .../generated_samples/kusto_scripts_delete.py | 2 +- .../generated_samples/kusto_scripts_get.py | 2 +- .../kusto_scripts_list_by_database.py | 2 +- .../generated_samples/kusto_scripts_update.py | 2 +- .../generated_samples/kusto_skus.py | 2 +- .../kusto_suspended_databases_get.py | 2 +- 127 files changed, 3025 insertions(+), 466 deletions(-) create mode 100644 sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_sandbox_custom_images_operations.py create mode 100644 sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_sandbox_custom_images_operations.py create mode 100644 sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_sandbox_custom_image_delete.py create mode 100644 sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_sandbox_custom_image_update.py create mode 100644 sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_sandbox_custom_images_check_name_availability.py create mode 100644 sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_sandbox_custom_images_create_or_update.py create mode 100644 sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_sandbox_custom_images_get.py create mode 100644 sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_sandbox_custom_images_list.py diff --git a/sdk/kusto/azure-mgmt-kusto/_meta.json b/sdk/kusto/azure-mgmt-kusto/_meta.json index 112a2a9006d5..8f7c64f523e9 100644 --- a/sdk/kusto/azure-mgmt-kusto/_meta.json +++ b/sdk/kusto/azure-mgmt-kusto/_meta.json @@ -1,11 +1,11 @@ { - "commit": "de93ae3897babd397a59d3c9dcb894855d0db1c3", + "commit": "c10f15f4719268557a7c12605a6842e729c7011f", "repository_url": "https://github.com/Azure/azure-rest-api-specs", - "autorest": "3.9.2", + "autorest": "3.9.7", "use": [ - "@autorest/python@6.6.0", - "@autorest/modelerfour@4.24.3" + "@autorest/python@6.7.1", + "@autorest/modelerfour@4.26.2" ], - "autorest_command": "autorest specification/azure-kusto/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.6.0 --use=@autorest/modelerfour@4.24.3 --version=3.9.2 --version-tolerant=False", + "autorest_command": "autorest specification/azure-kusto/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.7.1 --use=@autorest/modelerfour@4.26.2 --version=3.9.7 --version-tolerant=False", "readme": "specification/azure-kusto/resource-manager/readme.md" } \ No newline at end of file diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/_configuration.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/_configuration.py index a1ec1c79ee90..7cb697c1fb37 100644 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/_configuration.py +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/_configuration.py @@ -29,14 +29,14 @@ class KustoManagementClientConfiguration(Configuration): # pylint: disable=too- :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: The ID of the target subscription. Required. :type subscription_id: str - :keyword api_version: Api Version. Default value is "2023-05-02". Note that overriding this + :keyword api_version: Api Version. Default value is "2023-08-15". 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(KustoManagementClientConfiguration, self).__init__(**kwargs) - api_version: str = kwargs.pop("api_version", "2023-05-02") + api_version: str = kwargs.pop("api_version", "2023-08-15") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/_kusto_management_client.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/_kusto_management_client.py index d4d9aaf2f7f8..63e091f5e7b2 100644 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/_kusto_management_client.py +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/_kusto_management_client.py @@ -29,6 +29,7 @@ OperationsResultsOperations, PrivateEndpointConnectionsOperations, PrivateLinkResourcesOperations, + SandboxCustomImagesOperations, ScriptsOperations, SkusOperations, ) @@ -65,6 +66,8 @@ class KustoManagementClient: # pylint: disable=client-accepts-api-version-keywo azure.mgmt.kusto.operations.DatabasePrincipalAssignmentsOperations :ivar scripts: ScriptsOperations operations :vartype scripts: azure.mgmt.kusto.operations.ScriptsOperations + :ivar sandbox_custom_images: SandboxCustomImagesOperations operations + :vartype sandbox_custom_images: azure.mgmt.kusto.operations.SandboxCustomImagesOperations :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations :vartype private_endpoint_connections: azure.mgmt.kusto.operations.PrivateEndpointConnectionsOperations @@ -85,7 +88,7 @@ class KustoManagementClient: # pylint: disable=client-accepts-api-version-keywo :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 "2023-05-02". Note that overriding this + :keyword api_version: Api Version. Default value is "2023-08-15". 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 @@ -125,6 +128,9 @@ def __init__( self._client, self._config, self._serialize, self._deserialize ) self.scripts = ScriptsOperations(self._client, self._config, self._serialize, self._deserialize) + self.sandbox_custom_images = SandboxCustomImagesOperations( + self._client, self._config, self._serialize, self._deserialize + ) self.private_endpoint_connections = PrivateEndpointConnectionsOperations( self._client, self._config, self._serialize, self._deserialize ) diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/_serialization.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/_serialization.py index 842ae727fbbc..4bae2292227b 100644 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/_serialization.py +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/_serialization.py @@ -662,8 +662,9 @@ def _serialize(self, target_obj, data_type=None, **kwargs): _serialized.update(_new_attr) # type: ignore _new_attr = _new_attr[k] # type: ignore _serialized = _serialized[k] - except ValueError: - continue + except ValueError as err: + if isinstance(err, SerializationError): + raise except (AttributeError, KeyError, TypeError) as err: msg = "Attribute {} in object {} cannot be serialized.\n{}".format(attr_name, class_name, str(target_obj)) @@ -741,6 +742,8 @@ def query(self, name, data, data_type, **kwargs): :param data: The data to be serialized. :param str data_type: The type to be serialized from. + :keyword bool skip_quote: Whether to skip quote the serialized result. + Defaults to False. :rtype: str :raises: TypeError if serialization fails. :raises: ValueError if data is None @@ -749,10 +752,8 @@ def query(self, name, data, data_type, **kwargs): # Treat the list aside, since we don't want to encode the div separator if data_type.startswith("["): internal_data_type = data_type[1:-1] - data = [self.serialize_data(d, internal_data_type, **kwargs) if d is not None else "" for d in data] - if not kwargs.get("skip_quote", False): - data = [quote(str(d), safe="") for d in data] - return str(self.serialize_iter(data, internal_data_type, **kwargs)) + do_quote = not kwargs.get("skip_quote", False) + return str(self.serialize_iter(data, internal_data_type, do_quote=do_quote, **kwargs)) # Not a list, regular serialization output = self.serialize_data(data, data_type, **kwargs) @@ -891,6 +892,8 @@ def serialize_iter(self, data, iter_type, div=None, **kwargs): not be None or empty. :param str div: If set, this str will be used to combine the elements in the iterable into a combined string. Default is 'None'. + :keyword bool do_quote: Whether to quote the serialized result of each iterable element. + Defaults to False. :rtype: list, str """ if isinstance(data, str): @@ -903,9 +906,14 @@ def serialize_iter(self, data, iter_type, div=None, **kwargs): for d in data: try: serialized.append(self.serialize_data(d, iter_type, **kwargs)) - except ValueError: + except ValueError as err: + if isinstance(err, SerializationError): + raise serialized.append(None) + if kwargs.get("do_quote", False): + serialized = ["" if s is None else quote(str(s), safe="") for s in serialized] + if div: serialized = ["" if s is None else str(s) for s in serialized] serialized = div.join(serialized) @@ -950,7 +958,9 @@ def serialize_dict(self, attr, dict_type, **kwargs): for key, value in attr.items(): try: serialized[self.serialize_unicode(key)] = self.serialize_data(value, dict_type, **kwargs) - except ValueError: + except ValueError as err: + if isinstance(err, SerializationError): + raise serialized[self.serialize_unicode(key)] = None if "xml" in serialization_ctxt: diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/_vendor.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/_vendor.py index bd0df84f5319..0dafe0e287ff 100644 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/_vendor.py +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/_vendor.py @@ -5,8 +5,6 @@ # 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 @@ -16,15 +14,3 @@ def _convert_request(request, files=None): if files: request.set_formdata_body(files) return request - - -def _format_url_section(template, **kwargs): - components = template.split("/") - while components: - try: - return template.format(**kwargs) - except KeyError as key: - # 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/kusto/azure-mgmt-kusto/azure/mgmt/kusto/_version.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/_version.py index 509b38085125..e32dc6ec4218 100644 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/_version.py +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "3.2.0" +VERSION = "2.0.0b1" diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/_configuration.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/_configuration.py index a1b200e32541..317f696c1f0e 100644 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/_configuration.py +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/_configuration.py @@ -29,14 +29,14 @@ class KustoManagementClientConfiguration(Configuration): # pylint: disable=too- :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: The ID of the target subscription. Required. :type subscription_id: str - :keyword api_version: Api Version. Default value is "2023-05-02". Note that overriding this + :keyword api_version: Api Version. Default value is "2023-08-15". 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(KustoManagementClientConfiguration, self).__init__(**kwargs) - api_version: str = kwargs.pop("api_version", "2023-05-02") + api_version: str = kwargs.pop("api_version", "2023-08-15") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/_kusto_management_client.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/_kusto_management_client.py index 7d46899bb7da..ee1de52b0766 100644 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/_kusto_management_client.py +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/_kusto_management_client.py @@ -29,6 +29,7 @@ OperationsResultsOperations, PrivateEndpointConnectionsOperations, PrivateLinkResourcesOperations, + SandboxCustomImagesOperations, ScriptsOperations, SkusOperations, ) @@ -65,6 +66,8 @@ class KustoManagementClient: # pylint: disable=client-accepts-api-version-keywo azure.mgmt.kusto.aio.operations.DatabasePrincipalAssignmentsOperations :ivar scripts: ScriptsOperations operations :vartype scripts: azure.mgmt.kusto.aio.operations.ScriptsOperations + :ivar sandbox_custom_images: SandboxCustomImagesOperations operations + :vartype sandbox_custom_images: azure.mgmt.kusto.aio.operations.SandboxCustomImagesOperations :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations :vartype private_endpoint_connections: azure.mgmt.kusto.aio.operations.PrivateEndpointConnectionsOperations @@ -85,7 +88,7 @@ class KustoManagementClient: # pylint: disable=client-accepts-api-version-keywo :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 "2023-05-02". Note that overriding this + :keyword api_version: Api Version. Default value is "2023-08-15". 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 @@ -125,6 +128,9 @@ def __init__( self._client, self._config, self._serialize, self._deserialize ) self.scripts = ScriptsOperations(self._client, self._config, self._serialize, self._deserialize) + self.sandbox_custom_images = SandboxCustomImagesOperations( + self._client, self._config, self._serialize, self._deserialize + ) self.private_endpoint_connections = PrivateEndpointConnectionsOperations( self._client, self._config, self._serialize, self._deserialize ) diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/__init__.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/__init__.py index cae10efe6d88..348efd05c673 100644 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/__init__.py +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/__init__.py @@ -15,6 +15,7 @@ from ._database_operations import DatabaseOperations from ._database_principal_assignments_operations import DatabasePrincipalAssignmentsOperations from ._scripts_operations import ScriptsOperations +from ._sandbox_custom_images_operations import SandboxCustomImagesOperations from ._private_endpoint_connections_operations import PrivateEndpointConnectionsOperations from ._private_link_resources_operations import PrivateLinkResourcesOperations from ._data_connections_operations import DataConnectionsOperations @@ -36,6 +37,7 @@ "DatabaseOperations", "DatabasePrincipalAssignmentsOperations", "ScriptsOperations", + "SandboxCustomImagesOperations", "PrivateEndpointConnectionsOperations", "PrivateLinkResourcesOperations", "DataConnectionsOperations", diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_attached_database_configurations_operations.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_attached_database_configurations_operations.py index 5b283d408017..28f6bff31453 100644 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_attached_database_configurations_operations.py +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_attached_database_configurations_operations.py @@ -606,9 +606,7 @@ def get_long_running_output(pipeline_response): return deserialized if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) + polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) else: @@ -670,6 +668,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements response_headers = {} if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) response_headers["Azure-AsyncOperation"] = self._deserialize( "str", response.headers.get("Azure-AsyncOperation") ) @@ -733,9 +732,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return cls(pipeline_response, None, {}) if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) + polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) else: diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_cluster_principal_assignments_operations.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_cluster_principal_assignments_operations.py index 197449209405..ddbdbbebba94 100644 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_cluster_principal_assignments_operations.py +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_cluster_principal_assignments_operations.py @@ -497,9 +497,7 @@ def get_long_running_output(pipeline_response): return deserialized if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) + polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) else: @@ -561,6 +559,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements response_headers = {} if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) response_headers["Azure-AsyncOperation"] = self._deserialize( "str", response.headers.get("Azure-AsyncOperation") ) @@ -623,9 +622,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return cls(pipeline_response, None, {}) if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) + polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) else: diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_clusters_operations.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_clusters_operations.py index 76a29ccc2a89..f1e2d12d7031 100644 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_clusters_operations.py +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_clusters_operations.py @@ -385,9 +385,7 @@ def get_long_running_output(pipeline_response): return deserialized if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) + polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) else: @@ -469,6 +467,7 @@ async def _update_initial( deserialized = self._deserialize("Cluster", pipeline_response) if response.status_code == 201: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) response_headers["Azure-AsyncOperation"] = self._deserialize( "str", response.headers.get("Azure-AsyncOperation") ) @@ -476,6 +475,7 @@ async def _update_initial( deserialized = self._deserialize("Cluster", pipeline_response) if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) response_headers["Azure-AsyncOperation"] = self._deserialize( "str", response.headers.get("Azure-AsyncOperation") ) @@ -643,9 +643,7 @@ def get_long_running_output(pipeline_response): return deserialized if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) + polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) else: @@ -706,6 +704,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements response_headers = {} if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) response_headers["Azure-AsyncOperation"] = self._deserialize( "str", response.headers.get("Azure-AsyncOperation") ) @@ -763,9 +762,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return cls(pipeline_response, None, {}) if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) + polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) else: @@ -826,6 +823,7 @@ async def _stop_initial( # pylint: disable=inconsistent-return-statements response_headers = {} if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) response_headers["Azure-AsyncOperation"] = self._deserialize( "str", response.headers.get("Azure-AsyncOperation") ) @@ -883,9 +881,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return cls(pipeline_response, None, {}) if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) + polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) else: @@ -946,6 +942,7 @@ async def _start_initial( # pylint: disable=inconsistent-return-statements response_headers = {} if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) response_headers["Azure-AsyncOperation"] = self._deserialize( "str", response.headers.get("Azure-AsyncOperation") ) @@ -1003,9 +1000,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return cls(pipeline_response, None, {}) if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) + polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) else: @@ -1082,6 +1077,7 @@ async def _migrate_initial( # pylint: disable=inconsistent-return-statements response_headers = {} if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) response_headers["Azure-AsyncOperation"] = self._deserialize( "str", response.headers.get("Azure-AsyncOperation") ) @@ -1224,9 +1220,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return cls(pipeline_response, None, {}) if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) + polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) else: @@ -1398,6 +1392,7 @@ async def _detach_follower_databases_initial( # pylint: disable=inconsistent-re response_headers = {} if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) response_headers["Azure-AsyncOperation"] = self._deserialize( "str", response.headers.get("Azure-AsyncOperation") ) @@ -1540,9 +1535,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return cls(pipeline_response, None, {}) if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) + polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) else: @@ -1607,6 +1600,7 @@ async def _diagnose_virtual_network_initial( deserialized = self._deserialize("DiagnoseVirtualNetworkResult", pipeline_response) if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) response_headers["Azure-AsyncOperation"] = self._deserialize( "str", response.headers.get("Azure-AsyncOperation") ) @@ -1673,9 +1667,7 @@ def get_long_running_output(pipeline_response): return deserialized if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) + polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) else: @@ -2401,6 +2393,7 @@ async def _add_language_extensions_initial( # pylint: disable=inconsistent-retu response_headers = {} if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) response_headers["Azure-AsyncOperation"] = self._deserialize( "str", response.headers.get("Azure-AsyncOperation") ) @@ -2543,9 +2536,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return cls(pipeline_response, None, {}) if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) + polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) else: @@ -2622,6 +2613,7 @@ async def _remove_language_extensions_initial( # pylint: disable=inconsistent-r response_headers = {} if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) response_headers["Azure-AsyncOperation"] = self._deserialize( "str", response.headers.get("Azure-AsyncOperation") ) @@ -2764,9 +2756,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return cls(pipeline_response, None, {}) if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) + polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) else: diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_data_connections_operations.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_data_connections_operations.py index 4ae33560b471..930542125f49 100644 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_data_connections_operations.py +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_data_connections_operations.py @@ -224,6 +224,7 @@ async def _data_connection_validation_initial( deserialized = self._deserialize("DataConnectionValidationListResult", pipeline_response) if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) response_headers["Azure-AsyncOperation"] = self._deserialize( "str", response.headers.get("Azure-AsyncOperation") ) @@ -388,9 +389,7 @@ def get_long_running_output(pipeline_response): return deserialized if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) + polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) else: @@ -874,9 +873,7 @@ def get_long_running_output(pipeline_response): return deserialized if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) + polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) else: @@ -960,6 +957,7 @@ async def _update_initial( deserialized = self._deserialize("DataConnection", pipeline_response) if response.status_code == 201: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) response_headers["Azure-AsyncOperation"] = self._deserialize( "str", response.headers.get("Azure-AsyncOperation") ) @@ -967,6 +965,7 @@ async def _update_initial( deserialized = self._deserialize("DataConnection", pipeline_response) if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) response_headers["Azure-AsyncOperation"] = self._deserialize( "str", response.headers.get("Azure-AsyncOperation") ) @@ -1138,9 +1137,7 @@ def get_long_running_output(pipeline_response): return deserialized if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) + polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) else: @@ -1203,6 +1200,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements response_headers = {} if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) response_headers["Azure-AsyncOperation"] = self._deserialize( "str", response.headers.get("Azure-AsyncOperation") ) @@ -1268,9 +1266,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return cls(pipeline_response, None, {}) if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) + polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) else: diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_database_principal_assignments_operations.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_database_principal_assignments_operations.py index 3c5a0bdae832..bbcfa1e01a1f 100644 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_database_principal_assignments_operations.py +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_database_principal_assignments_operations.py @@ -530,9 +530,7 @@ def get_long_running_output(pipeline_response): return deserialized if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) + polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) else: @@ -600,6 +598,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements response_headers = {} if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) response_headers["Azure-AsyncOperation"] = self._deserialize( "str", response.headers.get("Azure-AsyncOperation") ) @@ -670,9 +669,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return cls(pipeline_response, None, {}) if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) + polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) else: diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_databases_operations.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_databases_operations.py index d8384937bdc7..c6db5b25ff42 100644 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_databases_operations.py +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_databases_operations.py @@ -629,9 +629,7 @@ def get_long_running_output(pipeline_response): return deserialized if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) + polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) else: @@ -715,6 +713,7 @@ async def _update_initial( deserialized = self._deserialize("Database", pipeline_response) if response.status_code == 201: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) response_headers["Azure-AsyncOperation"] = self._deserialize( "str", response.headers.get("Azure-AsyncOperation") ) @@ -722,6 +721,7 @@ async def _update_initial( deserialized = self._deserialize("Database", pipeline_response) if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) response_headers["Azure-AsyncOperation"] = self._deserialize( "str", response.headers.get("Azure-AsyncOperation") ) @@ -899,9 +899,7 @@ def get_long_running_output(pipeline_response): return deserialized if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) + polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) else: @@ -963,6 +961,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements response_headers = {} if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) response_headers["Azure-AsyncOperation"] = self._deserialize( "str", response.headers.get("Azure-AsyncOperation") ) @@ -1025,9 +1024,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return cls(pipeline_response, None, {}) if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) + polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) else: diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_managed_private_endpoints_operations.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_managed_private_endpoints_operations.py index 7d2d0aa2cec8..feeaeb1876d4 100644 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_managed_private_endpoints_operations.py +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_managed_private_endpoints_operations.py @@ -596,9 +596,7 @@ def get_long_running_output(pipeline_response): return deserialized if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) + polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) else: @@ -680,6 +678,7 @@ async def _update_initial( deserialized = self._deserialize("ManagedPrivateEndpoint", pipeline_response) if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) response_headers["Azure-AsyncOperation"] = self._deserialize( "str", response.headers.get("Azure-AsyncOperation") ) @@ -841,9 +840,7 @@ def get_long_running_output(pipeline_response): return deserialized if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) + polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) else: @@ -905,6 +902,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements response_headers = {} if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) response_headers["Azure-AsyncOperation"] = self._deserialize( "str", response.headers.get("Azure-AsyncOperation") ) @@ -967,9 +965,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return cls(pipeline_response, None, {}) if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) + polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) else: diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_private_endpoint_connections_operations.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_private_endpoint_connections_operations.py index 9fb6171a0090..f3c684bcc97e 100644 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_private_endpoint_connections_operations.py +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_private_endpoint_connections_operations.py @@ -442,9 +442,7 @@ def get_long_running_output(pipeline_response): return deserialized if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) + polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) else: @@ -506,6 +504,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements response_headers = {} if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) response_headers["Azure-AsyncOperation"] = self._deserialize( "str", response.headers.get("Azure-AsyncOperation") ) @@ -568,9 +567,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return cls(pipeline_response, None, {}) if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) + polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) else: diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_sandbox_custom_images_operations.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_sandbox_custom_images_operations.py new file mode 100644 index 000000000000..e9a0200fe1fe --- /dev/null +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_sandbox_custom_images_operations.py @@ -0,0 +1,977 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from io import IOBase +from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload +import urllib.parse + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.core.utils import case_insensitive_dict +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._sandbox_custom_images_operations import ( + build_check_name_availability_request, + build_create_or_update_request, + build_delete_request, + build_get_request, + build_list_by_cluster_request, + build_update_request, +) + +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + + +class SandboxCustomImagesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.kusto.aio.KustoManagementClient`'s + :attr:`sandbox_custom_images` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list_by_cluster( + self, resource_group_name: str, cluster_name: str, **kwargs: Any + ) -> AsyncIterable["_models.SandboxCustomImage"]: + """Returns the list of the existing sandbox custom images of the given Kusto cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either SandboxCustomImage or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.kusto.models.SandboxCustomImage] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + cls: ClsType[_models.SandboxCustomImagesListResult] = kwargs.pop("cls", None) + + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + request = build_list_by_cluster_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_by_cluster.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("SandboxCustomImagesListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return None, AsyncList(list_of_elem) + + 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=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + list_by_cluster.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/sandboxCustomImages" + } + + @distributed_trace_async + async def get( + self, resource_group_name: str, cluster_name: str, sandbox_custom_image_name: str, **kwargs: Any + ) -> _models.SandboxCustomImage: + """Returns a sandbox custom image. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param sandbox_custom_image_name: The name of the sandbox custom image. Required. + :type sandbox_custom_image_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SandboxCustomImage or the result of cls(response) + :rtype: ~azure.mgmt.kusto.models.SandboxCustomImage + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + cls: ClsType[_models.SandboxCustomImage] = kwargs.pop("cls", None) + + request = build_get_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + sandbox_custom_image_name=sandbox_custom_image_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata["url"], + headers=_headers, + params=_params, + ) + 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=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize("SandboxCustomImage", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/sandboxCustomImages/{sandboxCustomImageName}" + } + + async def _create_or_update_initial( + self, + resource_group_name: str, + cluster_name: str, + sandbox_custom_image_name: str, + parameters: Union[_models.SandboxCustomImage, IO], + **kwargs: Any + ) -> _models.SandboxCustomImage: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.SandboxCustomImage] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _json = self._serialize.body(parameters, "SandboxCustomImage") + + request = build_create_or_update_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + sandbox_custom_image_name=sandbox_custom_image_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + template_url=self._create_or_update_initial.metadata["url"], + headers=_headers, + params=_params, + ) + 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=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize("SandboxCustomImage", pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize("SandboxCustomImage", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + _create_or_update_initial.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/sandboxCustomImages/{sandboxCustomImageName}" + } + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + cluster_name: str, + sandbox_custom_image_name: str, + parameters: _models.SandboxCustomImage, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.SandboxCustomImage]: + """Creates or updates a sandbox custom image. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param sandbox_custom_image_name: The name of the sandbox custom image. Required. + :type sandbox_custom_image_name: str + :param parameters: The sandbox custom image parameters. Required. + :type parameters: ~azure.mgmt.kusto.models.SandboxCustomImage + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either SandboxCustomImage or the result of + cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.SandboxCustomImage] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + cluster_name: str, + sandbox_custom_image_name: str, + parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.SandboxCustomImage]: + """Creates or updates a sandbox custom image. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param sandbox_custom_image_name: The name of the sandbox custom image. Required. + :type sandbox_custom_image_name: str + :param parameters: The sandbox custom image parameters. Required. + :type parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either SandboxCustomImage or the result of + cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.SandboxCustomImage] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + cluster_name: str, + sandbox_custom_image_name: str, + parameters: Union[_models.SandboxCustomImage, IO], + **kwargs: Any + ) -> AsyncLROPoller[_models.SandboxCustomImage]: + """Creates or updates a sandbox custom image. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param sandbox_custom_image_name: The name of the sandbox custom image. Required. + :type sandbox_custom_image_name: str + :param parameters: The sandbox custom image parameters. Is either a SandboxCustomImage type or + a IO type. Required. + :type parameters: ~azure.mgmt.kusto.models.SandboxCustomImage or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either SandboxCustomImage or the result of + cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.SandboxCustomImage] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.SandboxCustomImage] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + sandbox_custom_image_name=sandbox_custom_image_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("SandboxCustomImage", pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + if polling is True: + polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + begin_create_or_update.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/sandboxCustomImages/{sandboxCustomImageName}" + } + + async def _update_initial( + self, + resource_group_name: str, + cluster_name: str, + sandbox_custom_image_name: str, + parameters: Union[_models.SandboxCustomImage, IO], + **kwargs: Any + ) -> _models.SandboxCustomImage: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.SandboxCustomImage] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _json = self._serialize.body(parameters, "SandboxCustomImage") + + request = build_update_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + sandbox_custom_image_name=sandbox_custom_image_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + template_url=self._update_initial.metadata["url"], + headers=_headers, + params=_params, + ) + 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=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 200: + deserialized = self._deserialize("SandboxCustomImage", pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize("SandboxCustomImage", pipeline_response) + + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + + deserialized = self._deserialize("SandboxCustomImage", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + _update_initial.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/sandboxCustomImages/{sandboxCustomImageName}" + } + + @overload + async def begin_update( + self, + resource_group_name: str, + cluster_name: str, + sandbox_custom_image_name: str, + parameters: _models.SandboxCustomImage, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.SandboxCustomImage]: + """Updates a sandbox custom image. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param sandbox_custom_image_name: The name of the sandbox custom image. Required. + :type sandbox_custom_image_name: str + :param parameters: The sandbox custom image parameters. Required. + :type parameters: ~azure.mgmt.kusto.models.SandboxCustomImage + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either SandboxCustomImage or the result of + cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.SandboxCustomImage] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + cluster_name: str, + sandbox_custom_image_name: str, + parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.SandboxCustomImage]: + """Updates a sandbox custom image. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param sandbox_custom_image_name: The name of the sandbox custom image. Required. + :type sandbox_custom_image_name: str + :param parameters: The sandbox custom image parameters. Required. + :type parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either SandboxCustomImage or the result of + cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.SandboxCustomImage] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_update( + self, + resource_group_name: str, + cluster_name: str, + sandbox_custom_image_name: str, + parameters: Union[_models.SandboxCustomImage, IO], + **kwargs: Any + ) -> AsyncLROPoller[_models.SandboxCustomImage]: + """Updates a sandbox custom image. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param sandbox_custom_image_name: The name of the sandbox custom image. Required. + :type sandbox_custom_image_name: str + :param parameters: The sandbox custom image parameters. Is either a SandboxCustomImage type or + a IO type. Required. + :type parameters: ~azure.mgmt.kusto.models.SandboxCustomImage or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either SandboxCustomImage or the result of + cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.SandboxCustomImage] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.SandboxCustomImage] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._update_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + sandbox_custom_image_name=sandbox_custom_image_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("SandboxCustomImage", pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + if polling is True: + polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + begin_update.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/sandboxCustomImages/{sandboxCustomImageName}" + } + + async def _delete_initial( # pylint: disable=inconsistent-return-statements + self, resource_group_name: str, cluster_name: str, sandbox_custom_image_name: str, **kwargs: Any + ) -> None: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + 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( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + sandbox_custom_image_name=sandbox_custom_image_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata["url"], + headers=_headers, + params=_params, + ) + 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=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + + if cls: + return cls(pipeline_response, None, response_headers) + + _delete_initial.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/sandboxCustomImages/{sandboxCustomImageName}" + } + + @distributed_trace_async + async def begin_delete( + self, resource_group_name: str, cluster_name: str, sandbox_custom_image_name: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes a sandbox custom image. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param sandbox_custom_image_name: The name of the sandbox custom image. Required. + :type sandbox_custom_image_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + 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) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delete_initial( # type: ignore + resource_group_name=resource_group_name, + cluster_name=cluster_name, + sandbox_custom_image_name=sandbox_custom_image_name, + api_version=api_version, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) + + if polling is True: + polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + begin_delete.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/sandboxCustomImages/{sandboxCustomImageName}" + } + + @overload + async def check_name_availability( + self, + resource_group_name: str, + cluster_name: str, + resource_name: _models.SandboxCustomImagesCheckNameRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CheckNameResult: + """Checks that the sandbox custom image resource name is valid and is not already in use. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param resource_name: The name of the resource. Required. + :type resource_name: ~azure.mgmt.kusto.models.SandboxCustomImagesCheckNameRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CheckNameResult or the result of cls(response) + :rtype: ~azure.mgmt.kusto.models.CheckNameResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def check_name_availability( + self, + resource_group_name: str, + cluster_name: str, + resource_name: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CheckNameResult: + """Checks that the sandbox custom image resource name is valid and is not already in use. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param resource_name: The name of the resource. Required. + :type resource_name: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CheckNameResult or the result of cls(response) + :rtype: ~azure.mgmt.kusto.models.CheckNameResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def check_name_availability( + self, + resource_group_name: str, + cluster_name: str, + resource_name: Union[_models.SandboxCustomImagesCheckNameRequest, IO], + **kwargs: Any + ) -> _models.CheckNameResult: + """Checks that the sandbox custom image resource name is valid and is not already in use. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param resource_name: The name of the resource. Is either a SandboxCustomImagesCheckNameRequest + type or a IO type. Required. + :type resource_name: ~azure.mgmt.kusto.models.SandboxCustomImagesCheckNameRequest or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CheckNameResult or the result of cls(response) + :rtype: ~azure.mgmt.kusto.models.CheckNameResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.CheckNameResult] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(resource_name, (IOBase, bytes)): + _content = resource_name + else: + _json = self._serialize.body(resource_name, "SandboxCustomImagesCheckNameRequest") + + request = build_check_name_availability_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + template_url=self.check_name_availability.metadata["url"], + headers=_headers, + params=_params, + ) + 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=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize("CheckNameResult", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + check_name_availability.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/sandboxCustomImagesCheckNameAvailability" + } diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_scripts_operations.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_scripts_operations.py index fe557b91257b..26f9bdc107c7 100644 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_scripts_operations.py +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_scripts_operations.py @@ -469,9 +469,7 @@ def get_long_running_output(pipeline_response): return deserialized if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) + polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) else: @@ -555,6 +553,7 @@ async def _update_initial( deserialized = self._deserialize("Script", pipeline_response) if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) response_headers["Azure-AsyncOperation"] = self._deserialize( "str", response.headers.get("Azure-AsyncOperation") ) @@ -726,9 +725,7 @@ def get_long_running_output(pipeline_response): return deserialized if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) + polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) else: @@ -791,6 +788,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements response_headers = {} if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) response_headers["Azure-AsyncOperation"] = self._deserialize( "str", response.headers.get("Azure-AsyncOperation") ) @@ -856,9 +854,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return cls(pipeline_response, None, {}) if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) + polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) else: diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/models/__init__.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/models/__init__.py index 2b0d152852af..c55311857679 100644 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/models/__init__.py +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/models/__init__.py @@ -81,6 +81,9 @@ from ._models_py3 import Resource from ._models_py3 import ResourceSkuCapabilities from ._models_py3 import ResourceSkuZoneDetails +from ._models_py3 import SandboxCustomImage +from ._models_py3 import SandboxCustomImagesCheckNameRequest +from ._models_py3 import SandboxCustomImagesListResult from ._models_py3 import Script from ._models_py3 import ScriptCheckNameRequest from ._models_py3 import ScriptListResult @@ -115,6 +118,7 @@ from ._kusto_management_client_enums import IdentityType from ._kusto_management_client_enums import IotHubDataFormat from ._kusto_management_client_enums import Kind +from ._kusto_management_client_enums import Language from ._kusto_management_client_enums import LanguageExtensionImageName from ._kusto_management_client_enums import LanguageExtensionName from ._kusto_management_client_enums import MigrationClusterRole @@ -127,6 +131,7 @@ from ._kusto_management_client_enums import State from ._kusto_management_client_enums import Status from ._kusto_management_client_enums import Type +from ._kusto_management_client_enums import VnetState from ._patch import __all__ as _patch_all from ._patch import * # pylint: disable=unused-wildcard-import from ._patch import patch_sdk as _patch_sdk @@ -207,6 +212,9 @@ "Resource", "ResourceSkuCapabilities", "ResourceSkuZoneDetails", + "SandboxCustomImage", + "SandboxCustomImagesCheckNameRequest", + "SandboxCustomImagesListResult", "Script", "ScriptCheckNameRequest", "ScriptListResult", @@ -240,6 +248,7 @@ "IdentityType", "IotHubDataFormat", "Kind", + "Language", "LanguageExtensionImageName", "LanguageExtensionName", "MigrationClusterRole", @@ -252,6 +261,7 @@ "State", "Status", "Type", + "VnetState", ] __all__.extend([p for p in _patch_all if p not in __all__]) _patch_sdk() diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/models/_kusto_management_client_enums.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/models/_kusto_management_client_enums.py index 230c2896c4ed..bcd40215c6d2 100644 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/models/_kusto_management_client_enums.py +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/models/_kusto_management_client_enums.py @@ -282,12 +282,20 @@ class Kind(str, Enum, metaclass=CaseInsensitiveEnumMeta): READ_ONLY_FOLLOWING = "ReadOnlyFollowing" +class Language(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The language name, for example Python.""" + + PYTHON = "Python" + + class LanguageExtensionImageName(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Language extension image name.""" R = "R" PYTHON3_6_5 = "Python3_6_5" PYTHON3_10_8 = "Python3_10_8" + PYTHON3_10_8_DL = "Python3_10_8_DL" + PYTHON_CUSTOM_IMAGE = "PythonCustomImage" class LanguageExtensionName(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -386,3 +394,12 @@ class Type(str, Enum, metaclass=CaseInsensitiveEnumMeta): MICROSOFT_KUSTO_CLUSTERS_ATTACHED_DATABASE_CONFIGURATIONS = ( "Microsoft.Kusto/clusters/attachedDatabaseConfigurations" ) + + +class VnetState(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """When enabled, the cluster is deployed into the configured subnet, when disabled it will be + removed from the subnet. + """ + + ENABLED = "Enabled" + DISABLED = "Disabled" diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/models/_models_py3.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/models/_models_py3.py index 4baa74e8de85..20bd97f12add 100644 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/models/_models_py3.py +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/models/_models_py3.py @@ -1120,6 +1120,8 @@ class ClusterUpdate(Resource): # pylint: disable=too-many-instance-attributes :vartype location: str :ivar sku: The SKU of the cluster. :vartype sku: ~azure.mgmt.kusto.models.AzureSku + :ivar zones: The availability zones of the cluster. + :vartype zones: list[str] :ivar identity: The identity of the cluster, if configured. :vartype identity: ~azure.mgmt.kusto.models.Identity :ivar state: The state of the resource. Known values are: "Creating", "Unavailable", "Running", @@ -1208,6 +1210,7 @@ class ClusterUpdate(Resource): # pylint: disable=too-many-instance-attributes "tags": {"key": "tags", "type": "{str}"}, "location": {"key": "location", "type": "str"}, "sku": {"key": "sku", "type": "AzureSku"}, + "zones": {"key": "zones", "type": "[str]"}, "identity": {"key": "identity", "type": "Identity"}, "state": {"key": "properties.state", "type": "str"}, "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, @@ -1251,6 +1254,7 @@ def __init__( # pylint: disable=too-many-locals tags: Optional[Dict[str, str]] = None, location: Optional[str] = None, sku: Optional["_models.AzureSku"] = None, + zones: Optional[List[str]] = None, identity: Optional["_models.Identity"] = None, trusted_external_tenants: Optional[List["_models.TrustedExternalTenant"]] = None, optimized_autoscale: Optional["_models.OptimizedAutoscale"] = None, @@ -1279,6 +1283,8 @@ def __init__( # pylint: disable=too-many-locals :paramtype location: str :keyword sku: The SKU of the cluster. :paramtype sku: ~azure.mgmt.kusto.models.AzureSku + :keyword zones: The availability zones of the cluster. + :paramtype zones: list[str] :keyword identity: The identity of the cluster, if configured. :paramtype identity: ~azure.mgmt.kusto.models.Identity :keyword trusted_external_tenants: The cluster's external tenants. @@ -1334,6 +1340,7 @@ def __init__( # pylint: disable=too-many-locals self.tags = tags self.location = location self.sku = sku + self.zones = zones self.identity = identity self.state = None self.provisioning_state = None @@ -2178,19 +2185,25 @@ class EndpointDetail(_serialization.Model): :ivar port: The port an endpoint is connected to. :vartype port: int + :ivar ip_address: The ip address of the endpoint. + :vartype ip_address: str """ _attribute_map = { "port": {"key": "port", "type": "int"}, + "ip_address": {"key": "ipAddress", "type": "str"}, } - def __init__(self, *, port: Optional[int] = None, **kwargs: Any) -> None: + def __init__(self, *, port: Optional[int] = None, ip_address: Optional[str] = None, **kwargs: Any) -> None: """ :keyword port: The port an endpoint is connected to. :paramtype port: int + :keyword ip_address: The ip address of the endpoint. + :paramtype ip_address: str """ super().__init__(**kwargs) self.port = port + self.ip_address = ip_address class ErrorAdditionalInfo(_serialization.Model): @@ -2935,14 +2948,17 @@ class LanguageExtension(_serialization.Model): :ivar language_extension_name: The language extension name. Known values are: "PYTHON" and "R". :vartype language_extension_name: str or ~azure.mgmt.kusto.models.LanguageExtensionName :ivar language_extension_image_name: The language extension image name. Known values are: "R", - "Python3_6_5", and "Python3_10_8". + "Python3_6_5", "Python3_10_8", "Python3_10_8_DL", and "PythonCustomImage". :vartype language_extension_image_name: str or ~azure.mgmt.kusto.models.LanguageExtensionImageName + :ivar language_extension_custom_image_name: The language extension custom image name. + :vartype language_extension_custom_image_name: str """ _attribute_map = { "language_extension_name": {"key": "languageExtensionName", "type": "str"}, "language_extension_image_name": {"key": "languageExtensionImageName", "type": "str"}, + "language_extension_custom_image_name": {"key": "languageExtensionCustomImageName", "type": "str"}, } def __init__( @@ -2950,6 +2966,7 @@ def __init__( *, language_extension_name: Optional[Union[str, "_models.LanguageExtensionName"]] = None, language_extension_image_name: Optional[Union[str, "_models.LanguageExtensionImageName"]] = None, + language_extension_custom_image_name: Optional[str] = None, **kwargs: Any ) -> None: """ @@ -2957,13 +2974,16 @@ def __init__( "R". :paramtype language_extension_name: str or ~azure.mgmt.kusto.models.LanguageExtensionName :keyword language_extension_image_name: The language extension image name. Known values are: - "R", "Python3_6_5", and "Python3_10_8". + "R", "Python3_6_5", "Python3_10_8", "Python3_10_8_DL", and "PythonCustomImage". :paramtype language_extension_image_name: str or ~azure.mgmt.kusto.models.LanguageExtensionImageName + :keyword language_extension_custom_image_name: The language extension custom image name. + :paramtype language_extension_custom_image_name: str """ super().__init__(**kwargs) self.language_extension_name = language_extension_name self.language_extension_image_name = language_extension_image_name + self.language_extension_custom_image_name = language_extension_custom_image_name class LanguageExtensionsList(_serialization.Model): @@ -4037,6 +4057,137 @@ def __init__(self, **kwargs: Any) -> None: self.capabilities = None +class SandboxCustomImage(ProxyResource): + """Class representing a Kusto sandbox custom image. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar language: The language name, for example Python. "Python" + :vartype language: str or ~azure.mgmt.kusto.models.Language + :ivar language_version: The version of the language. + :vartype language_version: str + :ivar requirements_file_content: The requirements file content. + :vartype requirements_file_content: str + :ivar provisioning_state: The provisioned state of the resource. Known values are: "Running", + "Creating", "Deleting", "Succeeded", "Failed", "Moving", and "Canceled". + :vartype provisioning_state: str or ~azure.mgmt.kusto.models.ProvisioningState + """ + + _validation = { + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "provisioning_state": {"readonly": True}, + } + + _attribute_map = { + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "language": {"key": "properties.language", "type": "str"}, + "language_version": {"key": "properties.languageVersion", "type": "str"}, + "requirements_file_content": {"key": "properties.requirementsFileContent", "type": "str"}, + "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, + } + + def __init__( + self, + *, + language: Optional[Union[str, "_models.Language"]] = None, + language_version: Optional[str] = None, + requirements_file_content: Optional[str] = None, + **kwargs: Any + ) -> None: + """ + :keyword language: The language name, for example Python. "Python" + :paramtype language: str or ~azure.mgmt.kusto.models.Language + :keyword language_version: The version of the language. + :paramtype language_version: str + :keyword requirements_file_content: The requirements file content. + :paramtype requirements_file_content: str + """ + super().__init__(**kwargs) + self.language = language + self.language_version = language_version + self.requirements_file_content = requirements_file_content + self.provisioning_state = None + + +class SandboxCustomImagesCheckNameRequest(_serialization.Model): + """The result returned from a sandboxCustomImage check name availability request. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar name: Sandbox custom image resource name. Required. + :vartype name: str + :ivar type: The type of resource, for instance Microsoft.Kusto/clusters/sandboxCustomImages. + Required. Default value is "Microsoft.Kusto/clusters/sandboxCustomImages". + :vartype type: str + """ + + _validation = { + "name": {"required": True}, + "type": {"required": True, "constant": True}, + } + + _attribute_map = { + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + } + + type = "Microsoft.Kusto/clusters/sandboxCustomImages" + + def __init__(self, *, name: str, **kwargs: Any) -> None: + """ + :keyword name: Sandbox custom image resource name. Required. + :paramtype name: str + """ + super().__init__(**kwargs) + self.name = name + + +class SandboxCustomImagesListResult(_serialization.Model): + """The list Kusto sandbox custom images operation response. + + :ivar next_link: Link to the next page of results. + :vartype next_link: str + :ivar value: The list of Kusto sandbox custom images. + :vartype value: list[~azure.mgmt.kusto.models.SandboxCustomImage] + """ + + _attribute_map = { + "next_link": {"key": "nextLink", "type": "str"}, + "value": {"key": "value", "type": "[SandboxCustomImage]"}, + } + + def __init__( + self, + *, + next_link: Optional[str] = None, + value: Optional[List["_models.SandboxCustomImage"]] = None, + **kwargs: Any + ) -> None: + """ + :keyword next_link: Link to the next page of results. + :paramtype next_link: str + :keyword value: The list of Kusto sandbox custom images. + :paramtype value: list[~azure.mgmt.kusto.models.SandboxCustomImage] + """ + super().__init__(**kwargs) + self.next_link = next_link + self.value = value + + class Script(ProxyResource): """Class representing a database script. @@ -4498,6 +4649,9 @@ class VirtualNetworkConfiguration(_serialization.Model): :ivar data_management_public_ip_id: Data management's service public IP address resource id. Required. :vartype data_management_public_ip_id: str + :ivar state: When enabled, the cluster is deployed into the configured subnet, when disabled it + will be removed from the subnet. Known values are: "Enabled" and "Disabled". + :vartype state: str or ~azure.mgmt.kusto.models.VnetState """ _validation = { @@ -4510,10 +4664,17 @@ class VirtualNetworkConfiguration(_serialization.Model): "subnet_id": {"key": "subnetId", "type": "str"}, "engine_public_ip_id": {"key": "enginePublicIpId", "type": "str"}, "data_management_public_ip_id": {"key": "dataManagementPublicIpId", "type": "str"}, + "state": {"key": "state", "type": "str"}, } def __init__( - self, *, subnet_id: str, engine_public_ip_id: str, data_management_public_ip_id: str, **kwargs: Any + self, + *, + subnet_id: str, + engine_public_ip_id: str, + data_management_public_ip_id: str, + state: Union[str, "_models.VnetState"] = "Enabled", + **kwargs: Any ) -> None: """ :keyword subnet_id: The subnet resource id. Required. @@ -4523,8 +4684,12 @@ def __init__( :keyword data_management_public_ip_id: Data management's service public IP address resource id. Required. :paramtype data_management_public_ip_id: str + :keyword state: When enabled, the cluster is deployed into the configured subnet, when disabled + it will be removed from the subnet. Known values are: "Enabled" and "Disabled". + :paramtype state: str or ~azure.mgmt.kusto.models.VnetState """ super().__init__(**kwargs) self.subnet_id = subnet_id self.engine_public_ip_id = engine_public_ip_id self.data_management_public_ip_id = data_management_public_ip_id + self.state = state diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/__init__.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/__init__.py index cae10efe6d88..348efd05c673 100644 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/__init__.py +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/__init__.py @@ -15,6 +15,7 @@ from ._database_operations import DatabaseOperations from ._database_principal_assignments_operations import DatabasePrincipalAssignmentsOperations from ._scripts_operations import ScriptsOperations +from ._sandbox_custom_images_operations import SandboxCustomImagesOperations from ._private_endpoint_connections_operations import PrivateEndpointConnectionsOperations from ._private_link_resources_operations import PrivateLinkResourcesOperations from ._data_connections_operations import DataConnectionsOperations @@ -36,6 +37,7 @@ "DatabaseOperations", "DatabasePrincipalAssignmentsOperations", "ScriptsOperations", + "SandboxCustomImagesOperations", "PrivateEndpointConnectionsOperations", "PrivateLinkResourcesOperations", "DataConnectionsOperations", diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_attached_database_configurations_operations.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_attached_database_configurations_operations.py index 668beeee5d19..7a3e5ead52b0 100644 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_attached_database_configurations_operations.py +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_attached_database_configurations_operations.py @@ -30,7 +30,7 @@ from .. import models as _models from .._serialization import Serializer -from .._vendor import _convert_request, _format_url_section +from .._vendor import _convert_request T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -45,7 +45,7 @@ def build_check_name_availability_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-02")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-15")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -62,7 +62,7 @@ def build_check_name_availability_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -81,7 +81,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: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-02")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-15")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -97,7 +97,7 @@ def build_list_by_cluster_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -118,7 +118,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-02")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-15")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -137,7 +137,7 @@ def build_get_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -158,7 +158,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: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-02")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-15")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -178,7 +178,7 @@ def build_create_or_update_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -201,7 +201,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-02")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-15")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -220,7 +220,7 @@ def build_delete_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -790,9 +790,7 @@ def get_long_running_output(pipeline_response): return deserialized if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) + polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(PollingMethod, NoPolling()) else: @@ -854,6 +852,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements response_headers = {} if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) response_headers["Azure-AsyncOperation"] = self._deserialize( "str", response.headers.get("Azure-AsyncOperation") ) @@ -917,9 +916,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return cls(pipeline_response, None, {}) if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) + polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(PollingMethod, NoPolling()) else: diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_cluster_principal_assignments_operations.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_cluster_principal_assignments_operations.py index 113637571b95..c65f43bcff71 100644 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_cluster_principal_assignments_operations.py +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_cluster_principal_assignments_operations.py @@ -30,7 +30,7 @@ from .. import models as _models from .._serialization import Serializer -from .._vendor import _convert_request, _format_url_section +from .._vendor import _convert_request T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -45,7 +45,7 @@ def build_check_name_availability_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-02")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-15")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -62,7 +62,7 @@ def build_check_name_availability_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -81,7 +81,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-02")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-15")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -100,7 +100,7 @@ def build_get_request( ), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -117,7 +117,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: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-02")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-15")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -137,7 +137,7 @@ def build_create_or_update_request( ), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -156,7 +156,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-02")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-15")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -175,7 +175,7 @@ def build_delete_request( ), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -190,7 +190,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: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-02")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-15")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -206,7 +206,7 @@ def build_list_request(resource_group_name: str, cluster_name: str, subscription "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str", pattern=r"^.*$"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -671,9 +671,7 @@ def get_long_running_output(pipeline_response): return deserialized if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) + polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(PollingMethod, NoPolling()) else: @@ -735,6 +733,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements response_headers = {} if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) response_headers["Azure-AsyncOperation"] = self._deserialize( "str", response.headers.get("Azure-AsyncOperation") ) @@ -797,9 +796,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return cls(pipeline_response, None, {}) if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) + polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(PollingMethod, NoPolling()) else: diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_clusters_operations.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_clusters_operations.py index 791eb2fa538d..d0d17cad45ee 100644 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_clusters_operations.py +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_clusters_operations.py @@ -30,7 +30,7 @@ from .. import models as _models from .._serialization import Serializer -from .._vendor import _convert_request, _format_url_section +from .._vendor import _convert_request T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -43,7 +43,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: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-02")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-15")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -59,7 +59,7 @@ def build_get_request(resource_group_name: str, cluster_name: str, subscription_ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -82,7 +82,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: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-02")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-15")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -99,7 +99,7 @@ def build_create_or_update_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -122,7 +122,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-02")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-15")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -139,7 +139,7 @@ def build_update_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -160,7 +160,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-02")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-15")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -176,7 +176,7 @@ def build_delete_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -191,7 +191,7 @@ def build_stop_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: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-02")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-15")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -207,7 +207,7 @@ def build_stop_request(resource_group_name: str, cluster_name: str, subscription "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -224,7 +224,7 @@ def build_start_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-02")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-15")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -240,7 +240,7 @@ def build_start_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -257,7 +257,7 @@ def build_migrate_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-02")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-15")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -274,7 +274,7 @@ def build_migrate_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -293,7 +293,7 @@ def build_list_follower_databases_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-02")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-15")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -309,7 +309,7 @@ def build_list_follower_databases_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -326,7 +326,7 @@ def build_detach_follower_databases_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-02")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-15")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -343,7 +343,7 @@ def build_detach_follower_databases_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -362,7 +362,7 @@ def build_diagnose_virtual_network_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-02")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-15")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -378,7 +378,7 @@ def build_diagnose_virtual_network_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -393,7 +393,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: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-02")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-15")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -408,7 +408,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -423,7 +423,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: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-02")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-15")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -432,7 +432,7 @@ def build_list_request(subscription_id: str, **kwargs: Any) -> HttpRequest: "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -447,7 +447,7 @@ def build_list_skus_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: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-02")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-15")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -456,7 +456,7 @@ def build_list_skus_request(subscription_id: str, **kwargs: Any) -> HttpRequest: "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -471,7 +471,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: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-02")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-15")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -485,7 +485,7 @@ def build_check_name_availability_request(location: str, subscription_id: str, * "location": _SERIALIZER.url("location", location, "str", min_length=1), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -504,7 +504,7 @@ def build_list_skus_by_resource_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-02")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-15")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -520,7 +520,7 @@ def build_list_skus_by_resource_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -537,7 +537,7 @@ def build_list_outbound_network_dependencies_endpoints_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-02")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-15")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -553,7 +553,7 @@ def build_list_outbound_network_dependencies_endpoints_request( "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str", pattern=r"^.*$"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -570,7 +570,7 @@ def build_list_language_extensions_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-02")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-15")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -586,7 +586,7 @@ def build_list_language_extensions_request( "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str", pattern=r"^.*$"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -603,7 +603,7 @@ def build_add_language_extensions_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-02")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-15")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -620,7 +620,7 @@ def build_add_language_extensions_request( "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str", pattern=r"^.*$"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -639,7 +639,7 @@ def build_remove_language_extensions_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-02")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-15")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -656,7 +656,7 @@ def build_remove_language_extensions_request( "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str", pattern=r"^.*$"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -994,9 +994,7 @@ def get_long_running_output(pipeline_response): return deserialized if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) + polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(PollingMethod, NoPolling()) else: @@ -1078,6 +1076,7 @@ def _update_initial( deserialized = self._deserialize("Cluster", pipeline_response) if response.status_code == 201: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) response_headers["Azure-AsyncOperation"] = self._deserialize( "str", response.headers.get("Azure-AsyncOperation") ) @@ -1085,6 +1084,7 @@ def _update_initial( deserialized = self._deserialize("Cluster", pipeline_response) if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) response_headers["Azure-AsyncOperation"] = self._deserialize( "str", response.headers.get("Azure-AsyncOperation") ) @@ -1249,9 +1249,7 @@ def get_long_running_output(pipeline_response): return deserialized if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) + polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(PollingMethod, NoPolling()) else: @@ -1312,6 +1310,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements response_headers = {} if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) response_headers["Azure-AsyncOperation"] = self._deserialize( "str", response.headers.get("Azure-AsyncOperation") ) @@ -1369,9 +1368,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return cls(pipeline_response, None, {}) if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) + polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(PollingMethod, NoPolling()) else: @@ -1432,6 +1429,7 @@ def _stop_initial( # pylint: disable=inconsistent-return-statements response_headers = {} if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) response_headers["Azure-AsyncOperation"] = self._deserialize( "str", response.headers.get("Azure-AsyncOperation") ) @@ -1489,9 +1487,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return cls(pipeline_response, None, {}) if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) + polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(PollingMethod, NoPolling()) else: @@ -1552,6 +1548,7 @@ def _start_initial( # pylint: disable=inconsistent-return-statements response_headers = {} if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) response_headers["Azure-AsyncOperation"] = self._deserialize( "str", response.headers.get("Azure-AsyncOperation") ) @@ -1609,9 +1606,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return cls(pipeline_response, None, {}) if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) + polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(PollingMethod, NoPolling()) else: @@ -1688,6 +1683,7 @@ def _migrate_initial( # pylint: disable=inconsistent-return-statements response_headers = {} if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) response_headers["Azure-AsyncOperation"] = self._deserialize( "str", response.headers.get("Azure-AsyncOperation") ) @@ -1830,9 +1826,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return cls(pipeline_response, None, {}) if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) + polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(PollingMethod, NoPolling()) else: @@ -2003,6 +1997,7 @@ def _detach_follower_databases_initial( # pylint: disable=inconsistent-return-s response_headers = {} if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) response_headers["Azure-AsyncOperation"] = self._deserialize( "str", response.headers.get("Azure-AsyncOperation") ) @@ -2145,9 +2140,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return cls(pipeline_response, None, {}) if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) + polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(PollingMethod, NoPolling()) else: @@ -2212,6 +2205,7 @@ def _diagnose_virtual_network_initial( deserialized = self._deserialize("DiagnoseVirtualNetworkResult", pipeline_response) if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) response_headers["Azure-AsyncOperation"] = self._deserialize( "str", response.headers.get("Azure-AsyncOperation") ) @@ -2277,9 +2271,7 @@ def get_long_running_output(pipeline_response): return deserialized if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) + polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(PollingMethod, NoPolling()) else: @@ -3005,6 +2997,7 @@ def _add_language_extensions_initial( # pylint: disable=inconsistent-return-sta response_headers = {} if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) response_headers["Azure-AsyncOperation"] = self._deserialize( "str", response.headers.get("Azure-AsyncOperation") ) @@ -3147,9 +3140,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return cls(pipeline_response, None, {}) if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) + polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(PollingMethod, NoPolling()) else: @@ -3226,6 +3217,7 @@ def _remove_language_extensions_initial( # pylint: disable=inconsistent-return- response_headers = {} if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) response_headers["Azure-AsyncOperation"] = self._deserialize( "str", response.headers.get("Azure-AsyncOperation") ) @@ -3368,9 +3360,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return cls(pipeline_response, None, {}) if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) + polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(PollingMethod, NoPolling()) else: diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_data_connections_operations.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_data_connections_operations.py index d6a713437dcc..73f2eed1f6ef 100644 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_data_connections_operations.py +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_data_connections_operations.py @@ -30,7 +30,7 @@ from .. import models as _models from .._serialization import Serializer -from .._vendor import _convert_request, _format_url_section +from .._vendor import _convert_request T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -45,7 +45,7 @@ def build_list_by_database_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-02")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-15")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -62,7 +62,7 @@ def build_list_by_database_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -79,7 +79,7 @@ def build_data_connection_validation_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-02")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-15")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -97,7 +97,7 @@ def build_data_connection_validation_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -116,7 +116,7 @@ def build_check_name_availability_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-02")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-15")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -134,7 +134,7 @@ def build_check_name_availability_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -158,7 +158,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-02")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-15")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -176,7 +176,7 @@ def build_get_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -198,7 +198,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: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-02")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-15")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -217,7 +217,7 @@ def build_create_or_update_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -241,7 +241,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-02")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-15")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -260,7 +260,7 @@ def build_update_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -284,7 +284,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-02")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-15")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -302,7 +302,7 @@ def build_delete_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -492,6 +492,7 @@ def _data_connection_validation_initial( deserialized = self._deserialize("DataConnectionValidationListResult", pipeline_response) if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) response_headers["Azure-AsyncOperation"] = self._deserialize( "str", response.headers.get("Azure-AsyncOperation") ) @@ -656,9 +657,7 @@ def get_long_running_output(pipeline_response): return deserialized if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) + polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(PollingMethod, NoPolling()) else: @@ -1142,9 +1141,7 @@ def get_long_running_output(pipeline_response): return deserialized if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) + polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(PollingMethod, NoPolling()) else: @@ -1228,6 +1225,7 @@ def _update_initial( deserialized = self._deserialize("DataConnection", pipeline_response) if response.status_code == 201: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) response_headers["Azure-AsyncOperation"] = self._deserialize( "str", response.headers.get("Azure-AsyncOperation") ) @@ -1235,6 +1233,7 @@ def _update_initial( deserialized = self._deserialize("DataConnection", pipeline_response) if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) response_headers["Azure-AsyncOperation"] = self._deserialize( "str", response.headers.get("Azure-AsyncOperation") ) @@ -1406,9 +1405,7 @@ def get_long_running_output(pipeline_response): return deserialized if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) + polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(PollingMethod, NoPolling()) else: @@ -1471,6 +1468,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements response_headers = {} if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) response_headers["Azure-AsyncOperation"] = self._deserialize( "str", response.headers.get("Azure-AsyncOperation") ) @@ -1536,9 +1534,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return cls(pipeline_response, None, {}) if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) + polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(PollingMethod, NoPolling()) else: diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_database_operations.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_database_operations.py index 4f022b30fd40..bac876d0cf2a 100644 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_database_operations.py +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_database_operations.py @@ -26,7 +26,7 @@ from .. import models as _models from .._serialization import Serializer -from .._vendor import _convert_request, _format_url_section +from .._vendor import _convert_request T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -41,7 +41,7 @@ def build_invite_follower_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-02")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-15")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -59,7 +59,7 @@ def build_invite_follower_request( "databaseName": _SERIALIZER.url("database_name", database_name, "str", pattern=r"^.*$"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_database_principal_assignments_operations.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_database_principal_assignments_operations.py index 646c3feea713..142a7dea0b98 100644 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_database_principal_assignments_operations.py +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_database_principal_assignments_operations.py @@ -30,7 +30,7 @@ from .. import models as _models from .._serialization import Serializer -from .._vendor import _convert_request, _format_url_section +from .._vendor import _convert_request T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -45,7 +45,7 @@ def build_check_name_availability_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-02")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-15")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -63,7 +63,7 @@ def build_check_name_availability_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -87,7 +87,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-02")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-15")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -107,7 +107,7 @@ def build_get_request( ), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -129,7 +129,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: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-02")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-15")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -150,7 +150,7 @@ def build_create_or_update_request( ), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -174,7 +174,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-02")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-15")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -194,7 +194,7 @@ def build_delete_request( ), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -211,7 +211,7 @@ def build_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-02")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-15")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -228,7 +228,7 @@ def build_list_request( "databaseName": _SERIALIZER.url("database_name", database_name, "str", pattern=r"^.*$"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -723,9 +723,7 @@ def get_long_running_output(pipeline_response): return deserialized if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) + polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(PollingMethod, NoPolling()) else: @@ -793,6 +791,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements response_headers = {} if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) response_headers["Azure-AsyncOperation"] = self._deserialize( "str", response.headers.get("Azure-AsyncOperation") ) @@ -863,9 +862,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return cls(pipeline_response, None, {}) if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) + polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(PollingMethod, NoPolling()) else: diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_databases_operations.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_databases_operations.py index a7d714c4f147..a167b3699fa9 100644 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_databases_operations.py +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_databases_operations.py @@ -30,7 +30,7 @@ from .. import models as _models from .._serialization import Serializer -from .._vendor import _convert_request, _format_url_section +from .._vendor import _convert_request T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -45,7 +45,7 @@ def build_check_name_availability_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-02")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-15")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -62,7 +62,7 @@ def build_check_name_availability_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -87,7 +87,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: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-02")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-15")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -103,7 +103,7 @@ def build_list_by_cluster_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -124,7 +124,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-02")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-15")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -141,7 +141,7 @@ def build_get_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -164,7 +164,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: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-02")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-15")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -182,7 +182,7 @@ def build_create_or_update_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -209,7 +209,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-02")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-15")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -227,7 +227,7 @@ def build_update_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -248,7 +248,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-02")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-15")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -265,7 +265,7 @@ def build_delete_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -282,7 +282,7 @@ def build_list_principals_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-02")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-15")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -299,7 +299,7 @@ def build_list_principals_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -316,7 +316,7 @@ def build_add_principals_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-02")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-15")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -334,7 +334,7 @@ def build_add_principals_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -353,7 +353,7 @@ def build_remove_principals_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-02")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-15")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -371,7 +371,7 @@ def build_remove_principals_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -961,9 +961,7 @@ def get_long_running_output(pipeline_response): return deserialized if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) + polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(PollingMethod, NoPolling()) else: @@ -1047,6 +1045,7 @@ def _update_initial( deserialized = self._deserialize("Database", pipeline_response) if response.status_code == 201: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) response_headers["Azure-AsyncOperation"] = self._deserialize( "str", response.headers.get("Azure-AsyncOperation") ) @@ -1054,6 +1053,7 @@ def _update_initial( deserialized = self._deserialize("Database", pipeline_response) if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) response_headers["Azure-AsyncOperation"] = self._deserialize( "str", response.headers.get("Azure-AsyncOperation") ) @@ -1228,9 +1228,7 @@ def get_long_running_output(pipeline_response): return deserialized if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) + polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(PollingMethod, NoPolling()) else: @@ -1292,6 +1290,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements response_headers = {} if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) response_headers["Azure-AsyncOperation"] = self._deserialize( "str", response.headers.get("Azure-AsyncOperation") ) @@ -1354,9 +1353,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return cls(pipeline_response, None, {}) if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) + polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(PollingMethod, NoPolling()) else: diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_managed_private_endpoints_operations.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_managed_private_endpoints_operations.py index 870d669578d5..07b5863c4f09 100644 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_managed_private_endpoints_operations.py +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_managed_private_endpoints_operations.py @@ -30,7 +30,7 @@ from .. import models as _models from .._serialization import Serializer -from .._vendor import _convert_request, _format_url_section +from .._vendor import _convert_request T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -45,7 +45,7 @@ def build_check_name_availability_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-02")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-15")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -62,7 +62,7 @@ def build_check_name_availability_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -79,7 +79,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: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-02")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-15")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -95,7 +95,7 @@ def build_list_request(resource_group_name: str, cluster_name: str, subscription "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str", pattern=r"^.*$"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -112,7 +112,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-02")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-15")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -131,7 +131,7 @@ def build_get_request( ), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -148,7 +148,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: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-02")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-15")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -168,7 +168,7 @@ def build_create_or_update_request( ), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -187,7 +187,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-02")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-15")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -207,7 +207,7 @@ def build_update_request( ), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -226,7 +226,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-02")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-15")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -245,7 +245,7 @@ def build_delete_request( ), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -807,9 +807,7 @@ def get_long_running_output(pipeline_response): return deserialized if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) + polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(PollingMethod, NoPolling()) else: @@ -891,6 +889,7 @@ def _update_initial( deserialized = self._deserialize("ManagedPrivateEndpoint", pipeline_response) if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) response_headers["Azure-AsyncOperation"] = self._deserialize( "str", response.headers.get("Azure-AsyncOperation") ) @@ -1052,9 +1051,7 @@ def get_long_running_output(pipeline_response): return deserialized if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) + polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(PollingMethod, NoPolling()) else: @@ -1116,6 +1113,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements response_headers = {} if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) response_headers["Azure-AsyncOperation"] = self._deserialize( "str", response.headers.get("Azure-AsyncOperation") ) @@ -1178,9 +1176,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return cls(pipeline_response, None, {}) if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) + polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(PollingMethod, NoPolling()) else: diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_operations.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_operations.py index 372fd901cfe8..2dc4811cf67a 100644 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_operations.py +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_operations.py @@ -40,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: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-02")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-15")) accept = _headers.pop("Accept", "application/json") # Construct URL diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_operations_results_location_operations.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_operations_results_location_operations.py index 2dc82586e910..e4822a5002fc 100644 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_operations_results_location_operations.py +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_operations_results_location_operations.py @@ -25,7 +25,7 @@ from .. import models as _models from .._serialization import Serializer -from .._vendor import _convert_request, _format_url_section +from .._vendor import _convert_request T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -37,7 +37,7 @@ def build_get_request(location: str, operation_id: str, subscription_id: str, **kwargs: Any) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-02")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-15")) # Construct URL _url = kwargs.pop( "template_url", @@ -49,7 +49,7 @@ def build_get_request(location: str, operation_id: str, subscription_id: str, ** "operationId": _SERIALIZER.url("operation_id", operation_id, "str", min_length=1), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_operations_results_operations.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_operations_results_operations.py index 5cc408b4e220..d18545004c1a 100644 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_operations_results_operations.py +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_operations_results_operations.py @@ -25,7 +25,7 @@ from .. import models as _models from .._serialization import Serializer -from .._vendor import _convert_request, _format_url_section +from .._vendor import _convert_request T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -38,7 +38,7 @@ def build_get_request(location: str, operation_id: str, subscription_id: str, ** _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-02")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-15")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -52,7 +52,7 @@ def build_get_request(location: str, operation_id: str, subscription_id: str, ** "operationId": _SERIALIZER.url("operation_id", operation_id, "str", min_length=1), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_private_endpoint_connections_operations.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_private_endpoint_connections_operations.py index 922d5afd550e..570f0d1e68d5 100644 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_private_endpoint_connections_operations.py +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_private_endpoint_connections_operations.py @@ -30,7 +30,7 @@ from .. import models as _models from .._serialization import Serializer -from .._vendor import _convert_request, _format_url_section +from .._vendor import _convert_request T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -43,7 +43,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: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-02")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-15")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -59,7 +59,7 @@ def build_list_request(resource_group_name: str, cluster_name: str, subscription "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str", pattern=r"^.*$"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -80,7 +80,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-02")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-15")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -99,7 +99,7 @@ def build_get_request( ), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -120,7 +120,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: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-02")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-15")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -140,7 +140,7 @@ def build_create_or_update_request( ), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -163,7 +163,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-02")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-15")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -182,7 +182,7 @@ def build_delete_request( ), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -592,9 +592,7 @@ def get_long_running_output(pipeline_response): return deserialized if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) + polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(PollingMethod, NoPolling()) else: @@ -656,6 +654,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements response_headers = {} if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) response_headers["Azure-AsyncOperation"] = self._deserialize( "str", response.headers.get("Azure-AsyncOperation") ) @@ -718,9 +717,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return cls(pipeline_response, None, {}) if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) + polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(PollingMethod, NoPolling()) else: diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_private_link_resources_operations.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_private_link_resources_operations.py index 396db53dafaf..5f0b5f7db373 100644 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_private_link_resources_operations.py +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_private_link_resources_operations.py @@ -27,7 +27,7 @@ from .. import models as _models from .._serialization import Serializer -from .._vendor import _convert_request, _format_url_section +from .._vendor import _convert_request T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -40,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: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-02")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-15")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -56,7 +56,7 @@ def build_list_request(resource_group_name: str, cluster_name: str, subscription "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str", pattern=r"^.*$"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -73,7 +73,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-02")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-15")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -92,7 +92,7 @@ def build_get_request( ), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_sandbox_custom_images_operations.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_sandbox_custom_images_operations.py new file mode 100644 index 000000000000..b18519d4ad9e --- /dev/null +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_sandbox_custom_images_operations.py @@ -0,0 +1,1191 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from io import IOBase +from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload +import urllib.parse + +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models +from .._serialization import Serializer +from .._vendor import _convert_request + +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False + + +def build_list_by_cluster_request( + 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: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/sandboxCustomImages", + ) # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str", pattern=r"^.*$"), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_get_request( + resource_group_name: str, cluster_name: str, sandbox_custom_image_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: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/sandboxCustomImages/{sandboxCustomImageName}", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str", pattern=r"^.*$"), + "sandboxCustomImageName": _SERIALIZER.url( + "sandbox_custom_image_name", sandbox_custom_image_name, "str", pattern=r"^.*$" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_create_or_update_request( + resource_group_name: str, cluster_name: str, sandbox_custom_image_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: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-15")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/sandboxCustomImages/{sandboxCustomImageName}", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str", pattern=r"^.*$"), + "sandboxCustomImageName": _SERIALIZER.url( + "sandbox_custom_image_name", sandbox_custom_image_name, "str", pattern=r"^.*$" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_update_request( + resource_group_name: str, cluster_name: str, sandbox_custom_image_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: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-15")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/sandboxCustomImages/{sandboxCustomImageName}", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str", pattern=r"^.*$"), + "sandboxCustomImageName": _SERIALIZER.url( + "sandbox_custom_image_name", sandbox_custom_image_name, "str", pattern=r"^.*$" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_delete_request( + resource_group_name: str, cluster_name: str, sandbox_custom_image_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: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/sandboxCustomImages/{sandboxCustomImageName}", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str", pattern=r"^.*$"), + "sandboxCustomImageName": _SERIALIZER.url( + "sandbox_custom_image_name", sandbox_custom_image_name, "str", pattern=r"^.*$" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_check_name_availability_request( + 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: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-15")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/sandboxCustomImagesCheckNameAvailability", + ) # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str", pattern=r"^.*$"), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +class SandboxCustomImagesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.kusto.KustoManagementClient`'s + :attr:`sandbox_custom_images` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list_by_cluster( + self, resource_group_name: str, cluster_name: str, **kwargs: Any + ) -> Iterable["_models.SandboxCustomImage"]: + """Returns the list of the existing sandbox custom images of the given Kusto cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either SandboxCustomImage or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.kusto.models.SandboxCustomImage] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + cls: ClsType[_models.SandboxCustomImagesListResult] = kwargs.pop("cls", None) + + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + request = build_list_by_cluster_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_by_cluster.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("SandboxCustomImagesListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return None, iter(list_of_elem) + + 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=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + list_by_cluster.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/sandboxCustomImages" + } + + @distributed_trace + def get( + self, resource_group_name: str, cluster_name: str, sandbox_custom_image_name: str, **kwargs: Any + ) -> _models.SandboxCustomImage: + """Returns a sandbox custom image. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param sandbox_custom_image_name: The name of the sandbox custom image. Required. + :type sandbox_custom_image_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SandboxCustomImage or the result of cls(response) + :rtype: ~azure.mgmt.kusto.models.SandboxCustomImage + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + cls: ClsType[_models.SandboxCustomImage] = kwargs.pop("cls", None) + + request = build_get_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + sandbox_custom_image_name=sandbox_custom_image_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata["url"], + headers=_headers, + params=_params, + ) + 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=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize("SandboxCustomImage", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/sandboxCustomImages/{sandboxCustomImageName}" + } + + def _create_or_update_initial( + self, + resource_group_name: str, + cluster_name: str, + sandbox_custom_image_name: str, + parameters: Union[_models.SandboxCustomImage, IO], + **kwargs: Any + ) -> _models.SandboxCustomImage: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.SandboxCustomImage] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _json = self._serialize.body(parameters, "SandboxCustomImage") + + request = build_create_or_update_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + sandbox_custom_image_name=sandbox_custom_image_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + template_url=self._create_or_update_initial.metadata["url"], + headers=_headers, + params=_params, + ) + 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=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize("SandboxCustomImage", pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize("SandboxCustomImage", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + _create_or_update_initial.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/sandboxCustomImages/{sandboxCustomImageName}" + } + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + cluster_name: str, + sandbox_custom_image_name: str, + parameters: _models.SandboxCustomImage, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.SandboxCustomImage]: + """Creates or updates a sandbox custom image. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param sandbox_custom_image_name: The name of the sandbox custom image. Required. + :type sandbox_custom_image_name: str + :param parameters: The sandbox custom image parameters. Required. + :type parameters: ~azure.mgmt.kusto.models.SandboxCustomImage + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either SandboxCustomImage or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.SandboxCustomImage] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + cluster_name: str, + sandbox_custom_image_name: str, + parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.SandboxCustomImage]: + """Creates or updates a sandbox custom image. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param sandbox_custom_image_name: The name of the sandbox custom image. Required. + :type sandbox_custom_image_name: str + :param parameters: The sandbox custom image parameters. Required. + :type parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either SandboxCustomImage or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.SandboxCustomImage] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + cluster_name: str, + sandbox_custom_image_name: str, + parameters: Union[_models.SandboxCustomImage, IO], + **kwargs: Any + ) -> LROPoller[_models.SandboxCustomImage]: + """Creates or updates a sandbox custom image. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param sandbox_custom_image_name: The name of the sandbox custom image. Required. + :type sandbox_custom_image_name: str + :param parameters: The sandbox custom image parameters. Is either a SandboxCustomImage type or + a IO type. Required. + :type parameters: ~azure.mgmt.kusto.models.SandboxCustomImage or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either SandboxCustomImage or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.SandboxCustomImage] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.SandboxCustomImage] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + sandbox_custom_image_name=sandbox_custom_image_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("SandboxCustomImage", pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + if polling is True: + polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + begin_create_or_update.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/sandboxCustomImages/{sandboxCustomImageName}" + } + + def _update_initial( + self, + resource_group_name: str, + cluster_name: str, + sandbox_custom_image_name: str, + parameters: Union[_models.SandboxCustomImage, IO], + **kwargs: Any + ) -> _models.SandboxCustomImage: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.SandboxCustomImage] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _json = self._serialize.body(parameters, "SandboxCustomImage") + + request = build_update_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + sandbox_custom_image_name=sandbox_custom_image_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + template_url=self._update_initial.metadata["url"], + headers=_headers, + params=_params, + ) + 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=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 200: + deserialized = self._deserialize("SandboxCustomImage", pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize("SandboxCustomImage", pipeline_response) + + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + + deserialized = self._deserialize("SandboxCustomImage", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + _update_initial.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/sandboxCustomImages/{sandboxCustomImageName}" + } + + @overload + def begin_update( + self, + resource_group_name: str, + cluster_name: str, + sandbox_custom_image_name: str, + parameters: _models.SandboxCustomImage, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.SandboxCustomImage]: + """Updates a sandbox custom image. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param sandbox_custom_image_name: The name of the sandbox custom image. Required. + :type sandbox_custom_image_name: str + :param parameters: The sandbox custom image parameters. Required. + :type parameters: ~azure.mgmt.kusto.models.SandboxCustomImage + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either SandboxCustomImage or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.SandboxCustomImage] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + cluster_name: str, + sandbox_custom_image_name: str, + parameters: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.SandboxCustomImage]: + """Updates a sandbox custom image. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param sandbox_custom_image_name: The name of the sandbox custom image. Required. + :type sandbox_custom_image_name: str + :param parameters: The sandbox custom image parameters. Required. + :type parameters: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either SandboxCustomImage or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.SandboxCustomImage] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_update( + self, + resource_group_name: str, + cluster_name: str, + sandbox_custom_image_name: str, + parameters: Union[_models.SandboxCustomImage, IO], + **kwargs: Any + ) -> LROPoller[_models.SandboxCustomImage]: + """Updates a sandbox custom image. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param sandbox_custom_image_name: The name of the sandbox custom image. Required. + :type sandbox_custom_image_name: str + :param parameters: The sandbox custom image parameters. Is either a SandboxCustomImage type or + a IO type. Required. + :type parameters: ~azure.mgmt.kusto.models.SandboxCustomImage or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either SandboxCustomImage or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.SandboxCustomImage] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.SandboxCustomImage] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._update_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + sandbox_custom_image_name=sandbox_custom_image_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("SandboxCustomImage", pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + if polling is True: + polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + begin_update.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/sandboxCustomImages/{sandboxCustomImageName}" + } + + def _delete_initial( # pylint: disable=inconsistent-return-statements + self, resource_group_name: str, cluster_name: str, sandbox_custom_image_name: str, **kwargs: Any + ) -> None: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + 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( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + sandbox_custom_image_name=sandbox_custom_image_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata["url"], + headers=_headers, + params=_params, + ) + 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=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + + if cls: + return cls(pipeline_response, None, response_headers) + + _delete_initial.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/sandboxCustomImages/{sandboxCustomImageName}" + } + + @distributed_trace + def begin_delete( + self, resource_group_name: str, cluster_name: str, sandbox_custom_image_name: str, **kwargs: Any + ) -> LROPoller[None]: + """Deletes a sandbox custom image. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param sandbox_custom_image_name: The name of the sandbox custom image. Required. + :type sandbox_custom_image_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + 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) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_initial( # type: ignore + resource_group_name=resource_group_name, + cluster_name=cluster_name, + sandbox_custom_image_name=sandbox_custom_image_name, + api_version=api_version, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) + + if polling is True: + polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + begin_delete.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/sandboxCustomImages/{sandboxCustomImageName}" + } + + @overload + def check_name_availability( + self, + resource_group_name: str, + cluster_name: str, + resource_name: _models.SandboxCustomImagesCheckNameRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CheckNameResult: + """Checks that the sandbox custom image resource name is valid and is not already in use. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param resource_name: The name of the resource. Required. + :type resource_name: ~azure.mgmt.kusto.models.SandboxCustomImagesCheckNameRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CheckNameResult or the result of cls(response) + :rtype: ~azure.mgmt.kusto.models.CheckNameResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def check_name_availability( + self, + resource_group_name: str, + cluster_name: str, + resource_name: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CheckNameResult: + """Checks that the sandbox custom image resource name is valid and is not already in use. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param resource_name: The name of the resource. Required. + :type resource_name: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CheckNameResult or the result of cls(response) + :rtype: ~azure.mgmt.kusto.models.CheckNameResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def check_name_availability( + self, + resource_group_name: str, + cluster_name: str, + resource_name: Union[_models.SandboxCustomImagesCheckNameRequest, IO], + **kwargs: Any + ) -> _models.CheckNameResult: + """Checks that the sandbox custom image resource name is valid and is not already in use. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param resource_name: The name of the resource. Is either a SandboxCustomImagesCheckNameRequest + type or a IO type. Required. + :type resource_name: ~azure.mgmt.kusto.models.SandboxCustomImagesCheckNameRequest or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CheckNameResult or the result of cls(response) + :rtype: ~azure.mgmt.kusto.models.CheckNameResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.CheckNameResult] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(resource_name, (IOBase, bytes)): + _content = resource_name + else: + _json = self._serialize.body(resource_name, "SandboxCustomImagesCheckNameRequest") + + request = build_check_name_availability_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + template_url=self.check_name_availability.metadata["url"], + headers=_headers, + params=_params, + ) + 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=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize("CheckNameResult", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + check_name_availability.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/sandboxCustomImagesCheckNameAvailability" + } diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_scripts_operations.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_scripts_operations.py index 5e1ed08f668e..11ed06a500e4 100644 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_scripts_operations.py +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_scripts_operations.py @@ -30,7 +30,7 @@ from .. import models as _models from .._serialization import Serializer -from .._vendor import _convert_request, _format_url_section +from .._vendor import _convert_request T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -45,7 +45,7 @@ def build_list_by_database_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-02")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-15")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -62,7 +62,7 @@ def build_list_by_database_request( "databaseName": _SERIALIZER.url("database_name", database_name, "str", pattern=r"^.*$"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -84,7 +84,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-02")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-15")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -102,7 +102,7 @@ def build_get_request( "scriptName": _SERIALIZER.url("script_name", script_name, "str", pattern=r"^.*$"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -124,7 +124,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: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-02")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-15")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -143,7 +143,7 @@ def build_create_or_update_request( "scriptName": _SERIALIZER.url("script_name", script_name, "str", pattern=r"^.*$"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -167,7 +167,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-02")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-15")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -186,7 +186,7 @@ def build_update_request( "scriptName": _SERIALIZER.url("script_name", script_name, "str", pattern=r"^.*$"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -210,7 +210,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-02")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-15")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -228,7 +228,7 @@ def build_delete_request( "scriptName": _SERIALIZER.url("script_name", script_name, "str", pattern=r"^.*$"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -245,7 +245,7 @@ def build_check_name_availability_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-02")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-15")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -263,7 +263,7 @@ def build_check_name_availability_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -698,9 +698,7 @@ def get_long_running_output(pipeline_response): return deserialized if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) + polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(PollingMethod, NoPolling()) else: @@ -784,6 +782,7 @@ def _update_initial( deserialized = self._deserialize("Script", pipeline_response) if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) response_headers["Azure-AsyncOperation"] = self._deserialize( "str", response.headers.get("Azure-AsyncOperation") ) @@ -952,9 +951,7 @@ def get_long_running_output(pipeline_response): return deserialized if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) + polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(PollingMethod, NoPolling()) else: @@ -1017,6 +1014,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements response_headers = {} if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) response_headers["Azure-AsyncOperation"] = self._deserialize( "str", response.headers.get("Azure-AsyncOperation") ) @@ -1082,9 +1080,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return cls(pipeline_response, None, {}) if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) + polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(PollingMethod, NoPolling()) else: diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_skus_operations.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_skus_operations.py index 33226e3408e4..2f760d5af5f8 100644 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_skus_operations.py +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_skus_operations.py @@ -27,7 +27,7 @@ from .. import models as _models from .._serialization import Serializer -from .._vendor import _convert_request, _format_url_section +from .._vendor import _convert_request T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -40,7 +40,7 @@ def build_list_request(location: str, subscription_id: str, **kwargs: Any) -> Ht _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-05-02")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-15")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -52,7 +52,7 @@ def build_list_request(location: str, subscription_id: str, **kwargs: Any) -> Ht "location": _SERIALIZER.url("location", location, "str", min_length=1), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_attached_database_configuration_check_name_availability.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_attached_database_configuration_check_name_availability.py index 9d83a75cdf96..924e8ce4b36e 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_attached_database_configuration_check_name_availability.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_attached_database_configuration_check_name_availability.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoAttachedDatabaseConfigurationCheckNameAvailability.json +# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoAttachedDatabaseConfigurationCheckNameAvailability.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_attached_database_configurations_create_or_update.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_attached_database_configurations_create_or_update.py index 0db87574ee9a..a85a3dd4964e 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_attached_database_configurations_create_or_update.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_attached_database_configurations_create_or_update.py @@ -54,6 +54,6 @@ def main(): print(response) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoAttachedDatabaseConfigurationsCreateOrUpdate.json +# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoAttachedDatabaseConfigurationsCreateOrUpdate.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_attached_database_configurations_delete.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_attached_database_configurations_delete.py index 9ef4e6a9b655..d0e5bc712136 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_attached_database_configurations_delete.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_attached_database_configurations_delete.py @@ -36,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoAttachedDatabaseConfigurationsDelete.json +# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoAttachedDatabaseConfigurationsDelete.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_attached_database_configurations_get.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_attached_database_configurations_get.py index d9ee5f0a7c59..80c04f052e78 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_attached_database_configurations_get.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_attached_database_configurations_get.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoAttachedDatabaseConfigurationsGet.json +# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoAttachedDatabaseConfigurationsGet.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_attached_database_configurations_list_by_cluster.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_attached_database_configurations_list_by_cluster.py index 675cb047e229..5b58d9a0cee4 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_attached_database_configurations_list_by_cluster.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_attached_database_configurations_list_by_cluster.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoAttachedDatabaseConfigurationsListByCluster.json +# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoAttachedDatabaseConfigurationsListByCluster.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_add_language_extensions.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_add_language_extensions.py index a361bba47af9..5995f7a9622f 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_add_language_extensions.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_add_language_extensions.py @@ -36,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoClusterAddLanguageExtensions.json +# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoClusterAddLanguageExtensions.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_detach_follower_databases.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_detach_follower_databases.py index 0035936523a9..b18526ad48f7 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_detach_follower_databases.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_detach_follower_databases.py @@ -39,6 +39,6 @@ def main(): ).result() -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoClusterDetachFollowerDatabases.json +# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoClusterDetachFollowerDatabases.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_list_follower_databases.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_list_follower_databases.py index bdc0fe06cd3a..7389276fe3ca 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_list_follower_databases.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_list_follower_databases.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoClusterListFollowerDatabases.json +# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoClusterListFollowerDatabases.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_list_language_extensions.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_list_language_extensions.py index 338cf3a62480..4a7c5109062a 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_list_language_extensions.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_list_language_extensions.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoClusterListLanguageExtensions.json +# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoClusterListLanguageExtensions.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_migrate.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_migrate.py index 07fa03918a4d..e8b66601a532 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_migrate.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_migrate.py @@ -38,6 +38,6 @@ def main(): ).result() -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoClusterMigrate.json +# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoClusterMigrate.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_principal_assignments_check_name_availability.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_principal_assignments_check_name_availability.py index 6dea71f2e2fa..04896c13f45a 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_principal_assignments_check_name_availability.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_principal_assignments_check_name_availability.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoClusterPrincipalAssignmentsCheckNameAvailability.json +# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoClusterPrincipalAssignmentsCheckNameAvailability.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_principal_assignments_create_or_update.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_principal_assignments_create_or_update.py index e0e47939baf5..0442cc5f8c4a 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_principal_assignments_create_or_update.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_principal_assignments_create_or_update.py @@ -45,6 +45,6 @@ def main(): print(response) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoClusterPrincipalAssignmentsCreateOrUpdate.json +# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoClusterPrincipalAssignmentsCreateOrUpdate.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_principal_assignments_delete.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_principal_assignments_delete.py index e467a4e1eb3b..954546b1e72c 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_principal_assignments_delete.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_principal_assignments_delete.py @@ -36,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoClusterPrincipalAssignmentsDelete.json +# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoClusterPrincipalAssignmentsDelete.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_principal_assignments_get.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_principal_assignments_get.py index 5ad566fcb911..cdb0d9ab4ab3 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_principal_assignments_get.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_principal_assignments_get.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoClusterPrincipalAssignmentsGet.json +# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoClusterPrincipalAssignmentsGet.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_principal_assignments_list.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_principal_assignments_list.py index 5604928c00f1..29c58de93b4e 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_principal_assignments_list.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_principal_assignments_list.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoClusterPrincipalAssignmentsList.json +# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoClusterPrincipalAssignmentsList.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_remove_language_extensions.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_remove_language_extensions.py index 3afd2721ab68..eed52c7642ba 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_remove_language_extensions.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_remove_language_extensions.py @@ -36,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoClusterRemoveLanguageExtensions.json +# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoClusterRemoveLanguageExtensions.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_clusters_check_name_availability.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_clusters_check_name_availability.py index 7b481365857d..c6b484d2cf5d 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_clusters_check_name_availability.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_clusters_check_name_availability.py @@ -36,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoClustersCheckNameAvailability.json +# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoClustersCheckNameAvailability.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_clusters_create_or_update.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_clusters_create_or_update.py index 87584b356ac6..8f9ecfc2de73 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_clusters_create_or_update.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_clusters_create_or_update.py @@ -43,7 +43,11 @@ def main(): "enableStreamingIngest": True, "languageExtensions": { "value": [ - {"languageExtensionImageName": "Python3_10_8", "languageExtensionName": "PYTHON"}, + { + "languageExtensionCustomImageName": "customImage8", + "languageExtensionImageName": "Python_Custom_Image", + "languageExtensionName": "PYTHON", + }, {"languageExtensionImageName": "R", "languageExtensionName": "R"}, ] }, @@ -56,6 +60,6 @@ def main(): print(response) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoClustersCreateOrUpdate.json +# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoClustersCreateOrUpdate.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_clusters_delete.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_clusters_delete.py index f9004fa39f78..7ed0f14fce10 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_clusters_delete.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_clusters_delete.py @@ -35,6 +35,6 @@ def main(): ).result() -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoClustersDelete.json +# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoClustersDelete.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_clusters_diagnose_virtual_network.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_clusters_diagnose_virtual_network.py index 80de79c7290a..e48106fc63b0 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_clusters_diagnose_virtual_network.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_clusters_diagnose_virtual_network.py @@ -36,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoClustersDiagnoseVirtualNetwork.json +# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoClustersDiagnoseVirtualNetwork.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_clusters_get.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_clusters_get.py index e2444d2b5330..523006b8c26a 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_clusters_get.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_clusters_get.py @@ -36,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoClustersGet.json +# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoClustersGet.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_clusters_list.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_clusters_list.py index 9c0f0026b091..50a954ae31a6 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_clusters_list.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_clusters_list.py @@ -34,6 +34,6 @@ def main(): print(item) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoClustersList.json +# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoClustersList.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_clusters_list_by_resource_group.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_clusters_list_by_resource_group.py index 5455cfc94330..974fba56ecad 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_clusters_list_by_resource_group.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_clusters_list_by_resource_group.py @@ -36,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoClustersListByResourceGroup.json +# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoClustersListByResourceGroup.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_clusters_list_resource_skus.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_clusters_list_resource_skus.py index e9c41e3badb2..d32438afd35b 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_clusters_list_resource_skus.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_clusters_list_resource_skus.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoClustersListResourceSkus.json +# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoClustersListResourceSkus.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_clusters_list_skus.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_clusters_list_skus.py index 88ffef6bd9a4..64842393bf6b 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_clusters_list_skus.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_clusters_list_skus.py @@ -34,6 +34,6 @@ def main(): print(item) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoClustersListSkus.json +# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoClustersListSkus.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_clusters_start.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_clusters_start.py index 053f8b609288..6ad322fc7ac4 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_clusters_start.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_clusters_start.py @@ -35,6 +35,6 @@ def main(): ).result() -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoClustersStart.json +# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoClustersStart.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_clusters_stop.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_clusters_stop.py index c2ec0ea41130..6b605388e8fa 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_clusters_stop.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_clusters_stop.py @@ -35,6 +35,6 @@ def main(): ).result() -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoClustersStop.json +# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoClustersStop.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_clusters_update.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_clusters_update.py index ce410f4a98e2..5c807eb0499a 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_clusters_update.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_clusters_update.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoClustersUpdate.json +# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoClustersUpdate.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connection_event_grid_validation_async.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connection_event_grid_validation_async.py index f8609e266a57..d84e267f4073 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connection_event_grid_validation_async.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connection_event_grid_validation_async.py @@ -56,6 +56,6 @@ def main(): print(response) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDataConnectionEventGridValidationAsync.json +# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoDataConnectionEventGridValidationAsync.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connection_validation_async.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connection_validation_async.py index cc80ffb6b2d8..b5e4035b7529 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connection_validation_async.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connection_validation_async.py @@ -52,6 +52,6 @@ def main(): print(response) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDataConnectionValidationAsync.json +# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoDataConnectionValidationAsync.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_check_name_availability.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_check_name_availability.py index 4d5418109998..7aac4c620886 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_check_name_availability.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_check_name_availability.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDataConnectionsCheckNameAvailability.json +# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoDataConnectionsCheckNameAvailability.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_cosmos_db_create_or_update.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_cosmos_db_create_or_update.py index 4b17658a3121..8c45966500b8 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_cosmos_db_create_or_update.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_cosmos_db_create_or_update.py @@ -51,6 +51,6 @@ def main(): print(response) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDataConnectionsCosmosDbCreateOrUpdate.json +# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoDataConnectionsCosmosDbCreateOrUpdate.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_cosmos_db_get.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_cosmos_db_get.py index 055c4ccf8c60..bb4a3a506f40 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_cosmos_db_get.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_cosmos_db_get.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDataConnectionsCosmosDbGet.json +# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoDataConnectionsCosmosDbGet.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_cosmos_db_update.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_cosmos_db_update.py index 14b3290a4c56..72dff3bdb829 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_cosmos_db_update.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_cosmos_db_update.py @@ -51,6 +51,6 @@ def main(): print(response) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDataConnectionsCosmosDbUpdate.json +# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoDataConnectionsCosmosDbUpdate.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_create_or_update.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_create_or_update.py index e1f477ca6d94..f86e5a3b20bf 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_create_or_update.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_create_or_update.py @@ -47,6 +47,6 @@ def main(): print(response) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDataConnectionsCreateOrUpdate.json +# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoDataConnectionsCreateOrUpdate.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_delete.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_delete.py index ec268c064c80..2e127d470e61 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_delete.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_delete.py @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDataConnectionsDelete.json +# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoDataConnectionsDelete.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_event_grid_create_or_update.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_event_grid_create_or_update.py index cdba7abaa632..73a2ee882def 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_event_grid_create_or_update.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_event_grid_create_or_update.py @@ -55,6 +55,6 @@ def main(): print(response) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDataConnectionsEventGridCreateOrUpdate.json +# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoDataConnectionsEventGridCreateOrUpdate.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_event_grid_get.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_event_grid_get.py index 1943246b32be..05738b586bc2 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_event_grid_get.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_event_grid_get.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDataConnectionsEventGridGet.json +# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoDataConnectionsEventGridGet.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_event_grid_update.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_event_grid_update.py index df3eb710838b..71c9892dede3 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_event_grid_update.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_event_grid_update.py @@ -55,6 +55,6 @@ def main(): print(response) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDataConnectionsEventGridUpdate.json +# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoDataConnectionsEventGridUpdate.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_get.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_get.py index 34cd998757b5..17b25e49056a 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_get.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_get.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDataConnectionsGet.json +# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoDataConnectionsGet.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_list_by_database.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_list_by_database.py index 986199f7f56e..0fe10f3aad6e 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_list_by_database.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_list_by_database.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDataConnectionsListByDatabase.json +# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoDataConnectionsListByDatabase.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_update.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_update.py index 6e2cc5c93fe8..ba4257baf136 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_update.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_update.py @@ -47,6 +47,6 @@ def main(): print(response) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDataConnectionsUpdate.json +# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoDataConnectionsUpdate.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_database_add_principals.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_database_add_principals.py index 95de7303f39e..1e0912b486fb 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_database_add_principals.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_database_add_principals.py @@ -65,6 +65,6 @@ def main(): print(response) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDatabaseAddPrincipals.json +# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoDatabaseAddPrincipals.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_database_invite_follower.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_database_invite_follower.py index c50e87444df4..cae3698829f3 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_database_invite_follower.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_database_invite_follower.py @@ -50,6 +50,6 @@ def main(): print(response) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDatabaseInviteFollower.json +# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoDatabaseInviteFollower.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_database_list_principals.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_database_list_principals.py index 75c071316aa7..6e5dc1f21529 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_database_list_principals.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_database_list_principals.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDatabaseListPrincipals.json +# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoDatabaseListPrincipals.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_database_principal_assignments_check_name_availability.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_database_principal_assignments_check_name_availability.py index 115a634256a2..8578ac1f4494 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_database_principal_assignments_check_name_availability.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_database_principal_assignments_check_name_availability.py @@ -41,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDatabasePrincipalAssignmentsCheckNameAvailability.json +# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoDatabasePrincipalAssignmentsCheckNameAvailability.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_database_principal_assignments_create_or_update.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_database_principal_assignments_create_or_update.py index b6e5c71573ab..129ab2150113 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_database_principal_assignments_create_or_update.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_database_principal_assignments_create_or_update.py @@ -46,6 +46,6 @@ def main(): print(response) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDatabasePrincipalAssignmentsCreateOrUpdate.json +# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoDatabasePrincipalAssignmentsCreateOrUpdate.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_database_principal_assignments_delete.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_database_principal_assignments_delete.py index fa282accdf90..bf918167e87e 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_database_principal_assignments_delete.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_database_principal_assignments_delete.py @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDatabasePrincipalAssignmentsDelete.json +# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoDatabasePrincipalAssignmentsDelete.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_database_principal_assignments_get.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_database_principal_assignments_get.py index 616d186858a9..cfafb7d62c48 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_database_principal_assignments_get.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_database_principal_assignments_get.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDatabasePrincipalAssignmentsGet.json +# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoDatabasePrincipalAssignmentsGet.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_database_principal_assignments_list.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_database_principal_assignments_list.py index f57530ed0d4b..2e23023718fb 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_database_principal_assignments_list.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_database_principal_assignments_list.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDatabasePrincipalAssignmentsList.json +# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoDatabasePrincipalAssignmentsList.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_database_readonly_update.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_database_readonly_update.py index f3934cfd2f67..01bc8658333d 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_database_readonly_update.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_database_readonly_update.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDatabaseReadonlyUpdate.json +# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoDatabaseReadonlyUpdate.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_database_remove_principals.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_database_remove_principals.py index e145530b8926..648b255598a2 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_database_remove_principals.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_database_remove_principals.py @@ -65,6 +65,6 @@ def main(): print(response) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDatabaseRemovePrincipals.json +# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoDatabaseRemovePrincipals.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_databases_check_name_availability.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_databases_check_name_availability.py index 5ff4aa412512..115b5d95f010 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_databases_check_name_availability.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_databases_check_name_availability.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDatabasesCheckNameAvailability.json +# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoDatabasesCheckNameAvailability.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_databases_create_or_update.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_databases_create_or_update.py index b4923a226d40..c350065ff8f1 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_databases_create_or_update.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_databases_create_or_update.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDatabasesCreateOrUpdate.json +# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoDatabasesCreateOrUpdate.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_databases_delete.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_databases_delete.py index e55f109389d7..ada32c3c15ae 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_databases_delete.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_databases_delete.py @@ -36,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDatabasesDelete.json +# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoDatabasesDelete.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_databases_get.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_databases_get.py index 47ba1bf5f3e6..536b63e51f36 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_databases_get.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_databases_get.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDatabasesGet.json +# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoDatabasesGet.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_databases_list_by_cluster.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_databases_list_by_cluster.py index 263065fdb68c..866fd9d1d19e 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_databases_list_by_cluster.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_databases_list_by_cluster.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDatabasesListByCluster.json +# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoDatabasesListByCluster.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_databases_update.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_databases_update.py index 8a501067d12e..2aa1b1fcb04a 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_databases_update.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_databases_update.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDatabasesUpdate.json +# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoDatabasesUpdate.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_managed_private_endpoints_check_name_availability.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_managed_private_endpoints_check_name_availability.py index 3ccfc9a68d42..a8326e3d4006 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_managed_private_endpoints_check_name_availability.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_managed_private_endpoints_check_name_availability.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoManagedPrivateEndpointsCheckNameAvailability.json +# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoManagedPrivateEndpointsCheckNameAvailability.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_managed_private_endpoints_create_or_update.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_managed_private_endpoints_create_or_update.py index 24572023230c..6d494b129c2f 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_managed_private_endpoints_create_or_update.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_managed_private_endpoints_create_or_update.py @@ -44,6 +44,6 @@ def main(): print(response) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoManagedPrivateEndpointsCreateOrUpdate.json +# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoManagedPrivateEndpointsCreateOrUpdate.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_managed_private_endpoints_delete.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_managed_private_endpoints_delete.py index 89a6d9620507..8c25199881eb 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_managed_private_endpoints_delete.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_managed_private_endpoints_delete.py @@ -36,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoManagedPrivateEndpointsDelete.json +# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoManagedPrivateEndpointsDelete.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_managed_private_endpoints_get.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_managed_private_endpoints_get.py index a223b7c97f1f..fbefb386215e 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_managed_private_endpoints_get.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_managed_private_endpoints_get.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoManagedPrivateEndpointsGet.json +# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoManagedPrivateEndpointsGet.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_managed_private_endpoints_list.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_managed_private_endpoints_list.py index 164fce7beb62..47601d78592d 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_managed_private_endpoints_list.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_managed_private_endpoints_list.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoManagedPrivateEndpointsList.json +# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoManagedPrivateEndpointsList.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_managed_private_endpoints_update.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_managed_private_endpoints_update.py index d9a48e276630..163c440e11ee 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_managed_private_endpoints_update.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_managed_private_endpoints_update.py @@ -44,6 +44,6 @@ def main(): print(response) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoManagedPrivateEndpointsUpdate.json +# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoManagedPrivateEndpointsUpdate.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_operation_results_get.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_operation_results_get.py index bddd63a6e26d..835ea034bf72 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_operation_results_get.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_operation_results_get.py @@ -36,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoOperationResultsGet.json +# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoOperationResultsGet.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_operation_results_operation_result_response_type_get.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_operation_results_operation_result_response_type_get.py index be5252f21084..fc427978a632 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_operation_results_operation_result_response_type_get.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_operation_results_operation_result_response_type_get.py @@ -35,6 +35,6 @@ def main(): ) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoOperationResultsOperationResultResponseTypeGet.json +# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoOperationResultsOperationResultResponseTypeGet.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_operations_list.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_operations_list.py index 9921fc33bc86..cae5027837e5 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_operations_list.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_operations_list.py @@ -34,6 +34,6 @@ def main(): print(item) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoOperationsList.json +# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoOperationsList.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_outbound_network_dependencies_list.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_outbound_network_dependencies_list.py index ab1c71c90b12..9abdd6242cc9 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_outbound_network_dependencies_list.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_outbound_network_dependencies_list.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoOutboundNetworkDependenciesList.json +# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoOutboundNetworkDependenciesList.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_private_endpoint_connections_create_or_update.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_private_endpoint_connections_create_or_update.py index fb29bd1d8d47..b61e2733ba99 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_private_endpoint_connections_create_or_update.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_private_endpoint_connections_create_or_update.py @@ -45,6 +45,6 @@ def main(): print(response) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoPrivateEndpointConnectionsCreateOrUpdate.json +# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoPrivateEndpointConnectionsCreateOrUpdate.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_private_endpoint_connections_delete.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_private_endpoint_connections_delete.py index 65e032271dc2..93cb8a9ca95e 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_private_endpoint_connections_delete.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_private_endpoint_connections_delete.py @@ -36,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoPrivateEndpointConnectionsDelete.json +# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoPrivateEndpointConnectionsDelete.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_private_endpoint_connections_get.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_private_endpoint_connections_get.py index b9bc77999b97..570b7361cd2b 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_private_endpoint_connections_get.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_private_endpoint_connections_get.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoPrivateEndpointConnectionsGet.json +# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoPrivateEndpointConnectionsGet.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_private_endpoint_connections_list.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_private_endpoint_connections_list.py index 9146883a3148..c0d5de37d49a 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_private_endpoint_connections_list.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_private_endpoint_connections_list.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoPrivateEndpointConnectionsList.json +# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoPrivateEndpointConnectionsList.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_private_link_resources_get.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_private_link_resources_get.py index 02a7ec73b4d2..5d588a645fe9 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_private_link_resources_get.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_private_link_resources_get.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoPrivateLinkResourcesGet.json +# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoPrivateLinkResourcesGet.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_private_link_resources_list.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_private_link_resources_list.py index 71e44b994a1f..be97a5d742fe 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_private_link_resources_list.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_private_link_resources_list.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoPrivateLinkResourcesList.json +# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoPrivateLinkResourcesList.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_sandbox_custom_image_delete.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_sandbox_custom_image_delete.py new file mode 100644 index 000000000000..ad73614f9403 --- /dev/null +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_sandbox_custom_image_delete.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential +from azure.mgmt.kusto import KustoManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-kusto +# USAGE + python kusto_sandbox_custom_image_delete.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = KustoManagementClient( + credential=DefaultAzureCredential(), + subscription_id="12345678-1234-1234-1234-123456789098", + ) + + client.sandbox_custom_images.begin_delete( + resource_group_name="kustorptest", + cluster_name="kustoCluster", + sandbox_custom_image_name="customImage8", + ).result() + + +# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoSandboxCustomImageDelete.json +if __name__ == "__main__": + main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_sandbox_custom_image_update.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_sandbox_custom_image_update.py new file mode 100644 index 000000000000..414cff032fb7 --- /dev/null +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_sandbox_custom_image_update.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential +from azure.mgmt.kusto import KustoManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-kusto +# USAGE + python kusto_sandbox_custom_image_update.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = KustoManagementClient( + credential=DefaultAzureCredential(), + subscription_id="12345678-1234-1234-1234-123456789098", + ) + + response = client.sandbox_custom_images.begin_update( + resource_group_name="kustorptest", + cluster_name="kustoCluster", + sandbox_custom_image_name="customImage8", + parameters={ + "properties": {"language": "Python", "languageVersion": "3.10.8", "requirementsFileContent": "Requests"} + }, + ).result() + print(response) + + +# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoSandboxCustomImageUpdate.json +if __name__ == "__main__": + main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_sandbox_custom_images_check_name_availability.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_sandbox_custom_images_check_name_availability.py new file mode 100644 index 000000000000..9680cf208137 --- /dev/null +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_sandbox_custom_images_check_name_availability.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential +from azure.mgmt.kusto import KustoManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-kusto +# USAGE + python kusto_sandbox_custom_images_check_name_availability.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = KustoManagementClient( + credential=DefaultAzureCredential(), + subscription_id="12345678-1234-1234-1234-123456789098", + ) + + response = client.sandbox_custom_images.check_name_availability( + resource_group_name="kustorptest", + cluster_name="kustoCluster", + resource_name={"name": "sandboxCustomImage1", "type": "Microsoft.Kusto/clusters/sandboxCustomImages"}, + ) + print(response) + + +# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoSandboxCustomImagesCheckNameAvailability.json +if __name__ == "__main__": + main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_sandbox_custom_images_create_or_update.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_sandbox_custom_images_create_or_update.py new file mode 100644 index 000000000000..dbf7ea1d865f --- /dev/null +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_sandbox_custom_images_create_or_update.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential +from azure.mgmt.kusto import KustoManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-kusto +# USAGE + python kusto_sandbox_custom_images_create_or_update.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = KustoManagementClient( + credential=DefaultAzureCredential(), + subscription_id="12345678-1234-1234-1234-123456789098", + ) + + response = client.sandbox_custom_images.begin_create_or_update( + resource_group_name="kustorptest", + cluster_name="kustoCluster", + sandbox_custom_image_name="customImage8", + parameters={ + "properties": {"language": "Python", "languageVersion": "3.10.8", "requirementsFileContent": "Requests"} + }, + ).result() + print(response) + + +# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoSandboxCustomImagesCreateOrUpdate.json +if __name__ == "__main__": + main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_sandbox_custom_images_get.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_sandbox_custom_images_get.py new file mode 100644 index 000000000000..214c95cfb944 --- /dev/null +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_sandbox_custom_images_get.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential +from azure.mgmt.kusto import KustoManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-kusto +# USAGE + python kusto_sandbox_custom_images_get.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = KustoManagementClient( + credential=DefaultAzureCredential(), + subscription_id="12345678-1234-1234-1234-123456789098", + ) + + response = client.sandbox_custom_images.get( + resource_group_name="kustorptest", + cluster_name="kustoCluster", + sandbox_custom_image_name="customImage8", + ) + print(response) + + +# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoSandboxCustomImagesGet.json +if __name__ == "__main__": + main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_sandbox_custom_images_list.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_sandbox_custom_images_list.py new file mode 100644 index 000000000000..6cd1e78c4a06 --- /dev/null +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_sandbox_custom_images_list.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential +from azure.mgmt.kusto import KustoManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-kusto +# USAGE + python kusto_sandbox_custom_images_list.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = KustoManagementClient( + credential=DefaultAzureCredential(), + subscription_id="12345678-1234-1234-1234-123456789098", + ) + + response = client.sandbox_custom_images.list_by_cluster( + resource_group_name="kustorptest", + cluster_name="kustoCluster", + ) + for item in response: + print(item) + + +# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoSandboxCustomImagesList.json +if __name__ == "__main__": + main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_scripts_check_name_availability.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_scripts_check_name_availability.py index 5057a6a98d14..cb5e45c21be7 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_scripts_check_name_availability.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_scripts_check_name_availability.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoScriptsCheckNameAvailability.json +# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoScriptsCheckNameAvailability.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_scripts_create_or_update.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_scripts_create_or_update.py index 88c9728ca5bd..5df5d16ae70d 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_scripts_create_or_update.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_scripts_create_or_update.py @@ -46,6 +46,6 @@ def main(): print(response) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoScriptsCreateOrUpdate.json +# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoScriptsCreateOrUpdate.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_scripts_delete.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_scripts_delete.py index 9bcb8ba9a798..27788fa17080 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_scripts_delete.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_scripts_delete.py @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoScriptsDelete.json +# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoScriptsDelete.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_scripts_get.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_scripts_get.py index c5f5a54f5a7c..b51fc729bbad 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_scripts_get.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_scripts_get.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoScriptsGet.json +# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoScriptsGet.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_scripts_list_by_database.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_scripts_list_by_database.py index fb39bde87052..a563b18d0d88 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_scripts_list_by_database.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_scripts_list_by_database.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoScriptsListByDatabase.json +# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoScriptsListByDatabase.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_scripts_update.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_scripts_update.py index 98b32376f6d4..ffc3eee2e29c 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_scripts_update.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_scripts_update.py @@ -46,6 +46,6 @@ def main(): print(response) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoScriptsUpdate.json +# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoScriptsUpdate.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_skus.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_skus.py index 8e81b2a74356..3bb9908228cc 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_skus.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_skus.py @@ -36,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoSkus.json +# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoSkus.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_suspended_databases_get.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_suspended_databases_get.py index df2a7720628f..45240d0804d6 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_suspended_databases_get.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_suspended_databases_get.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoSuspendedDatabasesGet.json +# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoSuspendedDatabasesGet.json if __name__ == "__main__": main()