From 889050a696063337d73c30835afeff7cbc8df230 Mon Sep 17 00:00:00 2001 From: kdestin <101366538+kdestin@users.noreply.github.com> Date: Wed, 4 Oct 2023 21:09:53 -0400 Subject: [PATCH 1/3] fix: Use keyword-only parameter in ManagedNetwork constructor --- .../spark/submit_spark_standalone_jobs_managed_vnet.ipynb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sdk/python/jobs/spark/submit_spark_standalone_jobs_managed_vnet.ipynb b/sdk/python/jobs/spark/submit_spark_standalone_jobs_managed_vnet.ipynb index c43de23c26..2536316f0a 100644 --- a/sdk/python/jobs/spark/submit_spark_standalone_jobs_managed_vnet.ipynb +++ b/sdk/python/jobs/spark/submit_spark_standalone_jobs_managed_vnet.ipynb @@ -123,7 +123,9 @@ " tags=dict(purpose=\"demo\"),\n", ")\n", "\n", - "ws_mvnet.managed_network = ManagedNetwork(IsolationMode.ALLOW_INTERNET_OUTBOUND)\n", + "ws_mvnet.managed_network = ManagedNetwork(\n", + " isolation_mode=IsolationMode.ALLOW_INTERNET_OUTBOUND\n", + ")\n", "\n", "rule_name = \"\"\n", "service_resource_id = f\"/subscriptions/{subscription_id}/resourceGroups/{resource_group}/providers/Microsoft.Storage/storageAccounts/{blob_storage_account}\"\n", From 73dd49d8e4d2a20d5ae6d5780b4bf2a0cae608b1 Mon Sep 17 00:00:00 2001 From: kdestin <101366538+kdestin@users.noreply.github.com> Date: Thu, 5 Oct 2023 12:46:21 -0400 Subject: [PATCH 2/3] fix: Remove resource group parameter --- .../submit_spark_standalone_jobs_managed_vnet.ipynb | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/sdk/python/jobs/spark/submit_spark_standalone_jobs_managed_vnet.ipynb b/sdk/python/jobs/spark/submit_spark_standalone_jobs_managed_vnet.ipynb index 2536316f0a..2cad2f7b09 100644 --- a/sdk/python/jobs/spark/submit_spark_standalone_jobs_managed_vnet.ipynb +++ b/sdk/python/jobs/spark/submit_spark_standalone_jobs_managed_vnet.ipynb @@ -265,7 +265,7 @@ "outputs": [], "source": [ "# List outbound rules for a workspace\n", - "rule_list = ml_client._workspace_outbound_rules.list(resource_group, ws_name)\n", + "rule_list = ml_client._workspace_outbound_rules.list(ws_name)\n", "print([r._to_dict() for r in rule_list])" ] }, @@ -304,7 +304,7 @@ "outputs": [], "source": [ "# Get details of an outbound rule by name\n", - "rule = ml_client._workspace_outbound_rules.get(resource_group, ws_name, rule_name)\n", + "rule = ml_client._workspace_outbound_rules.get(ws_name, rule_name)\n", "print(rule)\n", "print(rule._to_dict())" ] @@ -650,7 +650,7 @@ "outputs": [], "source": [ "# List outbound rules for a workspace\n", - "rule_list = ml_client._workspace_outbound_rules.list(resource_group, ws_name)\n", + "rule_list = ml_client._workspace_outbound_rules.list(ws_name)\n", "print([r._to_dict() for r in rule_list])" ] }, @@ -823,12 +823,10 @@ "outputs": [], "source": [ "# Delete anoutbound rule from a workspace\n", - "ml_client._workspace_outbound_rules.begin_remove(\n", - " resource_group, ws_name, rule_name\n", - ").result()\n", + "ml_client._workspace_outbound_rules.begin_remove(ws_name, rule_name).result()\n", "\n", "# List outbound rules for the workspace\n", - "rule_list = ml_client._workspace_outbound_rules.list(resource_group, ws_name)\n", + "rule_list = ml_client._workspace_outbound_rules.list(ws_name)\n", "print([r._to_dict() for r in rule_list])" ] }, From 8e754545e4bb8956b58d5bfdb4b4bd91750c7739 Mon Sep 17 00:00:00 2001 From: kdestin <101366538+kdestin@users.noreply.github.com> Date: Mon, 9 Oct 2023 15:36:36 -0400 Subject: [PATCH 3/3] docs: Fix typo --- .../jobs/spark/submit_spark_standalone_jobs_managed_vnet.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/python/jobs/spark/submit_spark_standalone_jobs_managed_vnet.ipynb b/sdk/python/jobs/spark/submit_spark_standalone_jobs_managed_vnet.ipynb index 2cad2f7b09..515ea84b65 100644 --- a/sdk/python/jobs/spark/submit_spark_standalone_jobs_managed_vnet.ipynb +++ b/sdk/python/jobs/spark/submit_spark_standalone_jobs_managed_vnet.ipynb @@ -822,7 +822,7 @@ }, "outputs": [], "source": [ - "# Delete anoutbound rule from a workspace\n", + "# Delete an outbound rule from a workspace\n", "ml_client._workspace_outbound_rules.begin_remove(ws_name, rule_name).result()\n", "\n", "# List outbound rules for the workspace\n",