From a08689d5ab29667470c85becf1ca32e463d0393c Mon Sep 17 00:00:00 2001 From: Yuchao Yan Date: Fri, 15 May 2026 17:33:11 +0800 Subject: [PATCH] Regenerate azure-mgmt-hdinsight with latest code generator tool --- .../azure-mgmt-hdinsight/CHANGELOG.md | 6 + sdk/hdinsight/azure-mgmt-hdinsight/README.md | 4 +- .../azure-mgmt-hdinsight/_metadata.json | 6 +- .../apiview-properties.json | 85 ++- .../azure/mgmt/hdinsight/_configuration.py | 6 +- .../_hd_insight_management_client.py | 42 +- .../azure/mgmt/hdinsight/_patch.py | 1 + .../mgmt/hdinsight/_utils/serialization.py | 19 +- .../azure/mgmt/hdinsight/_version.py | 3 +- .../mgmt/hdinsight/aio/_configuration.py | 6 +- .../aio/_hd_insight_management_client.py | 42 +- .../azure/mgmt/hdinsight/aio/_patch.py | 1 + .../mgmt/hdinsight/aio/operations/__init__.py | 20 +- .../operations/_applications_operations.py | 25 +- .../aio/operations/_clusters_operations.py | 70 ++- .../operations/_configurations_operations.py | 15 +- .../aio/operations/_extensions_operations.py | 404 ++------------ .../aio/operations/_locations_operations.py | 30 +- .../hdinsight/aio/operations/_operations.py | 5 +- .../mgmt/hdinsight/aio/operations/_patch.py | 1 + ...private_endpoint_connections_operations.py | 20 +- .../_private_link_resources_operations.py | 10 +- .../operations/_script_actions_operations.py | 20 +- .../_script_execution_history_operations.py | 10 +- .../_virtual_machines_operations.py | 15 +- .../azure/mgmt/hdinsight/models/__init__.py | 6 - .../_hd_insight_management_client_enums.py | 18 +- .../mgmt/hdinsight/models/_models_py3.py | 150 +---- .../azure/mgmt/hdinsight/models/_patch.py | 1 + .../mgmt/hdinsight/operations/__init__.py | 20 +- .../operations/_applications_operations.py | 35 +- .../operations/_clusters_operations.py | 98 +++- .../operations/_configurations_operations.py | 21 +- .../operations/_extensions_operations.py | 517 ++---------------- .../operations/_locations_operations.py | 42 +- .../mgmt/hdinsight/operations/_operations.py | 7 +- .../azure/mgmt/hdinsight/operations/_patch.py | 1 + ...private_endpoint_connections_operations.py | 28 +- .../_private_link_resources_operations.py | 14 +- .../operations/_script_actions_operations.py | 28 +- .../_script_execution_history_operations.py | 14 +- .../_virtual_machines_operations.py | 21 +- .../approve_private_endpoint_connection.py | 2 +- .../change_http_connectivity_disable.py | 2 +- .../change_http_connectivity_enable.py | 2 +- .../generated_samples/create_application.py | 2 +- .../generated_samples/create_extension.py | 2 +- ...e_hd_insight_cluster_with_adls_gen2_msi.py | 124 ----- ...d_insight_cluster_with_autoscale_config.py | 3 +- ...insight_cluster_with_availability_zones.py | 3 +- ...uster_with_compute_isolation_properties.py | 3 +- ..._cluster_with_custom_network_properties.py | 9 +- ...insight_cluster_with_encryption_at_host.py | 3 +- ...ight_cluster_with_encryption_in_transit.py | 3 +- ...eate_hd_insight_cluster_with_entra_user.py | 104 ---- .../create_hd_insight_cluster_with_tls12.py | 3 +- ...create_hd_insight_cluster_with_wasb_msi.py | 124 ----- ...ate_kafka_cluster_with_kafka_rest_proxy.py | 3 +- .../create_linux_hadoop_adls_gen2.py | 3 +- .../create_linux_hadoop_secure_hadoop.py | 3 +- .../create_linux_hadoop_ssh_password.py | 3 +- .../create_linux_hadoop_ssh_public_key.py | 3 +- .../create_linux_spark_ssh_password.py | 3 +- .../generated_samples/delete_application.py | 2 +- .../generated_samples/delete_extension.py | 2 +- .../delete_linux_hadoop_cluster.py | 2 +- .../delete_private_endpoint_connection.py | 2 +- .../generated_samples/delete_script_action.py | 2 +- ..._user.py => disable_cluster_auto_scale.py} | 27 +- .../disable_linux_cluster_azure_monitor.py | 2 +- ...sable_linux_cluster_azure_monitor_agent.py | 42 -- .../disable_linux_cluster_monitoring.py | 2 +- .../enable_linux_cluster_azure_monitor.py | 2 +- ...nable_linux_cluster_azure_monitor_agent.py | 43 -- .../enable_linux_cluster_monitoring.py | 2 +- ...uto_scale_with_load_based_configuration.py | 2 +- ...scale_with_schedule_based_configuration.py | 2 +- .../generated_samples/get_all_applications.py | 2 +- ...private_endpoint_connections_in_cluster.py | 2 +- ...t_all_private_link_resources_in_cluster.py | 2 +- .../get_application_created.py | 2 +- ...ication_creation_async_operation_status.py | 2 +- .../get_application_in_progress.py | 2 +- ...cluster_creating_async_operation_status.py | 2 +- .../get_cluster_virtual_machines.py | 2 +- .../generated_samples/get_extension.py | 2 +- ...tension_creation_async_operation_status.py | 2 +- .../get_hd_insight_capabilities.py | 2 +- .../get_hd_insight_usages.py | 2 +- ...inux_cluster_azure_monitor_agent_status.py | 43 -- .../get_linux_cluster_azure_monitor_status.py | 2 +- .../get_linux_cluster_monitoring_status.py | 2 +- .../get_linux_hadoop_all_clusters.py | 2 +- ...x_hadoop_all_clusters_in_resource_group.py | 2 +- .../get_linux_hadoop_cluster.py | 2 +- .../get_linux_hadoop_script_action.py | 2 +- .../get_linux_spark_cluster.py | 2 +- .../get_private_endpoint_connection.py | 2 +- .../get_private_link_resource.py | 2 +- ...et_restart_hosts_async_operation_status.py | 2 +- .../get_script_action_by_id.py | 2 +- ...script_execution_async_operation_status.py | 2 +- .../get_script_execution_history.py | 2 +- .../hdi_clusters_get_gateway_settings.py | 2 +- ...ers_update_cluster_identity_certificate.py | 2 +- ...clusters_update_gateway_settings_enable.py | 2 +- .../hdi_configurations_get.py | 2 +- .../hdi_configurations_list.py | 2 +- ...cations_check_cluster_name_availability.py | 2 +- ...di_locations_get_async_operation_status.py | 2 +- .../hdi_locations_list_billing_specs.py | 2 +- ...cations_validate_cluster_create_request.py | 3 +- .../list_hd_insight_operations.py | 2 +- .../patch_linux_hadoop_cluster.py | 2 +- ...ch_linux_hadoop_cluster_with_system_msi.py | 44 -- .../post_execute_script_action.py | 2 +- .../promote_linux_hadoop_script_action.py | 2 +- .../resize_linux_hadoop_cluster.py | 2 +- .../restart_virtual_machines_operation.py | 2 +- ...inux_hadoop_cluster_disk_encryption_key.py | 2 +- ...ight_management_applications_operations.py | 10 +- ...anagement_applications_operations_async.py | 10 +- ..._insight_management_clusters_operations.py | 47 +- ...ht_management_clusters_operations_async.py | 47 +- ...ht_management_configurations_operations.py | 6 +- ...agement_configurations_operations_async.py | 6 +- ...nsight_management_extensions_operations.py | 65 +-- ..._management_extensions_operations_async.py | 69 +-- ...insight_management_locations_operations.py | 20 +- ...t_management_locations_operations_async.py | 20 +- .../test_hd_insight_management_operations.py | 2 +- ..._hd_insight_management_operations_async.py | 2 +- ...private_endpoint_connections_operations.py | 8 +- ...e_endpoint_connections_operations_async.py | 8 +- ...ement_private_link_resources_operations.py | 4 +- ...private_link_resources_operations_async.py | 4 +- ...ht_management_script_actions_operations.py | 8 +- ...agement_script_actions_operations_async.py | 8 +- ...ent_script_execution_history_operations.py | 4 +- ...ript_execution_history_operations_async.py | 4 +- ..._management_virtual_machines_operations.py | 6 +- ...ement_virtual_machines_operations_async.py | 6 +- .../azure-mgmt-hdinsight/pyproject.toml | 8 +- 143 files changed, 843 insertions(+), 2127 deletions(-) delete mode 100644 sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_hd_insight_cluster_with_adls_gen2_msi.py delete mode 100644 sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_hd_insight_cluster_with_entra_user.py delete mode 100644 sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_hd_insight_cluster_with_wasb_msi.py rename sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/{hdi_clusters_update_gateway_settings_entra_user.py => disable_cluster_auto_scale.py} (68%) delete mode 100644 sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/disable_linux_cluster_azure_monitor_agent.py delete mode 100644 sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/enable_linux_cluster_azure_monitor_agent.py delete mode 100644 sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_linux_cluster_azure_monitor_agent_status.py delete mode 100644 sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/patch_linux_hadoop_cluster_with_system_msi.py diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/CHANGELOG.md b/sdk/hdinsight/azure-mgmt-hdinsight/CHANGELOG.md index f2bcea50cc33..410311fee125 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/CHANGELOG.md +++ b/sdk/hdinsight/azure-mgmt-hdinsight/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History +## 9.0.1 (2026-05-15) + +### Other Changes + + - Regenerated with latest code generator tool + ## 9.1.0b2 (2025-10-15) ### Features Added diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/README.md b/sdk/hdinsight/azure-mgmt-hdinsight/README.md index 4108a8159d3f..d6862f24f479 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/README.md +++ b/sdk/hdinsight/azure-mgmt-hdinsight/README.md @@ -1,7 +1,7 @@ # Microsoft Azure SDK for Python This is the Microsoft Azure HDInsight Management Client Library. -This package has been tested with Python 3.9+. +This package has been tested with Python 3.10+. For a more complete view of Azure libraries, see the [azure sdk python release](https://aka.ms/azsdk/python/all). ## _Disclaimer_ @@ -12,7 +12,7 @@ _Azure SDK Python packages support for Python 2.7 has ended 01 January 2022. For ### Prerequisites -- Python 3.9+ is required to use this package. +- Python 3.10+ is required to use this package. - [Azure subscription](https://azure.microsoft.com/free/) ### Install the package diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/_metadata.json b/sdk/hdinsight/azure-mgmt-hdinsight/_metadata.json index 50fa56acb9bf..412195b7f308 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/_metadata.json +++ b/sdk/hdinsight/azure-mgmt-hdinsight/_metadata.json @@ -1,11 +1,11 @@ { - "commit": "e9da2de4d595e9179c8bee26aa62ffe5b66b78b0", + "commit": "b770b86265d5dc3a26b16c5d30a736e6bbba04de", "repository_url": "https://github.com/Azure/azure-rest-api-specs", "autorest": "3.10.2", "use": [ - "@autorest/python@6.40.0", + "@autorest/python@6.50.0", "@autorest/modelerfour@4.27.0" ], - "autorest_command": "autorest specification/hdinsight/resource-manager/readme.md --generate-sample=True --generate-test=True --include-x-ms-examples-original-file=True --package-mode=azure-mgmt --python --python-sdks-folder=/mnt/vss/_work/1/azure-sdk-for-python/sdk --use=@autorest/python@6.40.0 --use=@autorest/modelerfour@4.27.0 --version=3.10.2 --version-tolerant=False", + "autorest_command": "autorest specification/hdinsight/resource-manager/readme.md --generate-sample=True --generate-test=True --include-x-ms-examples-original-file=True --package-mode=azure-mgmt --python --python-sdks-folder=C:\\dev\\azure-sdk-for-python\\sdk --tag=package-2021-06 --use=@autorest/python@6.50.0 --use=@autorest/modelerfour@4.27.0 --version=3.10.2 --version-tolerant=False", "readme": "specification/hdinsight/resource-manager/readme.md" } \ No newline at end of file diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/apiview-properties.json b/sdk/hdinsight/azure-mgmt-hdinsight/apiview-properties.json index 6427da4dcfd1..9ab9777442ee 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/apiview-properties.json +++ b/sdk/hdinsight/azure-mgmt-hdinsight/apiview-properties.json @@ -51,7 +51,6 @@ "azure.mgmt.hdinsight.models.DiskBillingMeters": null, "azure.mgmt.hdinsight.models.DiskEncryptionProperties": null, "azure.mgmt.hdinsight.models.EncryptionInTransitProperties": null, - "azure.mgmt.hdinsight.models.EntraUserInfo": null, "azure.mgmt.hdinsight.models.ErrorResponse": null, "azure.mgmt.hdinsight.models.Errors": null, "azure.mgmt.hdinsight.models.ExcludedServicesConfig": null, @@ -61,7 +60,6 @@ "azure.mgmt.hdinsight.models.HardwareProfile": null, "azure.mgmt.hdinsight.models.HostInfo": null, "azure.mgmt.hdinsight.models.IPConfiguration": null, - "azure.mgmt.hdinsight.models.IpTag": null, "azure.mgmt.hdinsight.models.KafkaRestProperties": null, "azure.mgmt.hdinsight.models.LinuxOperatingSystemProfile": null, "azure.mgmt.hdinsight.models.LocalizedName": null, @@ -123,23 +121,12 @@ "azure.mgmt.hdinsight.models.DirectoryType": null, "azure.mgmt.hdinsight.models.HDInsightClusterProvisioningState": null, "azure.mgmt.hdinsight.models.JsonWebKeyEncryptionAlgorithm": null, - "azure.mgmt.hdinsight.models.OutboundDependenciesManagedType": null, "azure.mgmt.hdinsight.models.ResourceProviderConnection": null, "azure.mgmt.hdinsight.models.PrivateLink": null, "azure.mgmt.hdinsight.models.ResourceIdentityType": null, "azure.mgmt.hdinsight.models.FilterMode": null, - "azure.mgmt.hdinsight.models.AsyncOperationState": null, "azure.mgmt.hdinsight.models.RoleName": null, - "azure.mgmt.hdinsight.operations.ApplicationsOperations.list_by_cluster": null, - "azure.mgmt.hdinsight.aio.operations.ApplicationsOperations.list_by_cluster": null, - "azure.mgmt.hdinsight.operations.ApplicationsOperations.get": null, - "azure.mgmt.hdinsight.aio.operations.ApplicationsOperations.get": null, - "azure.mgmt.hdinsight.operations.ApplicationsOperations.begin_create": null, - "azure.mgmt.hdinsight.aio.operations.ApplicationsOperations.begin_create": null, - "azure.mgmt.hdinsight.operations.ApplicationsOperations.begin_delete": null, - "azure.mgmt.hdinsight.aio.operations.ApplicationsOperations.begin_delete": null, - "azure.mgmt.hdinsight.operations.ApplicationsOperations.get_azure_async_operation_status": null, - "azure.mgmt.hdinsight.aio.operations.ApplicationsOperations.get_azure_async_operation_status": null, + "azure.mgmt.hdinsight.models.AsyncOperationState": null, "azure.mgmt.hdinsight.operations.ClustersOperations.begin_create": null, "azure.mgmt.hdinsight.aio.operations.ClustersOperations.begin_create": null, "azure.mgmt.hdinsight.operations.ClustersOperations.update": null, @@ -168,6 +155,28 @@ "azure.mgmt.hdinsight.aio.operations.ClustersOperations.begin_update_identity_certificate": null, "azure.mgmt.hdinsight.operations.ClustersOperations.begin_execute_script_actions": null, "azure.mgmt.hdinsight.aio.operations.ClustersOperations.begin_execute_script_actions": null, + "azure.mgmt.hdinsight.operations.ApplicationsOperations.list_by_cluster": null, + "azure.mgmt.hdinsight.aio.operations.ApplicationsOperations.list_by_cluster": null, + "azure.mgmt.hdinsight.operations.ApplicationsOperations.get": null, + "azure.mgmt.hdinsight.aio.operations.ApplicationsOperations.get": null, + "azure.mgmt.hdinsight.operations.ApplicationsOperations.begin_create": null, + "azure.mgmt.hdinsight.aio.operations.ApplicationsOperations.begin_create": null, + "azure.mgmt.hdinsight.operations.ApplicationsOperations.begin_delete": null, + "azure.mgmt.hdinsight.aio.operations.ApplicationsOperations.begin_delete": null, + "azure.mgmt.hdinsight.operations.ApplicationsOperations.get_azure_async_operation_status": null, + "azure.mgmt.hdinsight.aio.operations.ApplicationsOperations.get_azure_async_operation_status": null, + "azure.mgmt.hdinsight.operations.LocationsOperations.get_capabilities": null, + "azure.mgmt.hdinsight.aio.operations.LocationsOperations.get_capabilities": null, + "azure.mgmt.hdinsight.operations.LocationsOperations.list_usages": null, + "azure.mgmt.hdinsight.aio.operations.LocationsOperations.list_usages": null, + "azure.mgmt.hdinsight.operations.LocationsOperations.list_billing_specs": null, + "azure.mgmt.hdinsight.aio.operations.LocationsOperations.list_billing_specs": null, + "azure.mgmt.hdinsight.operations.LocationsOperations.get_azure_async_operation_status": null, + "azure.mgmt.hdinsight.aio.operations.LocationsOperations.get_azure_async_operation_status": null, + "azure.mgmt.hdinsight.operations.LocationsOperations.check_name_availability": null, + "azure.mgmt.hdinsight.aio.operations.LocationsOperations.check_name_availability": null, + "azure.mgmt.hdinsight.operations.LocationsOperations.validate_cluster_create_request": null, + "azure.mgmt.hdinsight.aio.operations.LocationsOperations.validate_cluster_create_request": null, "azure.mgmt.hdinsight.operations.ConfigurationsOperations.list": null, "azure.mgmt.hdinsight.aio.operations.ConfigurationsOperations.list": null, "azure.mgmt.hdinsight.operations.ConfigurationsOperations.begin_update": null, @@ -186,12 +195,6 @@ "azure.mgmt.hdinsight.aio.operations.ExtensionsOperations.get_azure_monitor_status": null, "azure.mgmt.hdinsight.operations.ExtensionsOperations.begin_disable_azure_monitor": null, "azure.mgmt.hdinsight.aio.operations.ExtensionsOperations.begin_disable_azure_monitor": null, - "azure.mgmt.hdinsight.operations.ExtensionsOperations.begin_enable_azure_monitor_agent": null, - "azure.mgmt.hdinsight.aio.operations.ExtensionsOperations.begin_enable_azure_monitor_agent": null, - "azure.mgmt.hdinsight.operations.ExtensionsOperations.get_azure_monitor_agent_status": null, - "azure.mgmt.hdinsight.aio.operations.ExtensionsOperations.get_azure_monitor_agent_status": null, - "azure.mgmt.hdinsight.operations.ExtensionsOperations.begin_disable_azure_monitor_agent": null, - "azure.mgmt.hdinsight.aio.operations.ExtensionsOperations.begin_disable_azure_monitor_agent": null, "azure.mgmt.hdinsight.operations.ExtensionsOperations.begin_create": null, "azure.mgmt.hdinsight.aio.operations.ExtensionsOperations.begin_create": null, "azure.mgmt.hdinsight.operations.ExtensionsOperations.get": null, @@ -200,32 +203,6 @@ "azure.mgmt.hdinsight.aio.operations.ExtensionsOperations.begin_delete": null, "azure.mgmt.hdinsight.operations.ExtensionsOperations.get_azure_async_operation_status": null, "azure.mgmt.hdinsight.aio.operations.ExtensionsOperations.get_azure_async_operation_status": null, - "azure.mgmt.hdinsight.operations.LocationsOperations.get_capabilities": null, - "azure.mgmt.hdinsight.aio.operations.LocationsOperations.get_capabilities": null, - "azure.mgmt.hdinsight.operations.LocationsOperations.list_usages": null, - "azure.mgmt.hdinsight.aio.operations.LocationsOperations.list_usages": null, - "azure.mgmt.hdinsight.operations.LocationsOperations.list_billing_specs": null, - "azure.mgmt.hdinsight.aio.operations.LocationsOperations.list_billing_specs": null, - "azure.mgmt.hdinsight.operations.LocationsOperations.get_azure_async_operation_status": null, - "azure.mgmt.hdinsight.aio.operations.LocationsOperations.get_azure_async_operation_status": null, - "azure.mgmt.hdinsight.operations.LocationsOperations.check_name_availability": null, - "azure.mgmt.hdinsight.aio.operations.LocationsOperations.check_name_availability": null, - "azure.mgmt.hdinsight.operations.LocationsOperations.validate_cluster_create_request": null, - "azure.mgmt.hdinsight.aio.operations.LocationsOperations.validate_cluster_create_request": null, - "azure.mgmt.hdinsight.operations.Operations.list": null, - "azure.mgmt.hdinsight.aio.operations.Operations.list": null, - "azure.mgmt.hdinsight.operations.PrivateEndpointConnectionsOperations.list_by_cluster": null, - "azure.mgmt.hdinsight.aio.operations.PrivateEndpointConnectionsOperations.list_by_cluster": null, - "azure.mgmt.hdinsight.operations.PrivateEndpointConnectionsOperations.begin_create_or_update": null, - "azure.mgmt.hdinsight.aio.operations.PrivateEndpointConnectionsOperations.begin_create_or_update": null, - "azure.mgmt.hdinsight.operations.PrivateEndpointConnectionsOperations.get": null, - "azure.mgmt.hdinsight.aio.operations.PrivateEndpointConnectionsOperations.get": null, - "azure.mgmt.hdinsight.operations.PrivateEndpointConnectionsOperations.begin_delete": null, - "azure.mgmt.hdinsight.aio.operations.PrivateEndpointConnectionsOperations.begin_delete": null, - "azure.mgmt.hdinsight.operations.PrivateLinkResourcesOperations.list_by_cluster": null, - "azure.mgmt.hdinsight.aio.operations.PrivateLinkResourcesOperations.list_by_cluster": null, - "azure.mgmt.hdinsight.operations.PrivateLinkResourcesOperations.get": null, - "azure.mgmt.hdinsight.aio.operations.PrivateLinkResourcesOperations.get": null, "azure.mgmt.hdinsight.operations.ScriptActionsOperations.delete": null, "azure.mgmt.hdinsight.aio.operations.ScriptActionsOperations.delete": null, "azure.mgmt.hdinsight.operations.ScriptActionsOperations.list_by_cluster": null, @@ -238,11 +215,25 @@ "azure.mgmt.hdinsight.aio.operations.ScriptExecutionHistoryOperations.list_by_cluster": null, "azure.mgmt.hdinsight.operations.ScriptExecutionHistoryOperations.promote": null, "azure.mgmt.hdinsight.aio.operations.ScriptExecutionHistoryOperations.promote": null, + "azure.mgmt.hdinsight.operations.Operations.list": null, + "azure.mgmt.hdinsight.aio.operations.Operations.list": null, "azure.mgmt.hdinsight.operations.VirtualMachinesOperations.list_hosts": null, "azure.mgmt.hdinsight.aio.operations.VirtualMachinesOperations.list_hosts": null, "azure.mgmt.hdinsight.operations.VirtualMachinesOperations.begin_restart_hosts": null, "azure.mgmt.hdinsight.aio.operations.VirtualMachinesOperations.begin_restart_hosts": null, "azure.mgmt.hdinsight.operations.VirtualMachinesOperations.get_async_operation_status": null, - "azure.mgmt.hdinsight.aio.operations.VirtualMachinesOperations.get_async_operation_status": null + "azure.mgmt.hdinsight.aio.operations.VirtualMachinesOperations.get_async_operation_status": null, + "azure.mgmt.hdinsight.operations.PrivateEndpointConnectionsOperations.list_by_cluster": null, + "azure.mgmt.hdinsight.aio.operations.PrivateEndpointConnectionsOperations.list_by_cluster": null, + "azure.mgmt.hdinsight.operations.PrivateEndpointConnectionsOperations.begin_create_or_update": null, + "azure.mgmt.hdinsight.aio.operations.PrivateEndpointConnectionsOperations.begin_create_or_update": null, + "azure.mgmt.hdinsight.operations.PrivateEndpointConnectionsOperations.get": null, + "azure.mgmt.hdinsight.aio.operations.PrivateEndpointConnectionsOperations.get": null, + "azure.mgmt.hdinsight.operations.PrivateEndpointConnectionsOperations.begin_delete": null, + "azure.mgmt.hdinsight.aio.operations.PrivateEndpointConnectionsOperations.begin_delete": null, + "azure.mgmt.hdinsight.operations.PrivateLinkResourcesOperations.list_by_cluster": null, + "azure.mgmt.hdinsight.aio.operations.PrivateLinkResourcesOperations.list_by_cluster": null, + "azure.mgmt.hdinsight.operations.PrivateLinkResourcesOperations.get": null, + "azure.mgmt.hdinsight.aio.operations.PrivateLinkResourcesOperations.get": null } } \ No newline at end of file diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/_configuration.py b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/_configuration.py index 2eedb604d968..2bbec5895f73 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/_configuration.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/_configuration.py @@ -32,8 +32,8 @@ class HDInsightManagementClientConfiguration: # pylint: disable=too-many-instan :param cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is None. :type cloud_setting: ~azure.core.AzureClouds - :keyword api_version: Api Version. Default value is "2025-01-15-preview". Note that overriding - this default value may result in unsupported behavior. + :keyword api_version: Api Version. Default value is "2021-06-01". Note that overriding this + default value may result in unsupported behavior. :paramtype api_version: str """ @@ -44,7 +44,7 @@ def __init__( cloud_setting: Optional["AzureClouds"] = None, **kwargs: Any ) -> None: - api_version: str = kwargs.pop("api_version", "2025-01-15-preview") + api_version: str = kwargs.pop("api_version", "2021-06-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/_hd_insight_management_client.py b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/_hd_insight_management_client.py index 9a9772e39b1f..bdc9181710be 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/_hd_insight_management_client.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/_hd_insight_management_client.py @@ -42,30 +42,30 @@ class HDInsightManagementClient: # pylint: disable=too-many-instance-attributes """HDInsight Management Client. - :ivar applications: ApplicationsOperations operations - :vartype applications: azure.mgmt.hdinsight.operations.ApplicationsOperations :ivar clusters: ClustersOperations operations :vartype clusters: azure.mgmt.hdinsight.operations.ClustersOperations + :ivar applications: ApplicationsOperations operations + :vartype applications: azure.mgmt.hdinsight.operations.ApplicationsOperations + :ivar locations: LocationsOperations operations + :vartype locations: azure.mgmt.hdinsight.operations.LocationsOperations :ivar configurations: ConfigurationsOperations operations :vartype configurations: azure.mgmt.hdinsight.operations.ConfigurationsOperations :ivar extensions: ExtensionsOperations operations :vartype extensions: azure.mgmt.hdinsight.operations.ExtensionsOperations - :ivar locations: LocationsOperations operations - :vartype locations: azure.mgmt.hdinsight.operations.LocationsOperations - :ivar operations: Operations operations - :vartype operations: azure.mgmt.hdinsight.operations.Operations - :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations - :vartype private_endpoint_connections: - azure.mgmt.hdinsight.operations.PrivateEndpointConnectionsOperations - :ivar private_link_resources: PrivateLinkResourcesOperations operations - :vartype private_link_resources: azure.mgmt.hdinsight.operations.PrivateLinkResourcesOperations :ivar script_actions: ScriptActionsOperations operations :vartype script_actions: azure.mgmt.hdinsight.operations.ScriptActionsOperations :ivar script_execution_history: ScriptExecutionHistoryOperations operations :vartype script_execution_history: azure.mgmt.hdinsight.operations.ScriptExecutionHistoryOperations + :ivar operations: Operations operations + :vartype operations: azure.mgmt.hdinsight.operations.Operations :ivar virtual_machines: VirtualMachinesOperations operations :vartype virtual_machines: azure.mgmt.hdinsight.operations.VirtualMachinesOperations + :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations + :vartype private_endpoint_connections: + azure.mgmt.hdinsight.operations.PrivateEndpointConnectionsOperations + :ivar private_link_resources: PrivateLinkResourcesOperations operations + :vartype private_link_resources: azure.mgmt.hdinsight.operations.PrivateLinkResourcesOperations :param credential: Credential needed for the client to connect to Azure. Required. :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: The subscription credentials which uniquely identify Microsoft Azure @@ -76,8 +76,8 @@ class HDInsightManagementClient: # pylint: disable=too-many-instance-attributes :keyword cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is None. :paramtype cloud_setting: ~azure.core.AzureClouds - :keyword api_version: Api Version. Default value is "2025-01-15-preview". Note that overriding - this default value may result in unsupported behavior. + :keyword api_version: Api Version. Default value is "2021-06-01". Note that overriding this + default value may result in unsupported behavior. :paramtype api_version: str :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. @@ -129,23 +129,23 @@ def __init__( self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) self._serialize.client_side_validation = False - self.applications = ApplicationsOperations(self._client, self._config, self._serialize, self._deserialize) self.clusters = ClustersOperations(self._client, self._config, self._serialize, self._deserialize) + self.applications = ApplicationsOperations(self._client, self._config, self._serialize, self._deserialize) + self.locations = LocationsOperations(self._client, self._config, self._serialize, self._deserialize) self.configurations = ConfigurationsOperations(self._client, self._config, self._serialize, self._deserialize) self.extensions = ExtensionsOperations(self._client, self._config, self._serialize, self._deserialize) - self.locations = LocationsOperations(self._client, self._config, self._serialize, self._deserialize) - self.operations = Operations(self._client, self._config, self._serialize, self._deserialize) - self.private_endpoint_connections = PrivateEndpointConnectionsOperations( + self.script_actions = ScriptActionsOperations(self._client, self._config, self._serialize, self._deserialize) + self.script_execution_history = ScriptExecutionHistoryOperations( self._client, self._config, self._serialize, self._deserialize ) - self.private_link_resources = PrivateLinkResourcesOperations( + self.operations = Operations(self._client, self._config, self._serialize, self._deserialize) + self.virtual_machines = VirtualMachinesOperations( self._client, self._config, self._serialize, self._deserialize ) - self.script_actions = ScriptActionsOperations(self._client, self._config, self._serialize, self._deserialize) - self.script_execution_history = ScriptExecutionHistoryOperations( + self.private_endpoint_connections = PrivateEndpointConnectionsOperations( self._client, self._config, self._serialize, self._deserialize ) - self.virtual_machines = VirtualMachinesOperations( + self.private_link_resources = PrivateLinkResourcesOperations( self._client, self._config, self._serialize, self._deserialize ) diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/_patch.py b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/_patch.py index f7dd32510333..49900f6ab120 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/_patch.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/_patch.py @@ -2,6 +2,7 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ + """Customize generated code here. Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/_utils/serialization.py b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/_utils/serialization.py index 5f250836cf4b..6da830e0cf4a 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/_utils/serialization.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/_utils/serialization.py @@ -787,7 +787,7 @@ def serialize_data(self, data, data_type, **kwargs): # If dependencies is empty, try with current data class # It has to be a subclass of Enum anyway - enum_type = self.dependencies.get(data_type, data.__class__) + enum_type = self.dependencies.get(data_type, cast(type, data.__class__)) if issubclass(enum_type, Enum): return Serializer.serialize_enum(data, enum_obj=enum_type) @@ -821,13 +821,20 @@ def serialize_basic(cls, data, data_type, **kwargs): :param str data_type: Type of object in the iterable. :rtype: str, int, float, bool :return: serialized object + :raises TypeError: raise if data_type is not one of str, int, float, bool. """ custom_serializer = cls._get_custom_serializers(data_type, **kwargs) if custom_serializer: return custom_serializer(data) if data_type == "str": return cls.serialize_unicode(data) - return eval(data_type)(data) # nosec # pylint: disable=eval-used + if data_type == "int": + return int(data) + if data_type == "float": + return float(data) + if data_type == "bool": + return bool(data) + raise TypeError("Unknown basic data type: {}".format(data_type)) @classmethod def serialize_unicode(cls, data): @@ -1757,7 +1764,7 @@ def deserialize_basic(self, attr, data_type): # pylint: disable=too-many-return :param str data_type: deserialization data type. :return: Deserialized basic type. :rtype: str, int, float or bool - :raises TypeError: if string format is not valid. + :raises TypeError: if string format is not valid or data_type is not one of str, int, float, bool. """ # If we're here, data is supposed to be a basic type. # If it's still an XML node, take the text @@ -1783,7 +1790,11 @@ def deserialize_basic(self, attr, data_type): # pylint: disable=too-many-return if data_type == "str": return self.deserialize_unicode(attr) - return eval(data_type)(attr) # nosec # pylint: disable=eval-used + if data_type == "int": + return int(attr) + if data_type == "float": + return float(attr) + raise TypeError("Unknown basic data type: {}".format(data_type)) @staticmethod def deserialize_unicode(data): diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/_version.py b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/_version.py index 7419d7214922..e500a93da23b 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/_version.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/_version.py @@ -6,4 +6,5 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "9.1.0b2" + +VERSION = "9.0.1" diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/_configuration.py b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/_configuration.py index ccb5bb8cf406..498d963ea529 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/_configuration.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/_configuration.py @@ -32,8 +32,8 @@ class HDInsightManagementClientConfiguration: # pylint: disable=too-many-instan :param cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is None. :type cloud_setting: ~azure.core.AzureClouds - :keyword api_version: Api Version. Default value is "2025-01-15-preview". Note that overriding - this default value may result in unsupported behavior. + :keyword api_version: Api Version. Default value is "2021-06-01". Note that overriding this + default value may result in unsupported behavior. :paramtype api_version: str """ @@ -44,7 +44,7 @@ def __init__( cloud_setting: Optional["AzureClouds"] = None, **kwargs: Any ) -> None: - api_version: str = kwargs.pop("api_version", "2025-01-15-preview") + api_version: str = kwargs.pop("api_version", "2021-06-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/_hd_insight_management_client.py b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/_hd_insight_management_client.py index bd24795836cd..7d402158de95 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/_hd_insight_management_client.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/_hd_insight_management_client.py @@ -42,31 +42,31 @@ class HDInsightManagementClient: # pylint: disable=too-many-instance-attributes """HDInsight Management Client. - :ivar applications: ApplicationsOperations operations - :vartype applications: azure.mgmt.hdinsight.aio.operations.ApplicationsOperations :ivar clusters: ClustersOperations operations :vartype clusters: azure.mgmt.hdinsight.aio.operations.ClustersOperations + :ivar applications: ApplicationsOperations operations + :vartype applications: azure.mgmt.hdinsight.aio.operations.ApplicationsOperations + :ivar locations: LocationsOperations operations + :vartype locations: azure.mgmt.hdinsight.aio.operations.LocationsOperations :ivar configurations: ConfigurationsOperations operations :vartype configurations: azure.mgmt.hdinsight.aio.operations.ConfigurationsOperations :ivar extensions: ExtensionsOperations operations :vartype extensions: azure.mgmt.hdinsight.aio.operations.ExtensionsOperations - :ivar locations: LocationsOperations operations - :vartype locations: azure.mgmt.hdinsight.aio.operations.LocationsOperations + :ivar script_actions: ScriptActionsOperations operations + :vartype script_actions: azure.mgmt.hdinsight.aio.operations.ScriptActionsOperations + :ivar script_execution_history: ScriptExecutionHistoryOperations operations + :vartype script_execution_history: + azure.mgmt.hdinsight.aio.operations.ScriptExecutionHistoryOperations :ivar operations: Operations operations :vartype operations: azure.mgmt.hdinsight.aio.operations.Operations + :ivar virtual_machines: VirtualMachinesOperations operations + :vartype virtual_machines: azure.mgmt.hdinsight.aio.operations.VirtualMachinesOperations :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations :vartype private_endpoint_connections: azure.mgmt.hdinsight.aio.operations.PrivateEndpointConnectionsOperations :ivar private_link_resources: PrivateLinkResourcesOperations operations :vartype private_link_resources: azure.mgmt.hdinsight.aio.operations.PrivateLinkResourcesOperations - :ivar script_actions: ScriptActionsOperations operations - :vartype script_actions: azure.mgmt.hdinsight.aio.operations.ScriptActionsOperations - :ivar script_execution_history: ScriptExecutionHistoryOperations operations - :vartype script_execution_history: - azure.mgmt.hdinsight.aio.operations.ScriptExecutionHistoryOperations - :ivar virtual_machines: VirtualMachinesOperations operations - :vartype virtual_machines: azure.mgmt.hdinsight.aio.operations.VirtualMachinesOperations :param credential: Credential needed for the client to connect to Azure. Required. :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: The subscription credentials which uniquely identify Microsoft Azure @@ -77,8 +77,8 @@ class HDInsightManagementClient: # pylint: disable=too-many-instance-attributes :keyword cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is None. :paramtype cloud_setting: ~azure.core.AzureClouds - :keyword api_version: Api Version. Default value is "2025-01-15-preview". Note that overriding - this default value may result in unsupported behavior. + :keyword api_version: Api Version. Default value is "2021-06-01". Note that overriding this + default value may result in unsupported behavior. :paramtype api_version: str :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. @@ -132,23 +132,23 @@ def __init__( self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) self._serialize.client_side_validation = False - self.applications = ApplicationsOperations(self._client, self._config, self._serialize, self._deserialize) self.clusters = ClustersOperations(self._client, self._config, self._serialize, self._deserialize) + self.applications = ApplicationsOperations(self._client, self._config, self._serialize, self._deserialize) + self.locations = LocationsOperations(self._client, self._config, self._serialize, self._deserialize) self.configurations = ConfigurationsOperations(self._client, self._config, self._serialize, self._deserialize) self.extensions = ExtensionsOperations(self._client, self._config, self._serialize, self._deserialize) - self.locations = LocationsOperations(self._client, self._config, self._serialize, self._deserialize) - self.operations = Operations(self._client, self._config, self._serialize, self._deserialize) - self.private_endpoint_connections = PrivateEndpointConnectionsOperations( + self.script_actions = ScriptActionsOperations(self._client, self._config, self._serialize, self._deserialize) + self.script_execution_history = ScriptExecutionHistoryOperations( self._client, self._config, self._serialize, self._deserialize ) - self.private_link_resources = PrivateLinkResourcesOperations( + self.operations = Operations(self._client, self._config, self._serialize, self._deserialize) + self.virtual_machines = VirtualMachinesOperations( self._client, self._config, self._serialize, self._deserialize ) - self.script_actions = ScriptActionsOperations(self._client, self._config, self._serialize, self._deserialize) - self.script_execution_history = ScriptExecutionHistoryOperations( + self.private_endpoint_connections = PrivateEndpointConnectionsOperations( self._client, self._config, self._serialize, self._deserialize ) - self.virtual_machines = VirtualMachinesOperations( + self.private_link_resources = PrivateLinkResourcesOperations( self._client, self._config, self._serialize, self._deserialize ) diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/_patch.py b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/_patch.py index f7dd32510333..49900f6ab120 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/_patch.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/_patch.py @@ -2,6 +2,7 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ + """Customize generated code here. Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/operations/__init__.py b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/operations/__init__.py index 6a8195b7abf3..4e777bdbe7b3 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/operations/__init__.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/operations/__init__.py @@ -12,34 +12,34 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._applications_operations import ApplicationsOperations # type: ignore from ._clusters_operations import ClustersOperations # type: ignore +from ._applications_operations import ApplicationsOperations # type: ignore +from ._locations_operations import LocationsOperations # type: ignore from ._configurations_operations import ConfigurationsOperations # type: ignore from ._extensions_operations import ExtensionsOperations # type: ignore -from ._locations_operations import LocationsOperations # type: ignore -from ._operations import Operations # type: ignore -from ._private_endpoint_connections_operations import PrivateEndpointConnectionsOperations # type: ignore -from ._private_link_resources_operations import PrivateLinkResourcesOperations # type: ignore from ._script_actions_operations import ScriptActionsOperations # type: ignore from ._script_execution_history_operations import ScriptExecutionHistoryOperations # type: ignore +from ._operations import Operations # type: ignore from ._virtual_machines_operations import VirtualMachinesOperations # type: ignore +from ._private_endpoint_connections_operations import PrivateEndpointConnectionsOperations # type: ignore +from ._private_link_resources_operations import PrivateLinkResourcesOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "ApplicationsOperations", "ClustersOperations", + "ApplicationsOperations", + "LocationsOperations", "ConfigurationsOperations", "ExtensionsOperations", - "LocationsOperations", - "Operations", - "PrivateEndpointConnectionsOperations", - "PrivateLinkResourcesOperations", "ScriptActionsOperations", "ScriptExecutionHistoryOperations", + "Operations", "VirtualMachinesOperations", + "PrivateEndpointConnectionsOperations", + "PrivateLinkResourcesOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/operations/_applications_operations.py b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/operations/_applications_operations.py index d325bc3db9ae..53ad082180d6 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/operations/_applications_operations.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/operations/_applications_operations.py @@ -142,7 +142,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -199,7 +202,10 @@ async def get( 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) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("Application", pipeline_response.http_response) @@ -268,7 +274,10 @@ async def _create_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) @@ -455,7 +464,10 @@ async def _delete_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) @@ -577,7 +589,10 @@ async def get_azure_async_operation_status( 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) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("AsyncOperationResult", pipeline_response.http_response) diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/operations/_clusters_operations.py b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/operations/_clusters_operations.py index a3d4e56bca44..1e94bc49cd2e 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/operations/_clusters_operations.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/operations/_clusters_operations.py @@ -133,7 +133,10 @@ async def _create_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) @@ -386,7 +389,10 @@ async def update( 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) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("Cluster", pipeline_response.http_response) @@ -435,7 +441,10 @@ async def _delete_initial(self, resource_group_name: str, cluster_name: str, **k except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) @@ -544,7 +553,10 @@ async def get(self, resource_group_name: str, cluster_name: str, **kwargs: Any) 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) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("Cluster", pipeline_response.http_response) @@ -625,7 +637,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -691,7 +706,10 @@ async def _resize_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) @@ -888,7 +906,10 @@ async def _update_auto_scale_configuration_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) @@ -1095,7 +1116,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -1159,7 +1183,10 @@ async def _rotate_disk_encryption_key_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) @@ -1334,7 +1361,10 @@ async def get_gateway_settings( 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) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("GatewaySettings", pipeline_response.http_response) @@ -1401,7 +1431,10 @@ async def _update_gateway_settings_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) @@ -1579,7 +1612,10 @@ async def get_azure_async_operation_status( 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) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("AsyncOperationResult", pipeline_response.http_response) @@ -1646,7 +1682,10 @@ async def _update_identity_certificate_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) @@ -1832,7 +1871,10 @@ async def _execute_script_actions_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/operations/_configurations_operations.py b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/operations/_configurations_operations.py index 9f5cedf29aee..7bc9d367052c 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/operations/_configurations_operations.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/operations/_configurations_operations.py @@ -102,7 +102,10 @@ async def list(self, resource_group_name: str, cluster_name: str, **kwargs: Any) 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) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("ClusterConfigurations", pipeline_response.http_response) @@ -171,7 +174,10 @@ async def _update_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) @@ -363,7 +369,10 @@ async def get( 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) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("{str}", pipeline_response.http_response) diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/operations/_extensions_operations.py b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/operations/_extensions_operations.py index a49135de7695..edc97a931b0d 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/operations/_extensions_operations.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/operations/_extensions_operations.py @@ -34,14 +34,11 @@ from ...operations._extensions_operations import ( build_create_request, build_delete_request, - build_disable_azure_monitor_agent_request, build_disable_azure_monitor_request, build_disable_monitoring_request, - build_enable_azure_monitor_agent_request, build_enable_azure_monitor_request, build_enable_monitoring_request, build_get_azure_async_operation_status_request, - build_get_azure_monitor_agent_status_request, build_get_azure_monitor_status_request, build_get_monitoring_status_request, build_get_request, @@ -53,7 +50,7 @@ List = list -class ExtensionsOperations: # pylint: disable=too-many-public-methods +class ExtensionsOperations: """ .. warning:: **DO NOT** instantiate this class directly. @@ -129,7 +126,10 @@ async def _enable_monitoring_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) @@ -304,7 +304,10 @@ async def get_monitoring_status( 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) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("ClusterMonitoringResponse", pipeline_response.http_response) @@ -355,7 +358,10 @@ async def _disable_monitoring_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) @@ -478,7 +484,10 @@ async def _enable_azure_monitor_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) @@ -653,7 +662,10 @@ async def get_azure_monitor_status( 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) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("AzureMonitorResponse", pipeline_response.http_response) @@ -704,7 +716,10 @@ async def _disable_azure_monitor_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) @@ -770,355 +785,6 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- ) return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - async def _enable_azure_monitor_agent_initial( - self, - resource_group_name: str, - cluster_name: str, - parameters: Union[_models.AzureMonitorRequest, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 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[AsyncIterator[bytes]] = 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, "AzureMonitorRequest") - - _request = build_enable_azure_monitor_agent_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, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - 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]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - 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 = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_enable_azure_monitor_agent( - self, - resource_group_name: str, - cluster_name: str, - parameters: _models.AzureMonitorRequest, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[None]: - """Enables the Azure Monitor Agent on the HDInsight cluster. - - :param resource_group_name: The name of the resource group. Required. - :type resource_group_name: str - :param cluster_name: The name of the cluster. Required. - :type cluster_name: str - :param parameters: The Log Analytics workspace parameters. Required. - :type parameters: ~azure.mgmt.hdinsight.models.AzureMonitorRequest - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :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: - """ - - @overload - async def begin_enable_azure_monitor_agent( - self, - resource_group_name: str, - cluster_name: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[None]: - """Enables the Azure Monitor Agent on the HDInsight cluster. - - :param resource_group_name: The name of the resource group. Required. - :type resource_group_name: str - :param cluster_name: The name of the cluster. Required. - :type cluster_name: str - :param parameters: The Log Analytics workspace parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :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: - """ - - @distributed_trace_async - async def begin_enable_azure_monitor_agent( - self, - resource_group_name: str, - cluster_name: str, - parameters: Union[_models.AzureMonitorRequest, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[None]: - """Enables the Azure Monitor Agent on the HDInsight cluster. - - :param resource_group_name: The name of the resource group. Required. - :type resource_group_name: str - :param cluster_name: The name of the cluster. Required. - :type cluster_name: str - :param parameters: The Log Analytics workspace parameters. Is either a AzureMonitorRequest type - or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.hdinsight.models.AzureMonitorRequest or IO[bytes] - :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 = 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[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._enable_azure_monitor_agent_initial( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - parameters=parameters, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @distributed_trace_async - async def get_azure_monitor_agent_status( - self, resource_group_name: str, cluster_name: str, **kwargs: Any - ) -> _models.AzureMonitorResponse: - """Gets the status of Azure Monitor Agent on the HDInsight cluster. - - :param resource_group_name: The name of the resource group. Required. - :type resource_group_name: str - :param cluster_name: The name of the cluster. Required. - :type cluster_name: str - :return: AzureMonitorResponse or the result of cls(response) - :rtype: ~azure.mgmt.hdinsight.models.AzureMonitorResponse - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 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.AzureMonitorResponse] = kwargs.pop("cls", None) - - _request = build_get_azure_monitor_agent_status_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _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("AzureMonitorResponse", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - async def _disable_azure_monitor_agent_initial( - self, resource_group_name: str, cluster_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 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[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_disable_azure_monitor_agent_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - 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]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - 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 = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_disable_azure_monitor_agent( - self, resource_group_name: str, cluster_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: - """Disables the Azure Monitor Agent on the HDInsight cluster. - - :param resource_group_name: The name of the resource group. Required. - :type resource_group_name: str - :param cluster_name: The name of the cluster. Required. - :type cluster_name: str - :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._disable_azure_monitor_agent_initial( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - async def _create_initial( self, resource_group_name: str, @@ -1178,7 +844,10 @@ async def _create_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) @@ -1366,7 +1035,10 @@ async def get( 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) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("ClusterMonitoringResponse", pipeline_response.http_response) @@ -1418,7 +1090,10 @@ async def _delete_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) @@ -1540,7 +1215,10 @@ async def get_azure_async_operation_status( 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) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("AsyncOperationResult", pipeline_response.http_response) diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/operations/_locations_operations.py b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/operations/_locations_operations.py index 73890b8fc00d..55c0d1932e23 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/operations/_locations_operations.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/operations/_locations_operations.py @@ -102,7 +102,10 @@ async def get_capabilities(self, location: str, **kwargs: Any) -> _models.Capabi 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) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("CapabilitiesResult", pipeline_response.http_response) @@ -154,7 +157,10 @@ async def list_usages(self, location: str, **kwargs: Any) -> _models.UsagesListR 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) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("UsagesListResult", pipeline_response.http_response) @@ -206,7 +212,10 @@ async def list_billing_specs(self, location: str, **kwargs: Any) -> _models.Bill 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) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("BillingResponseListResult", pipeline_response.http_response) @@ -263,7 +272,10 @@ async def get_azure_async_operation_status( 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) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("AsyncOperationResult", pipeline_response.http_response) @@ -374,7 +386,10 @@ async def check_name_availability( 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) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("NameAvailabilityCheckResult", pipeline_response.http_response) @@ -488,7 +503,10 @@ async def validate_cluster_create_request( 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) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("ClusterCreateValidationResult", pipeline_response.http_response) diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/operations/_operations.py b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/operations/_operations.py index 635cbac9ea09..0883c16e7733 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/operations/_operations.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/operations/_operations.py @@ -121,7 +121,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/operations/_patch.py b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/operations/_patch.py index f7dd32510333..49900f6ab120 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/operations/_patch.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/operations/_patch.py @@ -2,6 +2,7 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ + """Customize generated code here. Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/operations/_private_endpoint_connections_operations.py b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/operations/_private_endpoint_connections_operations.py index 9af5c72ce758..15ff928bdacf 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/operations/_private_endpoint_connections_operations.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/operations/_private_endpoint_connections_operations.py @@ -143,7 +143,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -209,7 +212,10 @@ async def _create_or_update_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) @@ -408,7 +414,10 @@ async def get( 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) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("PrivateEndpointConnection", pipeline_response.http_response) @@ -460,7 +469,10 @@ async def _delete_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/operations/_private_link_resources_operations.py b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/operations/_private_link_resources_operations.py index eb855bf1b389..1469c00579f8 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/operations/_private_link_resources_operations.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/operations/_private_link_resources_operations.py @@ -99,7 +99,10 @@ async def list_by_cluster( 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) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("PrivateLinkResourceListResult", pipeline_response.http_response) @@ -159,7 +162,10 @@ async def get( 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) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("PrivateLinkResource", pipeline_response.http_response) diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/operations/_script_actions_operations.py b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/operations/_script_actions_operations.py index 29f115fb2007..82a6a238a16c 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/operations/_script_actions_operations.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/operations/_script_actions_operations.py @@ -108,7 +108,10 @@ async def delete(self, resource_group_name: str, cluster_name: str, script_name: if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -192,7 +195,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -249,7 +255,10 @@ async def get_execution_detail( 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) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("RuntimeScriptActionDetail", pipeline_response.http_response) @@ -309,7 +318,10 @@ async def get_execution_async_operation_status( 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) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("AsyncOperationResult", pipeline_response.http_response) diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/operations/_script_execution_history_operations.py b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/operations/_script_execution_history_operations.py index e2393583b230..9001e8d2dd32 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/operations/_script_execution_history_operations.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/operations/_script_execution_history_operations.py @@ -133,7 +133,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -190,7 +193,10 @@ async def promote( 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) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/operations/_virtual_machines_operations.py b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/operations/_virtual_machines_operations.py index e54f7c37ee07..45e9b9081f44 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/operations/_virtual_machines_operations.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/operations/_virtual_machines_operations.py @@ -106,7 +106,10 @@ async def list_hosts(self, resource_group_name: str, cluster_name: str, **kwargs 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) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("[HostInfo]", pipeline_response.http_response) @@ -169,7 +172,10 @@ async def _restart_hosts_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) @@ -343,7 +349,10 @@ async def get_async_operation_status( 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) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("AsyncOperationResult", pipeline_response.http_response) diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/__init__.py b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/__init__.py index 54c9500b136a..43f23d377892 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/__init__.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/__init__.py @@ -60,7 +60,6 @@ DiskBillingMeters, DiskEncryptionProperties, EncryptionInTransitProperties, - EntraUserInfo, ErrorResponse, Errors, ExcludedServicesConfig, @@ -70,7 +69,6 @@ HardwareProfile, HostInfo, IPConfiguration, - IpTag, KafkaRestProperties, LinuxOperatingSystemProfile, LocalizedName, @@ -136,7 +134,6 @@ HDInsightClusterProvisioningState, JsonWebKeyEncryptionAlgorithm, OSType, - OutboundDependenciesManagedType, PrivateEndpointConnectionProvisioningState, PrivateIPAllocationMethod, PrivateLink, @@ -198,7 +195,6 @@ "DiskBillingMeters", "DiskEncryptionProperties", "EncryptionInTransitProperties", - "EntraUserInfo", "ErrorResponse", "Errors", "ExcludedServicesConfig", @@ -208,7 +204,6 @@ "HardwareProfile", "HostInfo", "IPConfiguration", - "IpTag", "KafkaRestProperties", "LinuxOperatingSystemProfile", "LocalizedName", @@ -271,7 +266,6 @@ "HDInsightClusterProvisioningState", "JsonWebKeyEncryptionAlgorithm", "OSType", - "OutboundDependenciesManagedType", "PrivateEndpointConnectionProvisioningState", "PrivateIPAllocationMethod", "PrivateLink", diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/_hd_insight_management_client_enums.py b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/_hd_insight_management_client_enums.py index c4ecadf1c41b..02a930cb8cc5 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/_hd_insight_management_client_enums.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/_hd_insight_management_client_enums.py @@ -81,17 +81,9 @@ class OSType(str, Enum, metaclass=CaseInsensitiveEnumMeta): LINUX = "Linux" -class OutboundDependenciesManagedType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """A value to describe how the outbound dependencies of a HDInsight cluster are managed. 'Managed' - means that the outbound dependencies are managed by the HDInsight service. 'External' means - that the outbound dependencies are managed by a customer specific solution. - """ - - MANAGED = "Managed" - EXTERNAL = "External" - - -class PrivateEndpointConnectionProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): +class PrivateEndpointConnectionProvisioningState( # pylint: disable=name-too-long + str, Enum, metaclass=CaseInsensitiveEnumMeta +): """The provisioning state, which only appears in the response.""" IN_PROGRESS = "InProgress" @@ -116,7 +108,9 @@ class PrivateLink(str, Enum, metaclass=CaseInsensitiveEnumMeta): ENABLED = "Enabled" -class PrivateLinkConfigurationProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): +class PrivateLinkConfigurationProvisioningState( # pylint: disable=name-too-long + str, Enum, metaclass=CaseInsensitiveEnumMeta +): """The private link configuration provisioning state, which only appears in the response.""" IN_PROGRESS = "InProgress" diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/_models_py3.py b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/_models_py3.py index 86879979e102..3143f3758061 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/_models_py3.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/_models_py3.py @@ -1691,7 +1691,7 @@ class ClusterGetProperties(_serialization.Model): "private_endpoint_connections": {"key": "privateEndpointConnections", "type": "[PrivateEndpointConnection]"}, } - def __init__( # pylint: disable=too-many-locals + def __init__( self, *, cluster_definition: "_models.ClusterDefinition", @@ -1977,33 +1977,19 @@ class ClusterPatchParameters(_serialization.Model): :ivar tags: The resource tags. :vartype tags: dict[str, str] - :ivar identity: The identity of the cluster, if configured. Setting this property will override - the existing identity configuration of the cluster. - :vartype identity: ~azure.mgmt.hdinsight.models.ClusterIdentity """ _attribute_map = { "tags": {"key": "tags", "type": "{str}"}, - "identity": {"key": "identity", "type": "ClusterIdentity"}, } - def __init__( - self, - *, - tags: Optional[dict[str, str]] = None, - identity: Optional["_models.ClusterIdentity"] = None, - **kwargs: Any - ) -> None: + def __init__(self, *, tags: Optional[dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword tags: The resource tags. :paramtype tags: dict[str, str] - :keyword identity: The identity of the cluster, if configured. Setting this property will - override the existing identity configuration of the cluster. - :paramtype identity: ~azure.mgmt.hdinsight.models.ClusterIdentity """ super().__init__(**kwargs) self.tags = tags - self.identity = identity class ClusterResizeParameters(_serialization.Model): @@ -2339,49 +2325,6 @@ def __init__(self, *, is_encryption_in_transit_enabled: bool = False, **kwargs: self.is_encryption_in_transit_enabled = is_encryption_in_transit_enabled -class EntraUserInfo(_serialization.Model): - """Details of an Entra user for gateway access. - - :ivar object_id: The unique object ID of the Entra user or client ID of the enterprise - applications. - :vartype object_id: str - :ivar display_name: The display name of the Entra user. - :vartype display_name: str - :ivar upn: The User Principal Name (UPN) of the Entra user. It may be empty in certain cases, - such as for enterprise applications. - :vartype upn: str - """ - - _attribute_map = { - "object_id": {"key": "objectId", "type": "str"}, - "display_name": {"key": "displayName", "type": "str"}, - "upn": {"key": "upn", "type": "str"}, - } - - def __init__( - self, - *, - object_id: Optional[str] = None, - display_name: Optional[str] = None, - upn: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword object_id: The unique object ID of the Entra user or client ID of the enterprise - applications. - :paramtype object_id: str - :keyword display_name: The display name of the Entra user. - :paramtype display_name: str - :keyword upn: The User Principal Name (UPN) of the Entra user. It may be empty in certain - cases, such as for enterprise applications. - :paramtype upn: str - """ - super().__init__(**kwargs) - self.object_id = object_id - self.display_name = display_name - self.upn = upn - - class ErrorResponse(_serialization.Model): """Describes the format of Error response. @@ -2542,8 +2485,6 @@ class GatewaySettings(_serialization.Model): :vartype user_name: str :ivar password: The gateway settings user password. :vartype password: str - :ivar rest_auth_entra_users: List of Entra users for gateway access. - :vartype rest_auth_entra_users: list[~azure.mgmt.hdinsight.models.EntraUserInfo] """ _validation = { @@ -2556,19 +2497,14 @@ class GatewaySettings(_serialization.Model): "is_credential_enabled": {"key": "restAuthCredential\\.isEnabled", "type": "str"}, "user_name": {"key": "restAuthCredential\\.username", "type": "str"}, "password": {"key": "restAuthCredential\\.password", "type": "str"}, - "rest_auth_entra_users": {"key": "restAuthEntraUsers", "type": "[EntraUserInfo]"}, } - def __init__(self, *, rest_auth_entra_users: Optional[list["_models.EntraUserInfo"]] = None, **kwargs: Any) -> None: - """ - :keyword rest_auth_entra_users: List of Entra users for gateway access. - :paramtype rest_auth_entra_users: list[~azure.mgmt.hdinsight.models.EntraUserInfo] - """ + def __init__(self, **kwargs: Any) -> None: + """ """ super().__init__(**kwargs) self.is_credential_enabled: Optional[str] = None self.user_name: Optional[str] = None self.password: Optional[str] = None - self.rest_auth_entra_users = rest_auth_entra_users class HardwareProfile(_serialization.Model): @@ -2715,41 +2651,6 @@ def __init__( self.subnet = subnet -class IpTag(_serialization.Model): - """Contains the IpTag associated with the public IP address. - - All required parameters must be populated in order to send to server. - - :ivar ip_tag_type: Gets or sets the ipTag type: Example FirstPartyUsage. Required. - :vartype ip_tag_type: str - :ivar tag: Gets or sets value of the IpTag associated with the public IP. Example HDInsight, - SQL, Storage etc. Required. - :vartype tag: str - """ - - _validation = { - "ip_tag_type": {"required": True}, - "tag": {"required": True}, - } - - _attribute_map = { - "ip_tag_type": {"key": "ipTagType", "type": "str"}, - "tag": {"key": "tag", "type": "str"}, - } - - def __init__(self, *, ip_tag_type: str, tag: str, **kwargs: Any) -> None: - """ - :keyword ip_tag_type: Gets or sets the ipTag type: Example FirstPartyUsage. Required. - :paramtype ip_tag_type: str - :keyword tag: Gets or sets value of the IpTag associated with the public IP. Example HDInsight, - SQL, Storage etc. Required. - :paramtype tag: str - """ - super().__init__(**kwargs) - self.ip_tag_type = ip_tag_type - self.tag = tag - - class KafkaRestProperties(_serialization.Model): """The kafka rest proxy configuration which contains AAD security group information. @@ -3052,12 +2953,6 @@ def __init__(self, *, name_available: Optional[bool] = None, **kwargs: Any) -> N class NetworkProperties(_serialization.Model): """The network properties. - :ivar outbound_dependencies_managed_type: A value to describe how the outbound dependencies of - a HDInsight cluster are managed. 'Managed' means that the outbound dependencies are managed by - the HDInsight service. 'External' means that the outbound dependencies are managed by a - customer specific solution. Known values are: "Managed" and "External". - :vartype outbound_dependencies_managed_type: str or - ~azure.mgmt.hdinsight.models.OutboundDependenciesManagedType :ivar resource_provider_connection: The direction for the resource provider connection. Known values are: "Inbound" and "Outbound". :vartype resource_provider_connection: str or @@ -3065,34 +2960,21 @@ class NetworkProperties(_serialization.Model): :ivar private_link: Indicates whether or not private link is enabled. Known values are: "Disabled" and "Enabled". :vartype private_link: str or ~azure.mgmt.hdinsight.models.PrivateLink - :ivar public_ip_tag: Gets or sets the IP tag for the public IPs created along with the - HDInsight Clusters. - :vartype public_ip_tag: ~azure.mgmt.hdinsight.models.IpTag """ _attribute_map = { - "outbound_dependencies_managed_type": {"key": "outboundDependenciesManagedType", "type": "str"}, "resource_provider_connection": {"key": "resourceProviderConnection", "type": "str"}, "private_link": {"key": "privateLink", "type": "str"}, - "public_ip_tag": {"key": "publicIpTag", "type": "IpTag"}, } def __init__( self, *, - outbound_dependencies_managed_type: Optional[Union[str, "_models.OutboundDependenciesManagedType"]] = None, resource_provider_connection: Optional[Union[str, "_models.ResourceProviderConnection"]] = None, private_link: Optional[Union[str, "_models.PrivateLink"]] = None, - public_ip_tag: Optional["_models.IpTag"] = None, **kwargs: Any ) -> None: """ - :keyword outbound_dependencies_managed_type: A value to describe how the outbound dependencies - of a HDInsight cluster are managed. 'Managed' means that the outbound dependencies are managed - by the HDInsight service. 'External' means that the outbound dependencies are managed by a - customer specific solution. Known values are: "Managed" and "External". - :paramtype outbound_dependencies_managed_type: str or - ~azure.mgmt.hdinsight.models.OutboundDependenciesManagedType :keyword resource_provider_connection: The direction for the resource provider connection. Known values are: "Inbound" and "Outbound". :paramtype resource_provider_connection: str or @@ -3100,15 +2982,10 @@ def __init__( :keyword private_link: Indicates whether or not private link is enabled. Known values are: "Disabled" and "Enabled". :paramtype private_link: str or ~azure.mgmt.hdinsight.models.PrivateLink - :keyword public_ip_tag: Gets or sets the IP tag for the public IPs created along with the - HDInsight Clusters. - :paramtype public_ip_tag: ~azure.mgmt.hdinsight.models.IpTag """ super().__init__(**kwargs) - self.outbound_dependencies_managed_type = outbound_dependencies_managed_type self.resource_provider_connection = resource_provider_connection self.private_link = private_link - self.public_ip_tag = public_ip_tag class Operation(_serialization.Model): @@ -4305,9 +4182,6 @@ class StorageAccount(_serialization.Model): :vartype saskey: str :ivar fileshare: The file share name. :vartype fileshare: str - :ivar enable_secure_channel: Enable secure channel or not, it's an optional field. Default - value is false when cluster version < 5.1 and true when cluster version >= 5.1 ,. - :vartype enable_secure_channel: bool """ _attribute_map = { @@ -4320,7 +4194,6 @@ class StorageAccount(_serialization.Model): "msi_resource_id": {"key": "msiResourceId", "type": "str"}, "saskey": {"key": "saskey", "type": "str"}, "fileshare": {"key": "fileshare", "type": "str"}, - "enable_secure_channel": {"key": "enableSecureChannel", "type": "bool"}, } def __init__( @@ -4335,7 +4208,6 @@ def __init__( msi_resource_id: Optional[str] = None, saskey: Optional[str] = None, fileshare: Optional[str] = None, - enable_secure_channel: Optional[bool] = None, **kwargs: Any ) -> None: """ @@ -4360,9 +4232,6 @@ def __init__( :paramtype saskey: str :keyword fileshare: The file share name. :paramtype fileshare: str - :keyword enable_secure_channel: Enable secure channel or not, it's an optional field. Default - value is false when cluster version < 5.1 and true when cluster version >= 5.1 ,. - :paramtype enable_secure_channel: bool """ super().__init__(**kwargs) self.name = name @@ -4374,7 +4243,6 @@ def __init__( self.msi_resource_id = msi_resource_id self.saskey = saskey self.fileshare = fileshare - self.enable_secure_channel = enable_secure_channel class StorageProfile(_serialization.Model): @@ -4501,8 +4369,7 @@ def __init__( class UpdateGatewaySettingsParameters(_serialization.Model): - """The update gateway settings request parameters. Note either basic or entra user should be - provided at a time. + """The update gateway settings request parameters. :ivar is_credential_enabled: Indicates whether or not the gateway settings based authorization is enabled. @@ -4511,15 +4378,12 @@ class UpdateGatewaySettingsParameters(_serialization.Model): :vartype user_name: str :ivar password: The gateway settings user password. :vartype password: str - :ivar rest_auth_entra_users: List of Entra users for gateway access. - :vartype rest_auth_entra_users: list[~azure.mgmt.hdinsight.models.EntraUserInfo] """ _attribute_map = { "is_credential_enabled": {"key": "restAuthCredential\\.isEnabled", "type": "bool"}, "user_name": {"key": "restAuthCredential\\.username", "type": "str"}, "password": {"key": "restAuthCredential\\.password", "type": "str"}, - "rest_auth_entra_users": {"key": "restAuthEntraUsers", "type": "[EntraUserInfo]"}, } def __init__( @@ -4528,7 +4392,6 @@ def __init__( is_credential_enabled: bool = True, user_name: Optional[str] = None, password: Optional[str] = None, - rest_auth_entra_users: Optional[list["_models.EntraUserInfo"]] = None, **kwargs: Any ) -> None: """ @@ -4539,14 +4402,11 @@ def __init__( :paramtype user_name: str :keyword password: The gateway settings user password. :paramtype password: str - :keyword rest_auth_entra_users: List of Entra users for gateway access. - :paramtype rest_auth_entra_users: list[~azure.mgmt.hdinsight.models.EntraUserInfo] """ super().__init__(**kwargs) self.is_credential_enabled = is_credential_enabled self.user_name = user_name self.password = password - self.rest_auth_entra_users = rest_auth_entra_users class Usage(_serialization.Model): diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/_patch.py b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/_patch.py index f7dd32510333..49900f6ab120 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/_patch.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/_patch.py @@ -2,6 +2,7 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ + """Customize generated code here. Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/__init__.py b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/__init__.py index 6a8195b7abf3..4e777bdbe7b3 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/__init__.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/__init__.py @@ -12,34 +12,34 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._applications_operations import ApplicationsOperations # type: ignore from ._clusters_operations import ClustersOperations # type: ignore +from ._applications_operations import ApplicationsOperations # type: ignore +from ._locations_operations import LocationsOperations # type: ignore from ._configurations_operations import ConfigurationsOperations # type: ignore from ._extensions_operations import ExtensionsOperations # type: ignore -from ._locations_operations import LocationsOperations # type: ignore -from ._operations import Operations # type: ignore -from ._private_endpoint_connections_operations import PrivateEndpointConnectionsOperations # type: ignore -from ._private_link_resources_operations import PrivateLinkResourcesOperations # type: ignore from ._script_actions_operations import ScriptActionsOperations # type: ignore from ._script_execution_history_operations import ScriptExecutionHistoryOperations # type: ignore +from ._operations import Operations # type: ignore from ._virtual_machines_operations import VirtualMachinesOperations # type: ignore +from ._private_endpoint_connections_operations import PrivateEndpointConnectionsOperations # type: ignore +from ._private_link_resources_operations import PrivateLinkResourcesOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "ApplicationsOperations", "ClustersOperations", + "ApplicationsOperations", + "LocationsOperations", "ConfigurationsOperations", "ExtensionsOperations", - "LocationsOperations", - "Operations", - "PrivateEndpointConnectionsOperations", - "PrivateLinkResourcesOperations", "ScriptActionsOperations", "ScriptExecutionHistoryOperations", + "Operations", "VirtualMachinesOperations", + "PrivateEndpointConnectionsOperations", + "PrivateLinkResourcesOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/_applications_operations.py b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/_applications_operations.py index afc11a0786dd..fa06a818a685 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/_applications_operations.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/_applications_operations.py @@ -49,7 +49,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", "2025-01-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -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", "2025-01-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -112,7 +112,7 @@ def build_create_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", "2025-01-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -147,7 +147,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", "2025-01-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -184,7 +184,7 @@ def build_get_azure_async_operation_status_request( # pylint: disable=name-too- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-01-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -306,7 +306,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -363,7 +366,10 @@ def get( 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) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("Application", pipeline_response.http_response) @@ -432,7 +438,10 @@ def _create_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) @@ -619,7 +628,10 @@ def _delete_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) @@ -741,7 +753,10 @@ def get_azure_async_operation_status( 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) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("AsyncOperationResult", pipeline_response.http_response) diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/_clusters_operations.py b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/_clusters_operations.py index 972f5b83fa2e..dce16dd129b6 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/_clusters_operations.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/_clusters_operations.py @@ -49,7 +49,7 @@ def build_create_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", "2025-01-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -83,7 +83,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", "2025-01-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -117,7 +117,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", "2025-01-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -146,7 +146,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", "2025-01-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -175,7 +175,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", "2025-01-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -209,7 +209,7 @@ def build_resize_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", "2025-01-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -248,7 +248,7 @@ def build_update_auto_scale_configuration_request( # pylint: disable=name-too-l _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", "2025-01-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -281,7 +281,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", "2025-01-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -307,7 +307,7 @@ def build_rotate_disk_encryption_key_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-01-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -341,7 +341,7 @@ def build_get_gateway_settings_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-01-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -372,7 +372,7 @@ def build_update_gateway_settings_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-01-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -406,7 +406,7 @@ def build_get_azure_async_operation_status_request( # pylint: disable=name-too- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-01-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -438,7 +438,7 @@ def build_update_identity_certificate_request( # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-01-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -472,7 +472,7 @@ def build_execute_script_actions_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-01-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -576,7 +576,10 @@ def _create_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) @@ -826,7 +829,10 @@ def update( 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) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("Cluster", pipeline_response.http_response) @@ -875,7 +881,10 @@ def _delete_initial(self, resource_group_name: str, cluster_name: str, **kwargs: except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) @@ -984,7 +993,10 @@ def get(self, resource_group_name: str, cluster_name: str, **kwargs: Any) -> _mo 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) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("Cluster", pipeline_response.http_response) @@ -1065,7 +1077,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -1131,7 +1146,10 @@ def _resize_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) @@ -1328,7 +1346,10 @@ def _update_auto_scale_configuration_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) @@ -1535,7 +1556,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -1599,7 +1623,10 @@ def _rotate_disk_encryption_key_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) @@ -1774,7 +1801,10 @@ def get_gateway_settings( 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) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("GatewaySettings", pipeline_response.http_response) @@ -1841,7 +1871,10 @@ def _update_gateway_settings_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) @@ -2019,7 +2052,10 @@ def get_azure_async_operation_status( 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) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("AsyncOperationResult", pipeline_response.http_response) @@ -2086,7 +2122,10 @@ def _update_identity_certificate_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) @@ -2272,7 +2311,10 @@ def _execute_script_actions_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/_configurations_operations.py b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/_configurations_operations.py index 165377f14de6..e8c09c69f812 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/_configurations_operations.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/_configurations_operations.py @@ -45,7 +45,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", "2025-01-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -76,7 +76,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", "2025-01-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -111,7 +111,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", "2025-01-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -201,7 +201,10 @@ def list(self, resource_group_name: str, cluster_name: str, **kwargs: Any) -> _m 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) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("ClusterConfigurations", pipeline_response.http_response) @@ -270,7 +273,10 @@ def _update_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) @@ -462,7 +468,10 @@ def get( 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) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("{str}", pipeline_response.http_response) diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/_extensions_operations.py b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/_extensions_operations.py index 8b76f6f14572..8345f34da53d 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/_extensions_operations.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/_extensions_operations.py @@ -47,7 +47,7 @@ def build_enable_monitoring_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", "2025-01-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -81,7 +81,7 @@ def build_get_monitoring_status_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-01-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -112,7 +112,7 @@ def build_disable_monitoring_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", "2025-01-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -143,7 +143,7 @@ def build_enable_azure_monitor_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-01-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -177,7 +177,7 @@ def build_get_azure_monitor_status_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-01-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -208,7 +208,7 @@ def build_disable_azure_monitor_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-01-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -233,109 +233,13 @@ def build_disable_azure_monitor_request( return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_enable_azure_monitor_agent_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", "2025-01-15-preview")) - 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.HDInsight/clusters/{clusterName}/extensions/azureMonitorAgent", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str"), - } - - _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_get_azure_monitor_agent_status_request( # pylint: disable=name-too-long - resource_group_name: str, cluster_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-01-15-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/extensions/azureMonitorAgent", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str"), - } - - _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_disable_azure_monitor_agent_request( # pylint: disable=name-too-long - resource_group_name: str, cluster_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-01-15-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/extensions/azureMonitorAgent", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str"), - } - - _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_create_request( resource_group_name: str, cluster_name: str, extension_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", "2025-01-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -370,7 +274,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", "2025-01-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -402,7 +306,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", "2025-01-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -439,7 +343,7 @@ def build_get_azure_async_operation_status_request( # pylint: disable=name-too- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-01-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -466,7 +370,7 @@ def build_get_azure_async_operation_status_request( # pylint: disable=name-too- return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -class ExtensionsOperations: # pylint: disable=too-many-public-methods +class ExtensionsOperations: """ .. warning:: **DO NOT** instantiate this class directly. @@ -542,7 +446,10 @@ def _enable_monitoring_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) @@ -717,7 +624,10 @@ def get_monitoring_status( 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) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("ClusterMonitoringResponse", pipeline_response.http_response) @@ -768,7 +678,10 @@ def _disable_monitoring_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) @@ -889,7 +802,10 @@ def _enable_azure_monitor_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) @@ -1064,7 +980,10 @@ def get_azure_monitor_status( 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) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("AzureMonitorResponse", pipeline_response.http_response) @@ -1115,7 +1034,10 @@ def _disable_azure_monitor_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) @@ -1181,355 +1103,6 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- ) return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - def _enable_azure_monitor_agent_initial( - self, - resource_group_name: str, - cluster_name: str, - parameters: Union[_models.AzureMonitorRequest, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 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[Iterator[bytes]] = 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, "AzureMonitorRequest") - - _request = build_enable_azure_monitor_agent_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, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - 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]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - 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 = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_enable_azure_monitor_agent( - self, - resource_group_name: str, - cluster_name: str, - parameters: _models.AzureMonitorRequest, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[None]: - """Enables the Azure Monitor Agent on the HDInsight cluster. - - :param resource_group_name: The name of the resource group. Required. - :type resource_group_name: str - :param cluster_name: The name of the cluster. Required. - :type cluster_name: str - :param parameters: The Log Analytics workspace parameters. Required. - :type parameters: ~azure.mgmt.hdinsight.models.AzureMonitorRequest - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :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: - """ - - @overload - def begin_enable_azure_monitor_agent( - self, - resource_group_name: str, - cluster_name: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[None]: - """Enables the Azure Monitor Agent on the HDInsight cluster. - - :param resource_group_name: The name of the resource group. Required. - :type resource_group_name: str - :param cluster_name: The name of the cluster. Required. - :type cluster_name: str - :param parameters: The Log Analytics workspace parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :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: - """ - - @distributed_trace - def begin_enable_azure_monitor_agent( - self, - resource_group_name: str, - cluster_name: str, - parameters: Union[_models.AzureMonitorRequest, IO[bytes]], - **kwargs: Any - ) -> LROPoller[None]: - """Enables the Azure Monitor Agent on the HDInsight cluster. - - :param resource_group_name: The name of the resource group. Required. - :type resource_group_name: str - :param cluster_name: The name of the cluster. Required. - :type cluster_name: str - :param parameters: The Log Analytics workspace parameters. Is either a AzureMonitorRequest type - or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.hdinsight.models.AzureMonitorRequest or IO[bytes] - :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 = 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[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._enable_azure_monitor_agent_initial( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - parameters=parameters, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @distributed_trace - def get_azure_monitor_agent_status( - self, resource_group_name: str, cluster_name: str, **kwargs: Any - ) -> _models.AzureMonitorResponse: - """Gets the status of Azure Monitor Agent on the HDInsight cluster. - - :param resource_group_name: The name of the resource group. Required. - :type resource_group_name: str - :param cluster_name: The name of the cluster. Required. - :type cluster_name: str - :return: AzureMonitorResponse or the result of cls(response) - :rtype: ~azure.mgmt.hdinsight.models.AzureMonitorResponse - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 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.AzureMonitorResponse] = kwargs.pop("cls", None) - - _request = build_get_azure_monitor_agent_status_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _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("AzureMonitorResponse", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - def _disable_azure_monitor_agent_initial( - self, resource_group_name: str, cluster_name: str, **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 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[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_disable_azure_monitor_agent_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - 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]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - 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 = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_disable_azure_monitor_agent( - self, resource_group_name: str, cluster_name: str, **kwargs: Any - ) -> LROPoller[None]: - """Disables the Azure Monitor Agent on the HDInsight cluster. - - :param resource_group_name: The name of the resource group. Required. - :type resource_group_name: str - :param cluster_name: The name of the cluster. Required. - :type cluster_name: str - :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._disable_azure_monitor_agent_initial( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - def _create_initial( self, resource_group_name: str, @@ -1589,7 +1162,10 @@ def _create_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) @@ -1777,7 +1353,10 @@ def get( 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) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("ClusterMonitoringResponse", pipeline_response.http_response) @@ -1829,7 +1408,10 @@ def _delete_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) @@ -1951,7 +1533,10 @@ def get_azure_async_operation_status( 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) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("AsyncOperationResult", pipeline_response.http_response) diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/_locations_operations.py b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/_locations_operations.py index 9c92c0a982e5..6889dc5c3ad6 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/_locations_operations.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/_locations_operations.py @@ -41,7 +41,7 @@ def build_get_capabilities_request(location: str, subscription_id: str, **kwargs _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-01-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -69,7 +69,7 @@ def build_list_usages_request(location: str, subscription_id: str, **kwargs: Any _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-01-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -96,7 +96,7 @@ def build_list_billing_specs_request(location: str, subscription_id: str, **kwar _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-01-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -126,7 +126,7 @@ def build_get_azure_async_operation_status_request( # pylint: disable=name-too- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-01-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -155,7 +155,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", "2025-01-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -188,7 +188,7 @@ def build_validate_cluster_create_request_request( # pylint: disable=name-too-l _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", "2025-01-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -276,7 +276,10 @@ def get_capabilities(self, location: str, **kwargs: Any) -> _models.Capabilities 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) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("CapabilitiesResult", pipeline_response.http_response) @@ -328,7 +331,10 @@ def list_usages(self, location: str, **kwargs: Any) -> _models.UsagesListResult: 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) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("UsagesListResult", pipeline_response.http_response) @@ -380,7 +386,10 @@ def list_billing_specs(self, location: str, **kwargs: Any) -> _models.BillingRes 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) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("BillingResponseListResult", pipeline_response.http_response) @@ -437,7 +446,10 @@ def get_azure_async_operation_status( 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) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("AsyncOperationResult", pipeline_response.http_response) @@ -548,7 +560,10 @@ def check_name_availability( 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) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("NameAvailabilityCheckResult", pipeline_response.http_response) @@ -662,7 +677,10 @@ def validate_cluster_create_request( 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) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("ClusterCreateValidationResult", pipeline_response.http_response) diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/_operations.py b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/_operations.py index c47c53ab3baa..47c94867e100 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/_operations.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/_operations.py @@ -41,7 +41,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", "2025-01-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -142,7 +142,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/_patch.py b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/_patch.py index f7dd32510333..49900f6ab120 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/_patch.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/_patch.py @@ -2,6 +2,7 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ + """Customize generated code here. Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/_private_endpoint_connections_operations.py b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/_private_endpoint_connections_operations.py index 962f09061cce..b958b35267ae 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/_private_endpoint_connections_operations.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/_private_endpoint_connections_operations.py @@ -49,7 +49,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", "2025-01-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -84,7 +84,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", "2025-01-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -125,7 +125,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", "2025-01-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -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", "2025-01-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -287,7 +287,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -353,7 +356,10 @@ def _create_or_update_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) @@ -548,7 +554,10 @@ def get( 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) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("PrivateEndpointConnection", pipeline_response.http_response) @@ -600,7 +609,10 @@ def _delete_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/_private_link_resources_operations.py b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/_private_link_resources_operations.py index cb6295730777..5744e94a9149 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/_private_link_resources_operations.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/_private_link_resources_operations.py @@ -42,7 +42,7 @@ def build_list_by_cluster_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-01-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -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", "2025-01-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -165,7 +165,10 @@ def list_by_cluster( 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) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("PrivateLinkResourceListResult", pipeline_response.http_response) @@ -225,7 +228,10 @@ def get( 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) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("PrivateLinkResource", pipeline_response.http_response) diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/_script_actions_operations.py b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/_script_actions_operations.py index d3e5f32e6b3a..abc79c7804b3 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/_script_actions_operations.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/_script_actions_operations.py @@ -44,7 +44,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", "2025-01-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -76,7 +76,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", "2025-01-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -107,7 +107,7 @@ def build_get_execution_detail_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-01-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -139,7 +139,7 @@ def build_get_execution_async_operation_status_request( # pylint: disable=name- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-01-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -234,7 +234,10 @@ def delete( # pylint: disable=inconsistent-return-statements if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -317,7 +320,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -374,7 +380,10 @@ def get_execution_detail( 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) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("RuntimeScriptActionDetail", pipeline_response.http_response) @@ -434,7 +443,10 @@ def get_execution_async_operation_status( 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) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("AsyncOperationResult", pipeline_response.http_response) diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/_script_execution_history_operations.py b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/_script_execution_history_operations.py index 9c82e79ca8e3..8ec00798d550 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/_script_execution_history_operations.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/_script_execution_history_operations.py @@ -44,7 +44,7 @@ def build_list_by_cluster_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-01-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -75,7 +75,7 @@ def build_promote_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", "2025-01-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -197,7 +197,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -254,7 +257,10 @@ def promote( # pylint: disable=inconsistent-return-statements 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) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/_virtual_machines_operations.py b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/_virtual_machines_operations.py index 3ed4a6741e5d..fc4dbb0330ee 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/_virtual_machines_operations.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/_virtual_machines_operations.py @@ -47,7 +47,7 @@ def build_list_hosts_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", "2025-01-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -78,7 +78,7 @@ def build_restart_hosts_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", "2025-01-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -112,7 +112,7 @@ def build_get_async_operation_status_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-01-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -202,7 +202,10 @@ def list_hosts(self, resource_group_name: str, cluster_name: str, **kwargs: Any) 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) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("[HostInfo]", pipeline_response.http_response) @@ -265,7 +268,10 @@ def _restart_hosts_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) @@ -439,7 +445,10 @@ def get_async_operation_status( 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) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("AsyncOperationResult", pipeline_response.http_response) diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/approve_private_endpoint_connection.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/approve_private_endpoint_connection.py index 28eb4ee3dc3f..b55c29a909d7 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/approve_private_endpoint_connection.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/approve_private_endpoint_connection.py @@ -48,6 +48,6 @@ def main(): print(response) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2025-01-15-preview/examples/ApprovePrivateEndpointConnection.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/ApprovePrivateEndpointConnection.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/change_http_connectivity_disable.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/change_http_connectivity_disable.py index 23b5f788d026..fa2cacd56c71 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/change_http_connectivity_disable.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/change_http_connectivity_disable.py @@ -39,6 +39,6 @@ def main(): ).result() -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2025-01-15-preview/examples/ChangeHttpConnectivityDisable.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/ChangeHttpConnectivityDisable.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/change_http_connectivity_enable.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/change_http_connectivity_enable.py index cec9b069dc2c..c3653beb737e 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/change_http_connectivity_enable.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/change_http_connectivity_enable.py @@ -43,6 +43,6 @@ def main(): ).result() -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2025-01-15-preview/examples/ChangeHttpConnectivityEnable.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/ChangeHttpConnectivityEnable.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_application.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_application.py index 08d704fcba40..5954173473f6 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_application.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_application.py @@ -60,6 +60,6 @@ def main(): print(response) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2025-01-15-preview/examples/CreateApplication.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/CreateApplication.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_extension.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_extension.py index 343771789319..99a538f02d5a 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_extension.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_extension.py @@ -39,6 +39,6 @@ def main(): ).result() -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2025-01-15-preview/examples/CreateExtension.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/CreateExtension.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_hd_insight_cluster_with_adls_gen2_msi.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_hd_insight_cluster_with_adls_gen2_msi.py deleted file mode 100644 index ece9a98b326e..000000000000 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_hd_insight_cluster_with_adls_gen2_msi.py +++ /dev/null @@ -1,124 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# 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.hdinsight import HDInsightManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-hdinsight -# USAGE - python create_hd_insight_cluster_with_adls_gen2_msi.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 = HDInsightManagementClient( - credential=DefaultAzureCredential(), - subscription_id="subId", - ) - - response = client.clusters.begin_create( - resource_group_name="rg1", - cluster_name="cluster1", - parameters={ - "identity": { - "type": "UserAssigned", - "userAssignedIdentities": { - "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi": {} - }, - }, - "properties": { - "clusterDefinition": { - "configurations": { - "gateway": { - "restAuthCredential.isEnabled": True, - "restAuthCredential.password": "**********", - "restAuthCredential.username": "admin", - } - }, - "kind": "Hadoop", - }, - "clusterVersion": "5.1", - "computeProfile": { - "roles": [ - { - "hardwareProfile": {"vmSize": "Standard_E8_V3"}, - "minInstanceCount": 1, - "name": "headnode", - "osProfile": { - "linuxOperatingSystemProfile": {"password": "**********", "username": "sshuser"} - }, - "scriptActions": [], - "targetInstanceCount": 2, - "virtualNetworkProfile": { - "id": "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetname", - "subnet": "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetname/subnets/vnetsubnet", - }, - }, - { - "hardwareProfile": {"vmSize": "Standard_E8_V3"}, - "minInstanceCount": 1, - "name": "workernode", - "osProfile": { - "linuxOperatingSystemProfile": {"password": "**********", "username": "sshuser"} - }, - "scriptActions": [], - "targetInstanceCount": 3, - "virtualNetworkProfile": { - "id": "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetname", - "subnet": "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetname/subnets/vnetsubnet", - }, - }, - { - "hardwareProfile": {"vmSize": "Standard_E8_V3"}, - "minInstanceCount": 1, - "name": "zookeepernode", - "osProfile": { - "linuxOperatingSystemProfile": {"password": "**********", "username": "sshuser"} - }, - "scriptActions": [], - "targetInstanceCount": 3, - "virtualNetworkProfile": { - "id": "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetname", - "subnet": "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetname/subnets/vnetsubnet", - }, - }, - ] - }, - "osType": "Linux", - "storageProfile": { - "storageaccounts": [ - { - "fileSystem": "default", - "isDefault": True, - "msiResourceId": "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi", - "name": "mystorage.blob.core.windows.net", - "resourceId": "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Storage/storageAccounts/mystorage", - } - ] - }, - "tier": "Standard", - }, - "tags": {"key1": "val1"}, - }, - ).result() - print(response) - - -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2025-01-15-preview/examples/CreateHDInsightClusterWithADLSGen2Msi.json -if __name__ == "__main__": - main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_hd_insight_cluster_with_autoscale_config.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_hd_insight_cluster_with_autoscale_config.py index 99950186d332..df7fde4f515e 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_hd_insight_cluster_with_autoscale_config.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_hd_insight_cluster_with_autoscale_config.py @@ -108,7 +108,6 @@ def main(): "storageaccounts": [ { "container": "hdinsight-autoscale-tes-2019-06-18t05-49-16-591z", - "enableSecureChannel": True, "isDefault": True, "key": "storagekey", "name": "mystorage.blob.core.windows.net", @@ -122,6 +121,6 @@ def main(): print(response) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2025-01-15-preview/examples/CreateHDInsightClusterWithAutoscaleConfig.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/CreateHDInsightClusterWithAutoscaleConfig.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_hd_insight_cluster_with_availability_zones.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_hd_insight_cluster_with_availability_zones.py index c1aba6257183..354a397cb665 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_hd_insight_cluster_with_availability_zones.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_hd_insight_cluster_with_availability_zones.py @@ -123,7 +123,6 @@ def main(): "storageaccounts": [ { "container": "containername", - "enableSecureChannel": True, "isDefault": True, "key": "storage account key", "name": "mystorage", @@ -137,6 +136,6 @@ def main(): print(response) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2025-01-15-preview/examples/CreateHDInsightClusterWithAvailabilityZones.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/CreateHDInsightClusterWithAvailabilityZones.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_hd_insight_cluster_with_compute_isolation_properties.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_hd_insight_cluster_with_compute_isolation_properties.py index f63be1d20625..a27b8de7b5eb 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_hd_insight_cluster_with_compute_isolation_properties.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_hd_insight_cluster_with_compute_isolation_properties.py @@ -81,7 +81,6 @@ def main(): "storageaccounts": [ { "container": "containername", - "enableSecureChannel": True, "isDefault": True, "key": "storage account key", "name": "mystorage", @@ -94,6 +93,6 @@ def main(): print(response) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2025-01-15-preview/examples/CreateHDInsightClusterWithComputeIsolationProperties.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/CreateHDInsightClusterWithComputeIsolationProperties.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_hd_insight_cluster_with_custom_network_properties.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_hd_insight_cluster_with_custom_network_properties.py index b37494eda7d5..bd6ad8e9cae8 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_hd_insight_cluster_with_custom_network_properties.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_hd_insight_cluster_with_custom_network_properties.py @@ -83,17 +83,12 @@ def main(): }, ] }, - "networkProperties": { - "privateLink": "Enabled", - "publicIpTag": {"ipTagType": "FirstPartyUsage", "tag": "/"}, - "resourceProviderConnection": "Outbound", - }, + "networkProperties": {"privateLink": "Enabled", "resourceProviderConnection": "Outbound"}, "osType": "Linux", "storageProfile": { "storageaccounts": [ { "container": "containername", - "enableSecureChannel": True, "isDefault": True, "key": "storage account key", "name": "mystorage", @@ -106,6 +101,6 @@ def main(): print(response) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2025-01-15-preview/examples/CreateHDInsightClusterWithCustomNetworkProperties.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/CreateHDInsightClusterWithCustomNetworkProperties.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_hd_insight_cluster_with_encryption_at_host.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_hd_insight_cluster_with_encryption_at_host.py index 9009196d200d..6bd992b670f9 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_hd_insight_cluster_with_encryption_at_host.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_hd_insight_cluster_with_encryption_at_host.py @@ -81,7 +81,6 @@ def main(): "storageaccounts": [ { "container": "default8525", - "enableSecureChannel": True, "isDefault": True, "key": "storagekey", "name": "mystorage.blob.core.windows.net", @@ -95,6 +94,6 @@ def main(): print(response) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2025-01-15-preview/examples/CreateHDInsightClusterWithEncryptionAtHost.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/CreateHDInsightClusterWithEncryptionAtHost.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_hd_insight_cluster_with_encryption_in_transit.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_hd_insight_cluster_with_encryption_in_transit.py index f0d5c2ee930c..0a32a6868a01 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_hd_insight_cluster_with_encryption_in_transit.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_hd_insight_cluster_with_encryption_in_transit.py @@ -81,7 +81,6 @@ def main(): "storageaccounts": [ { "container": "default8525", - "enableSecureChannel": True, "isDefault": True, "key": "storagekey", "name": "mystorage.blob.core.windows.net", @@ -95,6 +94,6 @@ def main(): print(response) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2025-01-15-preview/examples/CreateHDInsightClusterWithEncryptionInTransit.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/CreateHDInsightClusterWithEncryptionInTransit.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_hd_insight_cluster_with_entra_user.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_hd_insight_cluster_with_entra_user.py deleted file mode 100644 index 272126ea385f..000000000000 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_hd_insight_cluster_with_entra_user.py +++ /dev/null @@ -1,104 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# 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.hdinsight import HDInsightManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-hdinsight -# USAGE - python create_hd_insight_cluster_with_entra_user.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 = HDInsightManagementClient( - credential=DefaultAzureCredential(), - subscription_id="subid", - ) - - response = client.clusters.begin_create( - resource_group_name="rg1", - cluster_name="cluster1", - parameters={ - "properties": { - "clusterDefinition": { - "configurations": { - "gateway": { - "restAuthCredential.isEnabled": False, - "restAuthEntraUsers": [ - { - "displayName": "displayName", - "objectId": "00000000-0000-0000-0000-000000000000", - "upn": "user@microsoft.com", - } - ], - } - }, - "kind": "Hadoop", - }, - "clusterVersion": "5.1", - "computeProfile": { - "roles": [ - { - "hardwareProfile": {"vmSize": "Standard_E8_V3"}, - "name": "headnode", - "osProfile": { - "linuxOperatingSystemProfile": {"password": "**********", "username": "sshuser"} - }, - "targetInstanceCount": 2, - }, - { - "hardwareProfile": {"vmSize": "Standard_E8_V3"}, - "name": "workernode", - "osProfile": { - "linuxOperatingSystemProfile": {"password": "**********", "username": "sshuser"} - }, - "targetInstanceCount": 3, - }, - { - "hardwareProfile": {"vmSize": "Standard_E8_V3"}, - "name": "zookeepernode", - "osProfile": { - "linuxOperatingSystemProfile": {"password": "**********", "username": "sshuser"} - }, - "targetInstanceCount": 3, - }, - ] - }, - "osType": "Linux", - "storageProfile": { - "storageaccounts": [ - { - "container": "containername", - "enableSecureChannel": True, - "isDefault": True, - "key": "storagekey", - "name": "mystorage.blob.core.windows.net", - } - ] - }, - "tier": "Standard", - } - }, - ).result() - print(response) - - -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2025-01-15-preview/examples/CreateHDInsightClusterWithEntraUser.json -if __name__ == "__main__": - main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_hd_insight_cluster_with_tls12.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_hd_insight_cluster_with_tls12.py index 090d04c6513f..e552e7527912 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_hd_insight_cluster_with_tls12.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_hd_insight_cluster_with_tls12.py @@ -81,7 +81,6 @@ def main(): "storageaccounts": [ { "container": "default8525", - "enableSecureChannel": True, "isDefault": True, "key": "storagekey", "name": "mystorage.blob.core.windows.net", @@ -95,6 +94,6 @@ def main(): print(response) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2025-01-15-preview/examples/CreateHDInsightClusterWithTLS12.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/CreateHDInsightClusterWithTLS12.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_hd_insight_cluster_with_wasb_msi.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_hd_insight_cluster_with_wasb_msi.py deleted file mode 100644 index e28cd5147e1b..000000000000 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_hd_insight_cluster_with_wasb_msi.py +++ /dev/null @@ -1,124 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# 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.hdinsight import HDInsightManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-hdinsight -# USAGE - python create_hd_insight_cluster_with_wasb_msi.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 = HDInsightManagementClient( - credential=DefaultAzureCredential(), - subscription_id="subId", - ) - - response = client.clusters.begin_create( - resource_group_name="rg1", - cluster_name="cluster1", - parameters={ - "identity": { - "type": "UserAssigned", - "userAssignedIdentities": { - "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi": {} - }, - }, - "properties": { - "clusterDefinition": { - "configurations": { - "gateway": { - "restAuthCredential.isEnabled": True, - "restAuthCredential.password": "**********", - "restAuthCredential.username": "admin", - } - }, - "kind": "Hadoop", - }, - "clusterVersion": "5.1", - "computeProfile": { - "roles": [ - { - "hardwareProfile": {"vmSize": "Standard_E8_V3"}, - "minInstanceCount": 1, - "name": "headnode", - "osProfile": { - "linuxOperatingSystemProfile": {"password": "**********", "username": "sshuser"} - }, - "scriptActions": [], - "targetInstanceCount": 2, - "virtualNetworkProfile": { - "id": "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetname", - "subnet": "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetname/subnets/vnetsubnet", - }, - }, - { - "hardwareProfile": {"vmSize": "Standard_E8_V3"}, - "minInstanceCount": 1, - "name": "workernode", - "osProfile": { - "linuxOperatingSystemProfile": {"password": "**********", "username": "sshuser"} - }, - "scriptActions": [], - "targetInstanceCount": 3, - "virtualNetworkProfile": { - "id": "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetname", - "subnet": "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetname/subnets/vnetsubnet", - }, - }, - { - "hardwareProfile": {"vmSize": "Standard_E8_V3"}, - "minInstanceCount": 1, - "name": "zookeepernode", - "osProfile": { - "linuxOperatingSystemProfile": {"password": "**********", "username": "sshuser"} - }, - "scriptActions": [], - "targetInstanceCount": 3, - "virtualNetworkProfile": { - "id": "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetname", - "subnet": "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetname/subnets/vnetsubnet", - }, - }, - ] - }, - "osType": "Linux", - "storageProfile": { - "storageaccounts": [ - { - "container": "containername", - "isDefault": True, - "msiResourceId": "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi", - "name": "mystorage.blob.core.windows.net", - "resourceId": "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Storage/storageAccounts/mystorage", - } - ] - }, - "tier": "Standard", - }, - "tags": {"key1": "val1"}, - }, - ).result() - print(response) - - -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2025-01-15-preview/examples/CreateHDInsightClusterWithWasbMsi.json -if __name__ == "__main__": - main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_kafka_cluster_with_kafka_rest_proxy.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_kafka_cluster_with_kafka_rest_proxy.py index ffa851bdbb69..40f63a483419 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_kafka_cluster_with_kafka_rest_proxy.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_kafka_cluster_with_kafka_rest_proxy.py @@ -96,7 +96,6 @@ def main(): "storageaccounts": [ { "container": "containername", - "enableSecureChannel": True, "isDefault": True, "key": "storagekey", "name": "mystorage.blob.core.windows.net", @@ -110,6 +109,6 @@ def main(): print(response) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2025-01-15-preview/examples/CreateKafkaClusterWithKafkaRestProxy.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/CreateKafkaClusterWithKafkaRestProxy.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_linux_hadoop_adls_gen2.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_linux_hadoop_adls_gen2.py index 80dec654863b..beaddd3a108e 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_linux_hadoop_adls_gen2.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_linux_hadoop_adls_gen2.py @@ -82,7 +82,6 @@ def main(): "storageProfile": { "storageaccounts": [ { - "enableSecureChannel": True, "fileSystem": "default", "isDefault": True, "key": "storagekey", @@ -98,6 +97,6 @@ def main(): print(response) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2025-01-15-preview/examples/CreateLinuxHadoopAdlsGen2.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/CreateLinuxHadoopAdlsGen2.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_linux_hadoop_secure_hadoop.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_linux_hadoop_secure_hadoop.py index fb83cff5a56e..d5b2f7d652c5 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_linux_hadoop_secure_hadoop.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_linux_hadoop_secure_hadoop.py @@ -119,7 +119,6 @@ def main(): "storageaccounts": [ { "container": "containername", - "enableSecureChannel": True, "isDefault": True, "key": "storage account key", "name": "mystorage.blob.core.windows.net", @@ -134,6 +133,6 @@ def main(): print(response) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2025-01-15-preview/examples/CreateLinuxHadoopSecureHadoop.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/CreateLinuxHadoopSecureHadoop.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_linux_hadoop_ssh_password.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_linux_hadoop_ssh_password.py index 6990171b1b36..91c4fbee8d63 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_linux_hadoop_ssh_password.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_linux_hadoop_ssh_password.py @@ -83,7 +83,6 @@ def main(): "storageaccounts": [ { "container": "containername", - "enableSecureChannel": True, "isDefault": True, "key": "storagekey", "name": "mystorage.blob.core.windows.net", @@ -98,6 +97,6 @@ def main(): print(response) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2025-01-15-preview/examples/CreateLinuxHadoopSshPassword.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/CreateLinuxHadoopSshPassword.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_linux_hadoop_ssh_public_key.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_linux_hadoop_ssh_public_key.py index f39cf6a7a8d6..876240cae507 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_linux_hadoop_ssh_public_key.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_linux_hadoop_ssh_public_key.py @@ -86,7 +86,6 @@ def main(): "storageaccounts": [ { "container": "containername", - "enableSecureChannel": True, "isDefault": True, "key": "storagekey", "name": "mystorage.blob.core.windows.net", @@ -101,6 +100,6 @@ def main(): print(response) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2025-01-15-preview/examples/CreateLinuxHadoopSshPublicKey.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/CreateLinuxHadoopSshPublicKey.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_linux_spark_ssh_password.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_linux_spark_ssh_password.py index d2f19926bd83..34de1fe761a0 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_linux_spark_ssh_password.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/create_linux_spark_ssh_password.py @@ -75,7 +75,6 @@ def main(): "storageaccounts": [ { "container": "containername", - "enableSecureChannel": True, "isDefault": True, "key": "storageapikey*", "name": "mystorage.blob.core.windows.net", @@ -90,6 +89,6 @@ def main(): print(response) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2025-01-15-preview/examples/CreateLinuxSparkSshPassword.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/CreateLinuxSparkSshPassword.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/delete_application.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/delete_application.py index 8b39e7cc1c87..3a196500ed16 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/delete_application.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/delete_application.py @@ -38,6 +38,6 @@ def main(): ).result() -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2025-01-15-preview/examples/DeleteApplication.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/DeleteApplication.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/delete_extension.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/delete_extension.py index 660024267727..f2dc73962b18 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/delete_extension.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/delete_extension.py @@ -38,6 +38,6 @@ def main(): ).result() -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2025-01-15-preview/examples/DeleteExtension.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/DeleteExtension.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/delete_linux_hadoop_cluster.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/delete_linux_hadoop_cluster.py index cc88130bc1ac..7158c981fccc 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/delete_linux_hadoop_cluster.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/delete_linux_hadoop_cluster.py @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2025-01-15-preview/examples/DeleteLinuxHadoopCluster.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/DeleteLinuxHadoopCluster.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/delete_private_endpoint_connection.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/delete_private_endpoint_connection.py index 2c7b1e368094..b598d5a91c5d 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/delete_private_endpoint_connection.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/delete_private_endpoint_connection.py @@ -38,6 +38,6 @@ def main(): ).result() -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2025-01-15-preview/examples/DeletePrivateEndpointConnection.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/DeletePrivateEndpointConnection.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/delete_script_action.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/delete_script_action.py index 6ef696e79716..385409d40a56 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/delete_script_action.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/delete_script_action.py @@ -38,6 +38,6 @@ def main(): ) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2025-01-15-preview/examples/DeleteScriptAction.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/DeleteScriptAction.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/hdi_clusters_update_gateway_settings_entra_user.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/disable_cluster_auto_scale.py similarity index 68% rename from sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/hdi_clusters_update_gateway_settings_entra_user.py rename to sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/disable_cluster_auto_scale.py index 8aace2807e27..4777fbd1846e 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/hdi_clusters_update_gateway_settings_entra_user.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/disable_cluster_auto_scale.py @@ -16,7 +16,7 @@ pip install azure-identity pip install azure-mgmt-hdinsight # USAGE - python hdi_clusters_update_gateway_settings_entra_user.py + python disable_cluster_auto_scale.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -31,22 +31,27 @@ def main(): subscription_id="subid", ) - client.clusters.begin_update_gateway_settings( + client.clusters.begin_update_auto_scale_configuration( resource_group_name="rg1", cluster_name="cluster1", + role_name="workernode", parameters={ - "restAuthCredential.isEnabled": False, - "restAuthEntraUsers": [ - { - "displayName": "displayName", - "objectId": "00000000-0000-0000-0000-000000000000", - "upn": "user@microsoft.com", - } - ], + "autoscale": { + "capacity": {"maxInstanceCount": 0, "minInstanceCount": 0}, + "recurrence": { + "schedule": [ + { + "days": ["str"], + "timeAndCapacity": {"maxInstanceCount": 0, "minInstanceCount": 0, "time": "str"}, + } + ], + "timeZone": "str", + }, + } }, ).result() -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2025-01-15-preview/examples/HDI_Clusters_UpdateGatewaySettings_EntraUser.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/DisableClusterAutoScale.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/disable_linux_cluster_azure_monitor.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/disable_linux_cluster_azure_monitor.py index 0d70f35f1ad8..e6e0a6c04811 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/disable_linux_cluster_azure_monitor.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/disable_linux_cluster_azure_monitor.py @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2025-01-15-preview/examples/DisableLinuxClusterAzureMonitor.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/DisableLinuxClusterAzureMonitor.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/disable_linux_cluster_azure_monitor_agent.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/disable_linux_cluster_azure_monitor_agent.py deleted file mode 100644 index 530ce03f6302..000000000000 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/disable_linux_cluster_azure_monitor_agent.py +++ /dev/null @@ -1,42 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# 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.hdinsight import HDInsightManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-hdinsight -# USAGE - python disable_linux_cluster_azure_monitor_agent.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 = HDInsightManagementClient( - credential=DefaultAzureCredential(), - subscription_id="subid", - ) - - client.extensions.begin_disable_azure_monitor_agent( - resource_group_name="rg1", - cluster_name="cluster1", - ).result() - - -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2025-01-15-preview/examples/DisableLinuxClusterAzureMonitorAgent.json -if __name__ == "__main__": - main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/disable_linux_cluster_monitoring.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/disable_linux_cluster_monitoring.py index 11881eeed1ab..9d768ac01bb3 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/disable_linux_cluster_monitoring.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/disable_linux_cluster_monitoring.py @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2025-01-15-preview/examples/DisableLinuxClusterMonitoring.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/DisableLinuxClusterMonitoring.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/enable_linux_cluster_azure_monitor.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/enable_linux_cluster_azure_monitor.py index f3648561cdde..d0bab2dd38f1 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/enable_linux_cluster_azure_monitor.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/enable_linux_cluster_azure_monitor.py @@ -38,6 +38,6 @@ def main(): ).result() -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2025-01-15-preview/examples/EnableLinuxClusterAzureMonitor.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/EnableLinuxClusterAzureMonitor.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/enable_linux_cluster_azure_monitor_agent.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/enable_linux_cluster_azure_monitor_agent.py deleted file mode 100644 index 4900a2cc40a4..000000000000 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/enable_linux_cluster_azure_monitor_agent.py +++ /dev/null @@ -1,43 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# 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.hdinsight import HDInsightManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-hdinsight -# USAGE - python enable_linux_cluster_azure_monitor_agent.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 = HDInsightManagementClient( - credential=DefaultAzureCredential(), - subscription_id="subid", - ) - - client.extensions.begin_enable_azure_monitor_agent( - resource_group_name="rg1", - cluster_name="cluster1", - parameters={"primaryKey": "**********", "workspaceId": "a2090ead-8c9f-4fba-b70e-533e3e003163"}, - ).result() - - -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2025-01-15-preview/examples/EnableLinuxClusterAzureMonitorAgent.json -if __name__ == "__main__": - main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/enable_linux_cluster_monitoring.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/enable_linux_cluster_monitoring.py index f5d509a189ed..782080754586 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/enable_linux_cluster_monitoring.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/enable_linux_cluster_monitoring.py @@ -38,6 +38,6 @@ def main(): ).result() -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2025-01-15-preview/examples/EnableLinuxClusterMonitoring.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/EnableLinuxClusterMonitoring.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/enable_or_update_auto_scale_with_load_based_configuration.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/enable_or_update_auto_scale_with_load_based_configuration.py index c378e50a1ef2..4c09864187bc 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/enable_or_update_auto_scale_with_load_based_configuration.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/enable_or_update_auto_scale_with_load_based_configuration.py @@ -39,6 +39,6 @@ def main(): ).result() -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2025-01-15-preview/examples/EnableOrUpdateAutoScaleWithLoadBasedConfiguration.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/EnableOrUpdateAutoScaleWithLoadBasedConfiguration.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/enable_or_update_auto_scale_with_schedule_based_configuration.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/enable_or_update_auto_scale_with_schedule_based_configuration.py index 81a17760bfd9..2c2c6d815266 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/enable_or_update_auto_scale_with_schedule_based_configuration.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/enable_or_update_auto_scale_with_schedule_based_configuration.py @@ -51,6 +51,6 @@ def main(): ).result() -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2025-01-15-preview/examples/EnableOrUpdateAutoScaleWithScheduleBasedConfiguration.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/EnableOrUpdateAutoScaleWithScheduleBasedConfiguration.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_all_applications.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_all_applications.py index 67ae5961e109..ca7bd406fa93 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_all_applications.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_all_applications.py @@ -39,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2025-01-15-preview/examples/GetAllApplications.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetAllApplications.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_all_private_endpoint_connections_in_cluster.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_all_private_endpoint_connections_in_cluster.py index 621d867918de..b2b226a4e4a5 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_all_private_endpoint_connections_in_cluster.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_all_private_endpoint_connections_in_cluster.py @@ -39,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2025-01-15-preview/examples/GetAllPrivateEndpointConnectionsInCluster.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetAllPrivateEndpointConnectionsInCluster.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_all_private_link_resources_in_cluster.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_all_private_link_resources_in_cluster.py index 209fdbabf546..cee9810d5a44 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_all_private_link_resources_in_cluster.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_all_private_link_resources_in_cluster.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2025-01-15-preview/examples/GetAllPrivateLinkResourcesInCluster.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetAllPrivateLinkResourcesInCluster.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_application_created.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_application_created.py index 8723586f60b0..6f35c2e731a9 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_application_created.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_application_created.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2025-01-15-preview/examples/GetApplicationCreated.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetApplicationCreated.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_application_creation_async_operation_status.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_application_creation_async_operation_status.py index d0a81d2d3617..02958c49749a 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_application_creation_async_operation_status.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_application_creation_async_operation_status.py @@ -40,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2025-01-15-preview/examples/GetApplicationCreationAsyncOperationStatus.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetApplicationCreationAsyncOperationStatus.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_application_in_progress.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_application_in_progress.py index 685359939a2a..477d33dab8de 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_application_in_progress.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_application_in_progress.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2025-01-15-preview/examples/GetApplicationInProgress.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetApplicationInProgress.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_cluster_creating_async_operation_status.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_cluster_creating_async_operation_status.py index a9c968098d6b..69938c0f8279 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_cluster_creating_async_operation_status.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_cluster_creating_async_operation_status.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2025-01-15-preview/examples/GetClusterCreatingAsyncOperationStatus.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetClusterCreatingAsyncOperationStatus.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_cluster_virtual_machines.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_cluster_virtual_machines.py index 2ce61b4e6703..9f3c2dc0c197 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_cluster_virtual_machines.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_cluster_virtual_machines.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2025-01-15-preview/examples/GetClusterVirtualMachines.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetClusterVirtualMachines.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_extension.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_extension.py index 25051fc152eb..910a8d650fd3 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_extension.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_extension.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2025-01-15-preview/examples/GetExtension.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetExtension.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_extension_creation_async_operation_status.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_extension_creation_async_operation_status.py index ff2a99c37cd0..448f5fb2aacd 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_extension_creation_async_operation_status.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_extension_creation_async_operation_status.py @@ -40,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2025-01-15-preview/examples/GetExtensionCreationAsyncOperationStatus.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetExtensionCreationAsyncOperationStatus.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_hd_insight_capabilities.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_hd_insight_capabilities.py index 23b98ced336c..68163f10663d 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_hd_insight_capabilities.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_hd_insight_capabilities.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2025-01-15-preview/examples/GetHDInsightCapabilities.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetHDInsightCapabilities.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_hd_insight_usages.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_hd_insight_usages.py index be426b08b23e..68601e4001fb 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_hd_insight_usages.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_hd_insight_usages.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2025-01-15-preview/examples/GetHDInsightUsages.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetHDInsightUsages.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_linux_cluster_azure_monitor_agent_status.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_linux_cluster_azure_monitor_agent_status.py deleted file mode 100644 index a705de0a2843..000000000000 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_linux_cluster_azure_monitor_agent_status.py +++ /dev/null @@ -1,43 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# 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.hdinsight import HDInsightManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-hdinsight -# USAGE - python get_linux_cluster_azure_monitor_agent_status.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - 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 = HDInsightManagementClient( - credential=DefaultAzureCredential(), - subscription_id="subid", - ) - - response = client.extensions.get_azure_monitor_agent_status( - resource_group_name="rg1", - cluster_name="cluster1", - ) - print(response) - - -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2025-01-15-preview/examples/GetLinuxClusterAzureMonitorAgentStatus.json -if __name__ == "__main__": - main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_linux_cluster_azure_monitor_status.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_linux_cluster_azure_monitor_status.py index 8a5d6ffd7fb2..9d8d2aaaaa13 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_linux_cluster_azure_monitor_status.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_linux_cluster_azure_monitor_status.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2025-01-15-preview/examples/GetLinuxClusterAzureMonitorStatus.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetLinuxClusterAzureMonitorStatus.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_linux_cluster_monitoring_status.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_linux_cluster_monitoring_status.py index 6cc8c1530647..0855f5f8d50b 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_linux_cluster_monitoring_status.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_linux_cluster_monitoring_status.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2025-01-15-preview/examples/GetLinuxClusterMonitoringStatus.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetLinuxClusterMonitoringStatus.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_linux_hadoop_all_clusters.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_linux_hadoop_all_clusters.py index 85c6c3bc5ec6..37b1f0757158 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_linux_hadoop_all_clusters.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_linux_hadoop_all_clusters.py @@ -36,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2025-01-15-preview/examples/GetLinuxHadoopAllClusters.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetLinuxHadoopAllClusters.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_linux_hadoop_all_clusters_in_resource_group.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_linux_hadoop_all_clusters_in_resource_group.py index 2b2f8e45a098..04ad700510af 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_linux_hadoop_all_clusters_in_resource_group.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_linux_hadoop_all_clusters_in_resource_group.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2025-01-15-preview/examples/GetLinuxHadoopAllClustersInResourceGroup.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetLinuxHadoopAllClustersInResourceGroup.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_linux_hadoop_cluster.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_linux_hadoop_cluster.py index 35e4c742cf56..ccb0c409dcf6 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_linux_hadoop_cluster.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_linux_hadoop_cluster.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2025-01-15-preview/examples/GetLinuxHadoopCluster.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetLinuxHadoopCluster.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_linux_hadoop_script_action.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_linux_hadoop_script_action.py index c675f1df6445..868779b6cd1f 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_linux_hadoop_script_action.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_linux_hadoop_script_action.py @@ -39,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2025-01-15-preview/examples/GetLinuxHadoopScriptAction.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetLinuxHadoopScriptAction.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_linux_spark_cluster.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_linux_spark_cluster.py index 562f8e5c4f4c..bc3aca2d2dcd 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_linux_spark_cluster.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_linux_spark_cluster.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2025-01-15-preview/examples/GetLinuxSparkCluster.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetLinuxSparkCluster.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_private_endpoint_connection.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_private_endpoint_connection.py index 13ca6d680662..359d4d0bb47a 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_private_endpoint_connection.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_private_endpoint_connection.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2025-01-15-preview/examples/GetPrivateEndpointConnection.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetPrivateEndpointConnection.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_private_link_resource.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_private_link_resource.py index 5a1b1320dbcd..7a75d426acbc 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_private_link_resource.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_private_link_resource.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2025-01-15-preview/examples/GetPrivateLinkResource.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetPrivateLinkResource.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_restart_hosts_async_operation_status.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_restart_hosts_async_operation_status.py index 41449fba76fe..9740cfcdbc52 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_restart_hosts_async_operation_status.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_restart_hosts_async_operation_status.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2025-01-15-preview/examples/GetRestartHostsAsyncOperationStatus.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetRestartHostsAsyncOperationStatus.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_script_action_by_id.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_script_action_by_id.py index 798f2a12dfe2..a9091e313783 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_script_action_by_id.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_script_action_by_id.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2025-01-15-preview/examples/GetScriptActionById.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetScriptActionById.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_script_execution_async_operation_status.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_script_execution_async_operation_status.py index 6eefe5c02ef9..22ddae0a03e2 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_script_execution_async_operation_status.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_script_execution_async_operation_status.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2025-01-15-preview/examples/GetScriptExecutionAsyncOperationStatus.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetScriptExecutionAsyncOperationStatus.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_script_execution_history.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_script_execution_history.py index 7a6dde1d8796..6f40ea2015d9 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_script_execution_history.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/get_script_execution_history.py @@ -39,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2025-01-15-preview/examples/GetScriptExecutionHistory.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetScriptExecutionHistory.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/hdi_clusters_get_gateway_settings.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/hdi_clusters_get_gateway_settings.py index d7fb74ce9c7c..3db3a54338de 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/hdi_clusters_get_gateway_settings.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/hdi_clusters_get_gateway_settings.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2025-01-15-preview/examples/HDI_Clusters_GetGatewaySettings.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/HDI_Clusters_GetGatewaySettings.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/hdi_clusters_update_cluster_identity_certificate.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/hdi_clusters_update_cluster_identity_certificate.py index 403bc543c695..c4b7ff64175c 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/hdi_clusters_update_cluster_identity_certificate.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/hdi_clusters_update_cluster_identity_certificate.py @@ -42,6 +42,6 @@ def main(): ).result() -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2025-01-15-preview/examples/HDI_Clusters_UpdateClusterIdentityCertificate.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/HDI_Clusters_UpdateClusterIdentityCertificate.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/hdi_clusters_update_gateway_settings_enable.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/hdi_clusters_update_gateway_settings_enable.py index 8e596ae03cb9..4ddcce4a2650 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/hdi_clusters_update_gateway_settings_enable.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/hdi_clusters_update_gateway_settings_enable.py @@ -42,6 +42,6 @@ def main(): ).result() -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2025-01-15-preview/examples/HDI_Clusters_UpdateGatewaySettings_Enable.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/HDI_Clusters_UpdateGatewaySettings_Enable.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/hdi_configurations_get.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/hdi_configurations_get.py index e5947e8c69ea..6330418eb56b 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/hdi_configurations_get.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/hdi_configurations_get.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2025-01-15-preview/examples/HDI_Configurations_Get.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/HDI_Configurations_Get.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/hdi_configurations_list.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/hdi_configurations_list.py index d2f7fae28538..f13068491b6a 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/hdi_configurations_list.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/hdi_configurations_list.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2025-01-15-preview/examples/HDI_Configurations_List.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/HDI_Configurations_List.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/hdi_locations_check_cluster_name_availability.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/hdi_locations_check_cluster_name_availability.py index dbbd2332abda..02d06f2a0c71 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/hdi_locations_check_cluster_name_availability.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/hdi_locations_check_cluster_name_availability.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2025-01-15-preview/examples/HDI_Locations_CheckClusterNameAvailability.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/HDI_Locations_CheckClusterNameAvailability.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/hdi_locations_get_async_operation_status.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/hdi_locations_get_async_operation_status.py index 8b31a689296d..80b38f2d6bdd 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/hdi_locations_get_async_operation_status.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/hdi_locations_get_async_operation_status.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2025-01-15-preview/examples/HDI_Locations_GetAsyncOperationStatus.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/HDI_Locations_GetAsyncOperationStatus.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/hdi_locations_list_billing_specs.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/hdi_locations_list_billing_specs.py index 337a6281190d..e6b4cf2c0550 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/hdi_locations_list_billing_specs.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/hdi_locations_list_billing_specs.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2025-01-15-preview/examples/HDI_Locations_ListBillingSpecs.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/HDI_Locations_ListBillingSpecs.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/hdi_locations_validate_cluster_create_request.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/hdi_locations_validate_cluster_create_request.py index 9bf03dfc0105..0ff36d38c05b 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/hdi_locations_validate_cluster_create_request.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/hdi_locations_validate_cluster_create_request.py @@ -98,7 +98,6 @@ def main(): "storageaccounts": [ { "container": "contianername", - "enableSecureChannel": True, "isDefault": True, "key": "*******", "name": "storagename.blob.core.windows.net", @@ -116,6 +115,6 @@ def main(): print(response) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2025-01-15-preview/examples/HDI_Locations_ValidateClusterCreateRequest.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/HDI_Locations_ValidateClusterCreateRequest.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/list_hd_insight_operations.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/list_hd_insight_operations.py index bd4fdfd8ffb2..7fbd00ee7fc4 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/list_hd_insight_operations.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/list_hd_insight_operations.py @@ -36,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2025-01-15-preview/examples/ListHDInsightOperations.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/ListHDInsightOperations.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/patch_linux_hadoop_cluster.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/patch_linux_hadoop_cluster.py index 04a8106559b8..255925928415 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/patch_linux_hadoop_cluster.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/patch_linux_hadoop_cluster.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2025-01-15-preview/examples/PatchLinuxHadoopCluster.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/PatchLinuxHadoopCluster.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/patch_linux_hadoop_cluster_with_system_msi.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/patch_linux_hadoop_cluster_with_system_msi.py deleted file mode 100644 index 0c3b295a4c48..000000000000 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/patch_linux_hadoop_cluster_with_system_msi.py +++ /dev/null @@ -1,44 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# 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.hdinsight import HDInsightManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-hdinsight -# USAGE - python patch_linux_hadoop_cluster_with_system_msi.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 = HDInsightManagementClient( - credential=DefaultAzureCredential(), - subscription_id="subid", - ) - - response = client.clusters.update( - resource_group_name="rg1", - cluster_name="cluster1", - parameters={"identity": {"type": "SystemAssigned"}, "tags": {"key1": "val1", "key2": "val2"}}, - ) - print(response) - - -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2025-01-15-preview/examples/PatchLinuxHadoopClusterWithSystemMSI.json -if __name__ == "__main__": - main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/post_execute_script_action.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/post_execute_script_action.py index 36abaae217a0..ae6dc5831459 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/post_execute_script_action.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/post_execute_script_action.py @@ -48,6 +48,6 @@ def main(): ).result() -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2025-01-15-preview/examples/PostExecuteScriptAction.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/PostExecuteScriptAction.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/promote_linux_hadoop_script_action.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/promote_linux_hadoop_script_action.py index 98fbc9c6f809..fb804a317e6a 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/promote_linux_hadoop_script_action.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/promote_linux_hadoop_script_action.py @@ -38,6 +38,6 @@ def main(): ) -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2025-01-15-preview/examples/PromoteLinuxHadoopScriptAction.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/PromoteLinuxHadoopScriptAction.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/resize_linux_hadoop_cluster.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/resize_linux_hadoop_cluster.py index 9721c679dd72..8df86d755c84 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/resize_linux_hadoop_cluster.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/resize_linux_hadoop_cluster.py @@ -39,6 +39,6 @@ def main(): ).result() -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2025-01-15-preview/examples/ResizeLinuxHadoopCluster.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/ResizeLinuxHadoopCluster.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/restart_virtual_machines_operation.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/restart_virtual_machines_operation.py index 0739243d7c9e..60478b430f72 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/restart_virtual_machines_operation.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/restart_virtual_machines_operation.py @@ -38,6 +38,6 @@ def main(): ).result() -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2025-01-15-preview/examples/RestartVirtualMachinesOperation.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/RestartVirtualMachinesOperation.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/rotate_linux_hadoop_cluster_disk_encryption_key.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/rotate_linux_hadoop_cluster_disk_encryption_key.py index 0ff396c8bcec..e875ddd0432f 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/rotate_linux_hadoop_cluster_disk_encryption_key.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_samples/rotate_linux_hadoop_cluster_disk_encryption_key.py @@ -42,6 +42,6 @@ def main(): ).result() -# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2025-01-15-preview/examples/RotateLinuxHadoopClusterDiskEncryptionKey.json +# x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/RotateLinuxHadoopClusterDiskEncryptionKey.json if __name__ == "__main__": main() diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_tests/test_hd_insight_management_applications_operations.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_tests/test_hd_insight_management_applications_operations.py index 0efb09a9a0d6..006db3ad6441 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_tests/test_hd_insight_management_applications_operations.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_tests/test_hd_insight_management_applications_operations.py @@ -24,7 +24,7 @@ def test_applications_list_by_cluster(self, resource_group): response = self.client.applications.list_by_cluster( resource_group_name=resource_group.name, cluster_name="str", - api_version="2025-01-15-preview", + api_version="2021-06-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -37,7 +37,7 @@ def test_applications_get(self, resource_group): resource_group_name=resource_group.name, cluster_name="str", application_name="str", - api_version="2025-01-15-preview", + api_version="2021-06-01", ) # please add some check logic here by yourself @@ -152,7 +152,7 @@ def test_applications_begin_create(self, resource_group): "tags": {"str": "str"}, "type": "str", }, - api_version="2025-01-15-preview", + api_version="2021-06-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -165,7 +165,7 @@ def test_applications_begin_delete(self, resource_group): resource_group_name=resource_group.name, cluster_name="str", application_name="str", - api_version="2025-01-15-preview", + api_version="2021-06-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -179,7 +179,7 @@ def test_applications_get_azure_async_operation_status(self, resource_group): cluster_name="str", application_name="str", operation_id="str", - api_version="2025-01-15-preview", + api_version="2021-06-01", ) # please add some check logic here by yourself diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_tests/test_hd_insight_management_applications_operations_async.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_tests/test_hd_insight_management_applications_operations_async.py index 5654a1209991..e792458ab1d4 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_tests/test_hd_insight_management_applications_operations_async.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_tests/test_hd_insight_management_applications_operations_async.py @@ -25,7 +25,7 @@ async def test_applications_list_by_cluster(self, resource_group): response = self.client.applications.list_by_cluster( resource_group_name=resource_group.name, cluster_name="str", - api_version="2025-01-15-preview", + api_version="2021-06-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -38,7 +38,7 @@ async def test_applications_get(self, resource_group): resource_group_name=resource_group.name, cluster_name="str", application_name="str", - api_version="2025-01-15-preview", + api_version="2021-06-01", ) # please add some check logic here by yourself @@ -168,7 +168,7 @@ async def test_applications_begin_create(self, resource_group): "tags": {"str": "str"}, "type": "str", }, - api_version="2025-01-15-preview", + api_version="2021-06-01", ) ).result() # call '.result()' to poll until service return final result @@ -183,7 +183,7 @@ async def test_applications_begin_delete(self, resource_group): resource_group_name=resource_group.name, cluster_name="str", application_name="str", - api_version="2025-01-15-preview", + api_version="2021-06-01", ) ).result() # call '.result()' to poll until service return final result @@ -198,7 +198,7 @@ async def test_applications_get_azure_async_operation_status(self, resource_grou cluster_name="str", application_name="str", operation_id="str", - api_version="2025-01-15-preview", + api_version="2021-06-01", ) # please add some check logic here by yourself diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_tests/test_hd_insight_management_clusters_operations.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_tests/test_hd_insight_management_clusters_operations.py index 1380675f48be..18d2fc16af14 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_tests/test_hd_insight_management_clusters_operations.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_tests/test_hd_insight_management_clusters_operations.py @@ -93,12 +93,7 @@ def test_clusters_begin_create(self, resource_group): "configurationOverride": {"str": "str"}, }, "minSupportedTlsVersion": "str", - "networkProperties": { - "outboundDependenciesManagedType": "str", - "privateLink": "str", - "publicIpTag": {"ipTagType": "str", "tag": "str"}, - "resourceProviderConnection": "str", - }, + "networkProperties": {"privateLink": "str", "resourceProviderConnection": "str"}, "osType": "str", "privateLinkConfigurations": [ { @@ -136,7 +131,6 @@ def test_clusters_begin_create(self, resource_group): "storageaccounts": [ { "container": "str", - "enableSecureChannel": bool, "fileSystem": "str", "fileshare": "str", "isDefault": bool, @@ -153,7 +147,7 @@ def test_clusters_begin_create(self, resource_group): "tags": {"str": "str"}, "zones": ["str"], }, - api_version="2025-01-15-preview", + api_version="2021-06-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -165,16 +159,8 @@ def test_clusters_update(self, resource_group): response = self.client.clusters.update( resource_group_name=resource_group.name, cluster_name="str", - parameters={ - "identity": { - "principalId": "str", - "tenantId": "str", - "type": "str", - "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str", "tenantId": "str"}}, - }, - "tags": {"str": "str"}, - }, - api_version="2025-01-15-preview", + parameters={"tags": {"str": "str"}}, + api_version="2021-06-01", ) # please add some check logic here by yourself @@ -186,7 +172,7 @@ def test_clusters_begin_delete(self, resource_group): response = self.client.clusters.begin_delete( resource_group_name=resource_group.name, cluster_name="str", - api_version="2025-01-15-preview", + api_version="2021-06-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -198,7 +184,7 @@ def test_clusters_get(self, resource_group): response = self.client.clusters.get( resource_group_name=resource_group.name, cluster_name="str", - api_version="2025-01-15-preview", + api_version="2021-06-01", ) # please add some check logic here by yourself @@ -209,7 +195,7 @@ def test_clusters_get(self, resource_group): def test_clusters_list_by_resource_group(self, resource_group): response = self.client.clusters.list_by_resource_group( resource_group_name=resource_group.name, - api_version="2025-01-15-preview", + api_version="2021-06-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -223,7 +209,7 @@ def test_clusters_begin_resize(self, resource_group): cluster_name="str", role_name="str", parameters={"targetInstanceCount": 0}, - api_version="2025-01-15-preview", + api_version="2021-06-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -250,7 +236,7 @@ def test_clusters_begin_update_auto_scale_configuration(self, resource_group): }, } }, - api_version="2025-01-15-preview", + api_version="2021-06-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -260,7 +246,7 @@ def test_clusters_begin_update_auto_scale_configuration(self, resource_group): @recorded_by_proxy def test_clusters_list(self, resource_group): response = self.client.clusters.list( - api_version="2025-01-15-preview", + api_version="2021-06-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -273,7 +259,7 @@ def test_clusters_begin_rotate_disk_encryption_key(self, resource_group): resource_group_name=resource_group.name, cluster_name="str", parameters={"keyName": "str", "keyVersion": "str", "vaultUri": "str"}, - api_version="2025-01-15-preview", + api_version="2021-06-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -285,7 +271,7 @@ def test_clusters_get_gateway_settings(self, resource_group): response = self.client.clusters.get_gateway_settings( resource_group_name=resource_group.name, cluster_name="str", - api_version="2025-01-15-preview", + api_version="2021-06-01", ) # please add some check logic here by yourself @@ -301,9 +287,8 @@ def test_clusters_begin_update_gateway_settings(self, resource_group): "restAuthCredential.isEnabled": True, "restAuthCredential.password": "str", "restAuthCredential.username": "str", - "restAuthEntraUsers": [{"displayName": "str", "objectId": "str", "upn": "str"}], }, - api_version="2025-01-15-preview", + api_version="2021-06-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -316,7 +301,7 @@ def test_clusters_get_azure_async_operation_status(self, resource_group): resource_group_name=resource_group.name, cluster_name="str", operation_id="str", - api_version="2025-01-15-preview", + api_version="2021-06-01", ) # please add some check logic here by yourself @@ -329,7 +314,7 @@ def test_clusters_begin_update_identity_certificate(self, resource_group): resource_group_name=resource_group.name, cluster_name="str", parameters={"applicationId": "str", "certificate": "str", "certificatePassword": "str"}, - api_version="2025-01-15-preview", + api_version="2021-06-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -347,7 +332,7 @@ def test_clusters_begin_execute_script_actions(self, resource_group): {"name": "str", "roles": ["str"], "uri": "str", "applicationName": "str", "parameters": "str"} ], }, - api_version="2025-01-15-preview", + api_version="2021-06-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_tests/test_hd_insight_management_clusters_operations_async.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_tests/test_hd_insight_management_clusters_operations_async.py index 82b8c8341830..a637551e00c0 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_tests/test_hd_insight_management_clusters_operations_async.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_tests/test_hd_insight_management_clusters_operations_async.py @@ -97,12 +97,7 @@ async def test_clusters_begin_create(self, resource_group): "configurationOverride": {"str": "str"}, }, "minSupportedTlsVersion": "str", - "networkProperties": { - "outboundDependenciesManagedType": "str", - "privateLink": "str", - "publicIpTag": {"ipTagType": "str", "tag": "str"}, - "resourceProviderConnection": "str", - }, + "networkProperties": {"privateLink": "str", "resourceProviderConnection": "str"}, "osType": "str", "privateLinkConfigurations": [ { @@ -140,7 +135,6 @@ async def test_clusters_begin_create(self, resource_group): "storageaccounts": [ { "container": "str", - "enableSecureChannel": bool, "fileSystem": "str", "fileshare": "str", "isDefault": bool, @@ -157,7 +151,7 @@ async def test_clusters_begin_create(self, resource_group): "tags": {"str": "str"}, "zones": ["str"], }, - api_version="2025-01-15-preview", + api_version="2021-06-01", ) ).result() # call '.result()' to poll until service return final result @@ -170,16 +164,8 @@ async def test_clusters_update(self, resource_group): response = await self.client.clusters.update( resource_group_name=resource_group.name, cluster_name="str", - parameters={ - "identity": { - "principalId": "str", - "tenantId": "str", - "type": "str", - "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str", "tenantId": "str"}}, - }, - "tags": {"str": "str"}, - }, - api_version="2025-01-15-preview", + parameters={"tags": {"str": "str"}}, + api_version="2021-06-01", ) # please add some check logic here by yourself @@ -192,7 +178,7 @@ async def test_clusters_begin_delete(self, resource_group): await self.client.clusters.begin_delete( resource_group_name=resource_group.name, cluster_name="str", - api_version="2025-01-15-preview", + api_version="2021-06-01", ) ).result() # call '.result()' to poll until service return final result @@ -205,7 +191,7 @@ async def test_clusters_get(self, resource_group): response = await self.client.clusters.get( resource_group_name=resource_group.name, cluster_name="str", - api_version="2025-01-15-preview", + api_version="2021-06-01", ) # please add some check logic here by yourself @@ -216,7 +202,7 @@ async def test_clusters_get(self, resource_group): async def test_clusters_list_by_resource_group(self, resource_group): response = self.client.clusters.list_by_resource_group( resource_group_name=resource_group.name, - api_version="2025-01-15-preview", + api_version="2021-06-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -231,7 +217,7 @@ async def test_clusters_begin_resize(self, resource_group): cluster_name="str", role_name="str", parameters={"targetInstanceCount": 0}, - api_version="2025-01-15-preview", + api_version="2021-06-01", ) ).result() # call '.result()' to poll until service return final result @@ -260,7 +246,7 @@ async def test_clusters_begin_update_auto_scale_configuration(self, resource_gro }, } }, - api_version="2025-01-15-preview", + api_version="2021-06-01", ) ).result() # call '.result()' to poll until service return final result @@ -271,7 +257,7 @@ async def test_clusters_begin_update_auto_scale_configuration(self, resource_gro @recorded_by_proxy_async async def test_clusters_list(self, resource_group): response = self.client.clusters.list( - api_version="2025-01-15-preview", + api_version="2021-06-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -285,7 +271,7 @@ async def test_clusters_begin_rotate_disk_encryption_key(self, resource_group): resource_group_name=resource_group.name, cluster_name="str", parameters={"keyName": "str", "keyVersion": "str", "vaultUri": "str"}, - api_version="2025-01-15-preview", + api_version="2021-06-01", ) ).result() # call '.result()' to poll until service return final result @@ -298,7 +284,7 @@ async def test_clusters_get_gateway_settings(self, resource_group): response = await self.client.clusters.get_gateway_settings( resource_group_name=resource_group.name, cluster_name="str", - api_version="2025-01-15-preview", + api_version="2021-06-01", ) # please add some check logic here by yourself @@ -315,9 +301,8 @@ async def test_clusters_begin_update_gateway_settings(self, resource_group): "restAuthCredential.isEnabled": True, "restAuthCredential.password": "str", "restAuthCredential.username": "str", - "restAuthEntraUsers": [{"displayName": "str", "objectId": "str", "upn": "str"}], }, - api_version="2025-01-15-preview", + api_version="2021-06-01", ) ).result() # call '.result()' to poll until service return final result @@ -331,7 +316,7 @@ async def test_clusters_get_azure_async_operation_status(self, resource_group): resource_group_name=resource_group.name, cluster_name="str", operation_id="str", - api_version="2025-01-15-preview", + api_version="2021-06-01", ) # please add some check logic here by yourself @@ -345,7 +330,7 @@ async def test_clusters_begin_update_identity_certificate(self, resource_group): resource_group_name=resource_group.name, cluster_name="str", parameters={"applicationId": "str", "certificate": "str", "certificatePassword": "str"}, - api_version="2025-01-15-preview", + api_version="2021-06-01", ) ).result() # call '.result()' to poll until service return final result @@ -365,7 +350,7 @@ async def test_clusters_begin_execute_script_actions(self, resource_group): {"name": "str", "roles": ["str"], "uri": "str", "applicationName": "str", "parameters": "str"} ], }, - api_version="2025-01-15-preview", + api_version="2021-06-01", ) ).result() # call '.result()' to poll until service return final result diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_tests/test_hd_insight_management_configurations_operations.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_tests/test_hd_insight_management_configurations_operations.py index 18a75bce75e3..7e47ba2027f2 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_tests/test_hd_insight_management_configurations_operations.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_tests/test_hd_insight_management_configurations_operations.py @@ -24,7 +24,7 @@ def test_configurations_list(self, resource_group): response = self.client.configurations.list( resource_group_name=resource_group.name, cluster_name="str", - api_version="2025-01-15-preview", + api_version="2021-06-01", ) # please add some check logic here by yourself @@ -38,7 +38,7 @@ def test_configurations_begin_update(self, resource_group): cluster_name="str", configuration_name="str", parameters={"str": "str"}, - api_version="2025-01-15-preview", + api_version="2021-06-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -51,7 +51,7 @@ def test_configurations_get(self, resource_group): resource_group_name=resource_group.name, cluster_name="str", configuration_name="str", - api_version="2025-01-15-preview", + api_version="2021-06-01", ) # please add some check logic here by yourself diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_tests/test_hd_insight_management_configurations_operations_async.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_tests/test_hd_insight_management_configurations_operations_async.py index e056aea06ebb..304e970b219d 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_tests/test_hd_insight_management_configurations_operations_async.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_tests/test_hd_insight_management_configurations_operations_async.py @@ -25,7 +25,7 @@ async def test_configurations_list(self, resource_group): response = await self.client.configurations.list( resource_group_name=resource_group.name, cluster_name="str", - api_version="2025-01-15-preview", + api_version="2021-06-01", ) # please add some check logic here by yourself @@ -40,7 +40,7 @@ async def test_configurations_begin_update(self, resource_group): cluster_name="str", configuration_name="str", parameters={"str": "str"}, - api_version="2025-01-15-preview", + api_version="2021-06-01", ) ).result() # call '.result()' to poll until service return final result @@ -54,7 +54,7 @@ async def test_configurations_get(self, resource_group): resource_group_name=resource_group.name, cluster_name="str", configuration_name="str", - api_version="2025-01-15-preview", + api_version="2021-06-01", ) # please add some check logic here by yourself diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_tests/test_hd_insight_management_extensions_operations.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_tests/test_hd_insight_management_extensions_operations.py index 74f980336bba..ff72adcb93c2 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_tests/test_hd_insight_management_extensions_operations.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_tests/test_hd_insight_management_extensions_operations.py @@ -25,7 +25,7 @@ def test_extensions_begin_enable_monitoring(self, resource_group): resource_group_name=resource_group.name, cluster_name="str", parameters={"primaryKey": "str", "workspaceId": "str"}, - api_version="2025-01-15-preview", + api_version="2021-06-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -37,7 +37,7 @@ def test_extensions_get_monitoring_status(self, resource_group): response = self.client.extensions.get_monitoring_status( resource_group_name=resource_group.name, cluster_name="str", - api_version="2025-01-15-preview", + api_version="2021-06-01", ) # please add some check logic here by yourself @@ -49,7 +49,7 @@ def test_extensions_begin_disable_monitoring(self, resource_group): response = self.client.extensions.begin_disable_monitoring( resource_group_name=resource_group.name, cluster_name="str", - api_version="2025-01-15-preview", + api_version="2021-06-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -70,7 +70,7 @@ def test_extensions_begin_enable_azure_monitor(self, resource_group): }, "workspaceId": "str", }, - api_version="2025-01-15-preview", + api_version="2021-06-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -82,7 +82,7 @@ def test_extensions_get_azure_monitor_status(self, resource_group): response = self.client.extensions.get_azure_monitor_status( resource_group_name=resource_group.name, cluster_name="str", - api_version="2025-01-15-preview", + api_version="2021-06-01", ) # please add some check logic here by yourself @@ -94,52 +94,7 @@ def test_extensions_begin_disable_azure_monitor(self, resource_group): response = self.client.extensions.begin_disable_azure_monitor( resource_group_name=resource_group.name, cluster_name="str", - api_version="2025-01-15-preview", - ).result() # call '.result()' to poll until service return final result - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_extensions_begin_enable_azure_monitor_agent(self, resource_group): - response = self.client.extensions.begin_enable_azure_monitor_agent( - resource_group_name=resource_group.name, - cluster_name="str", - parameters={ - "primaryKey": "str", - "selectedConfigurations": { - "configurationVersion": "str", - "globalConfigurations": {"str": "str"}, - "tableList": [{"name": "str"}], - }, - "workspaceId": "str", - }, - api_version="2025-01-15-preview", - ).result() # call '.result()' to poll until service return final result - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_extensions_get_azure_monitor_agent_status(self, resource_group): - response = self.client.extensions.get_azure_monitor_agent_status( - resource_group_name=resource_group.name, - cluster_name="str", - api_version="2025-01-15-preview", - ) - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_extensions_begin_disable_azure_monitor_agent(self, resource_group): - response = self.client.extensions.begin_disable_azure_monitor_agent( - resource_group_name=resource_group.name, - cluster_name="str", - api_version="2025-01-15-preview", + api_version="2021-06-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -153,7 +108,7 @@ def test_extensions_begin_create(self, resource_group): cluster_name="str", extension_name="str", parameters={"primaryKey": "str", "workspaceId": "str"}, - api_version="2025-01-15-preview", + api_version="2021-06-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -166,7 +121,7 @@ def test_extensions_get(self, resource_group): resource_group_name=resource_group.name, cluster_name="str", extension_name="str", - api_version="2025-01-15-preview", + api_version="2021-06-01", ) # please add some check logic here by yourself @@ -179,7 +134,7 @@ def test_extensions_begin_delete(self, resource_group): resource_group_name=resource_group.name, cluster_name="str", extension_name="str", - api_version="2025-01-15-preview", + api_version="2021-06-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -193,7 +148,7 @@ def test_extensions_get_azure_async_operation_status(self, resource_group): cluster_name="str", extension_name="str", operation_id="str", - api_version="2025-01-15-preview", + api_version="2021-06-01", ) # please add some check logic here by yourself diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_tests/test_hd_insight_management_extensions_operations_async.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_tests/test_hd_insight_management_extensions_operations_async.py index 80234a9ad6ed..9580f2b7f08b 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_tests/test_hd_insight_management_extensions_operations_async.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_tests/test_hd_insight_management_extensions_operations_async.py @@ -27,7 +27,7 @@ async def test_extensions_begin_enable_monitoring(self, resource_group): resource_group_name=resource_group.name, cluster_name="str", parameters={"primaryKey": "str", "workspaceId": "str"}, - api_version="2025-01-15-preview", + api_version="2021-06-01", ) ).result() # call '.result()' to poll until service return final result @@ -40,7 +40,7 @@ async def test_extensions_get_monitoring_status(self, resource_group): response = await self.client.extensions.get_monitoring_status( resource_group_name=resource_group.name, cluster_name="str", - api_version="2025-01-15-preview", + api_version="2021-06-01", ) # please add some check logic here by yourself @@ -53,7 +53,7 @@ async def test_extensions_begin_disable_monitoring(self, resource_group): await self.client.extensions.begin_disable_monitoring( resource_group_name=resource_group.name, cluster_name="str", - api_version="2025-01-15-preview", + api_version="2021-06-01", ) ).result() # call '.result()' to poll until service return final result @@ -76,7 +76,7 @@ async def test_extensions_begin_enable_azure_monitor(self, resource_group): }, "workspaceId": "str", }, - api_version="2025-01-15-preview", + api_version="2021-06-01", ) ).result() # call '.result()' to poll until service return final result @@ -89,7 +89,7 @@ async def test_extensions_get_azure_monitor_status(self, resource_group): response = await self.client.extensions.get_azure_monitor_status( resource_group_name=resource_group.name, cluster_name="str", - api_version="2025-01-15-preview", + api_version="2021-06-01", ) # please add some check logic here by yourself @@ -102,56 +102,7 @@ async def test_extensions_begin_disable_azure_monitor(self, resource_group): await self.client.extensions.begin_disable_azure_monitor( resource_group_name=resource_group.name, cluster_name="str", - api_version="2025-01-15-preview", - ) - ).result() # call '.result()' to poll until service return final result - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_extensions_begin_enable_azure_monitor_agent(self, resource_group): - response = await ( - await self.client.extensions.begin_enable_azure_monitor_agent( - resource_group_name=resource_group.name, - cluster_name="str", - parameters={ - "primaryKey": "str", - "selectedConfigurations": { - "configurationVersion": "str", - "globalConfigurations": {"str": "str"}, - "tableList": [{"name": "str"}], - }, - "workspaceId": "str", - }, - api_version="2025-01-15-preview", - ) - ).result() # call '.result()' to poll until service return final result - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_extensions_get_azure_monitor_agent_status(self, resource_group): - response = await self.client.extensions.get_azure_monitor_agent_status( - resource_group_name=resource_group.name, - cluster_name="str", - api_version="2025-01-15-preview", - ) - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_extensions_begin_disable_azure_monitor_agent(self, resource_group): - response = await ( - await self.client.extensions.begin_disable_azure_monitor_agent( - resource_group_name=resource_group.name, - cluster_name="str", - api_version="2025-01-15-preview", + api_version="2021-06-01", ) ).result() # call '.result()' to poll until service return final result @@ -167,7 +118,7 @@ async def test_extensions_begin_create(self, resource_group): cluster_name="str", extension_name="str", parameters={"primaryKey": "str", "workspaceId": "str"}, - api_version="2025-01-15-preview", + api_version="2021-06-01", ) ).result() # call '.result()' to poll until service return final result @@ -181,7 +132,7 @@ async def test_extensions_get(self, resource_group): resource_group_name=resource_group.name, cluster_name="str", extension_name="str", - api_version="2025-01-15-preview", + api_version="2021-06-01", ) # please add some check logic here by yourself @@ -195,7 +146,7 @@ async def test_extensions_begin_delete(self, resource_group): resource_group_name=resource_group.name, cluster_name="str", extension_name="str", - api_version="2025-01-15-preview", + api_version="2021-06-01", ) ).result() # call '.result()' to poll until service return final result @@ -210,7 +161,7 @@ async def test_extensions_get_azure_async_operation_status(self, resource_group) cluster_name="str", extension_name="str", operation_id="str", - api_version="2025-01-15-preview", + api_version="2021-06-01", ) # please add some check logic here by yourself diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_tests/test_hd_insight_management_locations_operations.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_tests/test_hd_insight_management_locations_operations.py index 424f8c9b8a68..b4afdc0106d1 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_tests/test_hd_insight_management_locations_operations.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_tests/test_hd_insight_management_locations_operations.py @@ -23,7 +23,7 @@ def setup_method(self, method): def test_locations_get_capabilities(self, resource_group): response = self.client.locations.get_capabilities( location="str", - api_version="2025-01-15-preview", + api_version="2021-06-01", ) # please add some check logic here by yourself @@ -34,7 +34,7 @@ def test_locations_get_capabilities(self, resource_group): def test_locations_list_usages(self, resource_group): response = self.client.locations.list_usages( location="str", - api_version="2025-01-15-preview", + api_version="2021-06-01", ) # please add some check logic here by yourself @@ -45,7 +45,7 @@ def test_locations_list_usages(self, resource_group): def test_locations_list_billing_specs(self, resource_group): response = self.client.locations.list_billing_specs( location="str", - api_version="2025-01-15-preview", + api_version="2021-06-01", ) # please add some check logic here by yourself @@ -57,7 +57,7 @@ def test_locations_get_azure_async_operation_status(self, resource_group): response = self.client.locations.get_azure_async_operation_status( location="str", operation_id="str", - api_version="2025-01-15-preview", + api_version="2021-06-01", ) # please add some check logic here by yourself @@ -69,7 +69,7 @@ def test_locations_check_name_availability(self, resource_group): response = self.client.locations.check_name_availability( location="str", parameters={"name": "str", "type": "str"}, - api_version="2025-01-15-preview", + api_version="2021-06-01", ) # please add some check logic here by yourself @@ -151,12 +151,7 @@ def test_locations_validate_cluster_create_request(self, resource_group): "configurationOverride": {"str": "str"}, }, "minSupportedTlsVersion": "str", - "networkProperties": { - "outboundDependenciesManagedType": "str", - "privateLink": "str", - "publicIpTag": {"ipTagType": "str", "tag": "str"}, - "resourceProviderConnection": "str", - }, + "networkProperties": {"privateLink": "str", "resourceProviderConnection": "str"}, "osType": "str", "privateLinkConfigurations": [ { @@ -194,7 +189,6 @@ def test_locations_validate_cluster_create_request(self, resource_group): "storageaccounts": [ { "container": "str", - "enableSecureChannel": bool, "fileSystem": "str", "fileshare": "str", "isDefault": bool, @@ -213,7 +207,7 @@ def test_locations_validate_cluster_create_request(self, resource_group): "type": "str", "zones": ["str"], }, - api_version="2025-01-15-preview", + api_version="2021-06-01", ) # please add some check logic here by yourself diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_tests/test_hd_insight_management_locations_operations_async.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_tests/test_hd_insight_management_locations_operations_async.py index d992b67b7535..0f3e4bb2cd16 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_tests/test_hd_insight_management_locations_operations_async.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_tests/test_hd_insight_management_locations_operations_async.py @@ -24,7 +24,7 @@ def setup_method(self, method): async def test_locations_get_capabilities(self, resource_group): response = await self.client.locations.get_capabilities( location="str", - api_version="2025-01-15-preview", + api_version="2021-06-01", ) # please add some check logic here by yourself @@ -35,7 +35,7 @@ async def test_locations_get_capabilities(self, resource_group): async def test_locations_list_usages(self, resource_group): response = await self.client.locations.list_usages( location="str", - api_version="2025-01-15-preview", + api_version="2021-06-01", ) # please add some check logic here by yourself @@ -46,7 +46,7 @@ async def test_locations_list_usages(self, resource_group): async def test_locations_list_billing_specs(self, resource_group): response = await self.client.locations.list_billing_specs( location="str", - api_version="2025-01-15-preview", + api_version="2021-06-01", ) # please add some check logic here by yourself @@ -58,7 +58,7 @@ async def test_locations_get_azure_async_operation_status(self, resource_group): response = await self.client.locations.get_azure_async_operation_status( location="str", operation_id="str", - api_version="2025-01-15-preview", + api_version="2021-06-01", ) # please add some check logic here by yourself @@ -70,7 +70,7 @@ async def test_locations_check_name_availability(self, resource_group): response = await self.client.locations.check_name_availability( location="str", parameters={"name": "str", "type": "str"}, - api_version="2025-01-15-preview", + api_version="2021-06-01", ) # please add some check logic here by yourself @@ -152,12 +152,7 @@ async def test_locations_validate_cluster_create_request(self, resource_group): "configurationOverride": {"str": "str"}, }, "minSupportedTlsVersion": "str", - "networkProperties": { - "outboundDependenciesManagedType": "str", - "privateLink": "str", - "publicIpTag": {"ipTagType": "str", "tag": "str"}, - "resourceProviderConnection": "str", - }, + "networkProperties": {"privateLink": "str", "resourceProviderConnection": "str"}, "osType": "str", "privateLinkConfigurations": [ { @@ -195,7 +190,6 @@ async def test_locations_validate_cluster_create_request(self, resource_group): "storageaccounts": [ { "container": "str", - "enableSecureChannel": bool, "fileSystem": "str", "fileshare": "str", "isDefault": bool, @@ -214,7 +208,7 @@ async def test_locations_validate_cluster_create_request(self, resource_group): "type": "str", "zones": ["str"], }, - api_version="2025-01-15-preview", + api_version="2021-06-01", ) # please add some check logic here by yourself diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_tests/test_hd_insight_management_operations.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_tests/test_hd_insight_management_operations.py index 2d6ce79213ba..a7b2513f5eb6 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_tests/test_hd_insight_management_operations.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_tests/test_hd_insight_management_operations.py @@ -22,7 +22,7 @@ def setup_method(self, method): @recorded_by_proxy def test_operations_list(self, resource_group): response = self.client.operations.list( - api_version="2025-01-15-preview", + api_version="2021-06-01", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_tests/test_hd_insight_management_operations_async.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_tests/test_hd_insight_management_operations_async.py index 2160b49ade27..58c5208690cd 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_tests/test_hd_insight_management_operations_async.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_tests/test_hd_insight_management_operations_async.py @@ -23,7 +23,7 @@ def setup_method(self, method): @recorded_by_proxy_async async def test_operations_list(self, resource_group): response = self.client.operations.list( - api_version="2025-01-15-preview", + api_version="2021-06-01", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_tests/test_hd_insight_management_private_endpoint_connections_operations.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_tests/test_hd_insight_management_private_endpoint_connections_operations.py index 4b528cff32ec..0c57a04e6a10 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_tests/test_hd_insight_management_private_endpoint_connections_operations.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_tests/test_hd_insight_management_private_endpoint_connections_operations.py @@ -24,7 +24,7 @@ def test_private_endpoint_connections_list_by_cluster(self, resource_group): response = self.client.private_endpoint_connections.list_by_cluster( resource_group_name=resource_group.name, cluster_name="str", - api_version="2025-01-15-preview", + api_version="2021-06-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -54,7 +54,7 @@ def test_private_endpoint_connections_begin_create_or_update(self, resource_grou }, "type": "str", }, - api_version="2025-01-15-preview", + api_version="2021-06-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -67,7 +67,7 @@ def test_private_endpoint_connections_get(self, resource_group): resource_group_name=resource_group.name, cluster_name="str", private_endpoint_connection_name="str", - api_version="2025-01-15-preview", + api_version="2021-06-01", ) # please add some check logic here by yourself @@ -80,7 +80,7 @@ def test_private_endpoint_connections_begin_delete(self, resource_group): resource_group_name=resource_group.name, cluster_name="str", private_endpoint_connection_name="str", - api_version="2025-01-15-preview", + api_version="2021-06-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_tests/test_hd_insight_management_private_endpoint_connections_operations_async.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_tests/test_hd_insight_management_private_endpoint_connections_operations_async.py index 8f52237807c6..9cae26a6ca6e 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_tests/test_hd_insight_management_private_endpoint_connections_operations_async.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_tests/test_hd_insight_management_private_endpoint_connections_operations_async.py @@ -25,7 +25,7 @@ async def test_private_endpoint_connections_list_by_cluster(self, resource_group response = self.client.private_endpoint_connections.list_by_cluster( resource_group_name=resource_group.name, cluster_name="str", - api_version="2025-01-15-preview", + api_version="2021-06-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -60,7 +60,7 @@ async def test_private_endpoint_connections_begin_create_or_update(self, resourc }, "type": "str", }, - api_version="2025-01-15-preview", + api_version="2021-06-01", ) ).result() # call '.result()' to poll until service return final result @@ -74,7 +74,7 @@ async def test_private_endpoint_connections_get(self, resource_group): resource_group_name=resource_group.name, cluster_name="str", private_endpoint_connection_name="str", - api_version="2025-01-15-preview", + api_version="2021-06-01", ) # please add some check logic here by yourself @@ -88,7 +88,7 @@ async def test_private_endpoint_connections_begin_delete(self, resource_group): resource_group_name=resource_group.name, cluster_name="str", private_endpoint_connection_name="str", - api_version="2025-01-15-preview", + api_version="2021-06-01", ) ).result() # call '.result()' to poll until service return final result diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_tests/test_hd_insight_management_private_link_resources_operations.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_tests/test_hd_insight_management_private_link_resources_operations.py index 5ba0e4c709b6..7d2980eebd6f 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_tests/test_hd_insight_management_private_link_resources_operations.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_tests/test_hd_insight_management_private_link_resources_operations.py @@ -24,7 +24,7 @@ def test_private_link_resources_list_by_cluster(self, resource_group): response = self.client.private_link_resources.list_by_cluster( resource_group_name=resource_group.name, cluster_name="str", - api_version="2025-01-15-preview", + api_version="2021-06-01", ) # please add some check logic here by yourself @@ -37,7 +37,7 @@ def test_private_link_resources_get(self, resource_group): resource_group_name=resource_group.name, cluster_name="str", private_link_resource_name="str", - api_version="2025-01-15-preview", + api_version="2021-06-01", ) # please add some check logic here by yourself diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_tests/test_hd_insight_management_private_link_resources_operations_async.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_tests/test_hd_insight_management_private_link_resources_operations_async.py index 10108c22f1bd..6757004a006f 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_tests/test_hd_insight_management_private_link_resources_operations_async.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_tests/test_hd_insight_management_private_link_resources_operations_async.py @@ -25,7 +25,7 @@ async def test_private_link_resources_list_by_cluster(self, resource_group): response = await self.client.private_link_resources.list_by_cluster( resource_group_name=resource_group.name, cluster_name="str", - api_version="2025-01-15-preview", + api_version="2021-06-01", ) # please add some check logic here by yourself @@ -38,7 +38,7 @@ async def test_private_link_resources_get(self, resource_group): resource_group_name=resource_group.name, cluster_name="str", private_link_resource_name="str", - api_version="2025-01-15-preview", + api_version="2021-06-01", ) # please add some check logic here by yourself diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_tests/test_hd_insight_management_script_actions_operations.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_tests/test_hd_insight_management_script_actions_operations.py index edff782494d2..d865f6e846b7 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_tests/test_hd_insight_management_script_actions_operations.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_tests/test_hd_insight_management_script_actions_operations.py @@ -25,7 +25,7 @@ def test_script_actions_delete(self, resource_group): resource_group_name=resource_group.name, cluster_name="str", script_name="str", - api_version="2025-01-15-preview", + api_version="2021-06-01", ) # please add some check logic here by yourself @@ -37,7 +37,7 @@ def test_script_actions_list_by_cluster(self, resource_group): response = self.client.script_actions.list_by_cluster( resource_group_name=resource_group.name, cluster_name="str", - api_version="2025-01-15-preview", + api_version="2021-06-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -50,7 +50,7 @@ def test_script_actions_get_execution_detail(self, resource_group): resource_group_name=resource_group.name, cluster_name="str", script_execution_id="str", - api_version="2025-01-15-preview", + api_version="2021-06-01", ) # please add some check logic here by yourself @@ -63,7 +63,7 @@ def test_script_actions_get_execution_async_operation_status(self, resource_grou resource_group_name=resource_group.name, cluster_name="str", operation_id="str", - api_version="2025-01-15-preview", + api_version="2021-06-01", ) # please add some check logic here by yourself diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_tests/test_hd_insight_management_script_actions_operations_async.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_tests/test_hd_insight_management_script_actions_operations_async.py index 72aa8f8c2bcd..ffd39b821d48 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_tests/test_hd_insight_management_script_actions_operations_async.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_tests/test_hd_insight_management_script_actions_operations_async.py @@ -26,7 +26,7 @@ async def test_script_actions_delete(self, resource_group): resource_group_name=resource_group.name, cluster_name="str", script_name="str", - api_version="2025-01-15-preview", + api_version="2021-06-01", ) # please add some check logic here by yourself @@ -38,7 +38,7 @@ async def test_script_actions_list_by_cluster(self, resource_group): response = self.client.script_actions.list_by_cluster( resource_group_name=resource_group.name, cluster_name="str", - api_version="2025-01-15-preview", + api_version="2021-06-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -51,7 +51,7 @@ async def test_script_actions_get_execution_detail(self, resource_group): resource_group_name=resource_group.name, cluster_name="str", script_execution_id="str", - api_version="2025-01-15-preview", + api_version="2021-06-01", ) # please add some check logic here by yourself @@ -64,7 +64,7 @@ async def test_script_actions_get_execution_async_operation_status(self, resourc resource_group_name=resource_group.name, cluster_name="str", operation_id="str", - api_version="2025-01-15-preview", + api_version="2021-06-01", ) # please add some check logic here by yourself diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_tests/test_hd_insight_management_script_execution_history_operations.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_tests/test_hd_insight_management_script_execution_history_operations.py index 4d00f38a8dfc..228015dec66f 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_tests/test_hd_insight_management_script_execution_history_operations.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_tests/test_hd_insight_management_script_execution_history_operations.py @@ -24,7 +24,7 @@ def test_script_execution_history_list_by_cluster(self, resource_group): response = self.client.script_execution_history.list_by_cluster( resource_group_name=resource_group.name, cluster_name="str", - api_version="2025-01-15-preview", + api_version="2021-06-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -37,7 +37,7 @@ def test_script_execution_history_promote(self, resource_group): resource_group_name=resource_group.name, cluster_name="str", script_execution_id="str", - api_version="2025-01-15-preview", + api_version="2021-06-01", ) # please add some check logic here by yourself diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_tests/test_hd_insight_management_script_execution_history_operations_async.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_tests/test_hd_insight_management_script_execution_history_operations_async.py index 9ec4d0a5b0a4..6b0da6aa2d7a 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_tests/test_hd_insight_management_script_execution_history_operations_async.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_tests/test_hd_insight_management_script_execution_history_operations_async.py @@ -25,7 +25,7 @@ async def test_script_execution_history_list_by_cluster(self, resource_group): response = self.client.script_execution_history.list_by_cluster( resource_group_name=resource_group.name, cluster_name="str", - api_version="2025-01-15-preview", + api_version="2021-06-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -38,7 +38,7 @@ async def test_script_execution_history_promote(self, resource_group): resource_group_name=resource_group.name, cluster_name="str", script_execution_id="str", - api_version="2025-01-15-preview", + api_version="2021-06-01", ) # please add some check logic here by yourself diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_tests/test_hd_insight_management_virtual_machines_operations.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_tests/test_hd_insight_management_virtual_machines_operations.py index 8491ec665695..8ecfeb71b26f 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_tests/test_hd_insight_management_virtual_machines_operations.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_tests/test_hd_insight_management_virtual_machines_operations.py @@ -24,7 +24,7 @@ def test_virtual_machines_list_hosts(self, resource_group): response = self.client.virtual_machines.list_hosts( resource_group_name=resource_group.name, cluster_name="str", - api_version="2025-01-15-preview", + api_version="2021-06-01", ) # please add some check logic here by yourself @@ -37,7 +37,7 @@ def test_virtual_machines_begin_restart_hosts(self, resource_group): resource_group_name=resource_group.name, cluster_name="str", hosts=["str"], - api_version="2025-01-15-preview", + api_version="2021-06-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -50,7 +50,7 @@ def test_virtual_machines_get_async_operation_status(self, resource_group): resource_group_name=resource_group.name, cluster_name="str", operation_id="str", - api_version="2025-01-15-preview", + api_version="2021-06-01", ) # please add some check logic here by yourself diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/generated_tests/test_hd_insight_management_virtual_machines_operations_async.py b/sdk/hdinsight/azure-mgmt-hdinsight/generated_tests/test_hd_insight_management_virtual_machines_operations_async.py index 1af9a3638915..bf1540b5a7f4 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/generated_tests/test_hd_insight_management_virtual_machines_operations_async.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/generated_tests/test_hd_insight_management_virtual_machines_operations_async.py @@ -25,7 +25,7 @@ async def test_virtual_machines_list_hosts(self, resource_group): response = await self.client.virtual_machines.list_hosts( resource_group_name=resource_group.name, cluster_name="str", - api_version="2025-01-15-preview", + api_version="2021-06-01", ) # please add some check logic here by yourself @@ -39,7 +39,7 @@ async def test_virtual_machines_begin_restart_hosts(self, resource_group): resource_group_name=resource_group.name, cluster_name="str", hosts=["str"], - api_version="2025-01-15-preview", + api_version="2021-06-01", ) ).result() # call '.result()' to poll until service return final result @@ -53,7 +53,7 @@ async def test_virtual_machines_get_async_operation_status(self, resource_group) resource_group_name=resource_group.name, cluster_name="str", operation_id="str", - api_version="2025-01-15-preview", + api_version="2021-06-01", ) # please add some check logic here by yourself diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/pyproject.toml b/sdk/hdinsight/azure-mgmt-hdinsight/pyproject.toml index f4212978d199..5add46524876 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/pyproject.toml +++ b/sdk/hdinsight/azure-mgmt-hdinsight/pyproject.toml @@ -13,7 +13,7 @@ authors = [ description = "Microsoft Azure Hdinsight Management Client Library for Python" license = "MIT" classifiers = [ - "Development Status :: 4 - Beta", + "Development Status :: 5 - Production/Stable", "Programming Language :: Python", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3", @@ -29,7 +29,7 @@ keywords = [ "azure sdk", ] dependencies = [ - "msrest>=0.7.1", + "isodate>=0.6.1", "azure-mgmt-core>=1.6.0", "typing-extensions>=4.6.0", ] @@ -54,8 +54,8 @@ content-type = "text/markdown" [tool.setuptools.packages.find] exclude = [ "tests*", - "samples*", "generated_tests*", + "samples*", "generated_samples*", "doc*", "azure", @@ -78,7 +78,7 @@ verifytypes = false package_name = "azure-mgmt-hdinsight" package_pprint_name = "HDInsight Management" package_doc_id = "hdinsight" -is_stable = false +is_stable = true is_arm = true sample_link = "" title = "HDInsightManagementClient"