Skip to content

Commit

Permalink
fix: Use keyword-only parameter in ManagedNetwork constructor (#2709)
Browse files Browse the repository at this point in the history
* fix: Use keyword-only parameter in ManagedNetwork constructor

* fix: Remove resource group parameter

* docs: Fix typo
  • Loading branch information
kdestin authored Oct 9, 2023
1 parent 7a74954 commit 2e63327
Showing 1 changed file with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 = \"<OUTBOUND_RULE_NAME>\"\n",
"service_resource_id = f\"/subscriptions/{subscription_id}/resourceGroups/{resource_group}/providers/Microsoft.Storage/storageAccounts/{blob_storage_account}\"\n",
Expand Down Expand Up @@ -263,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])"
]
},
Expand Down Expand Up @@ -302,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())"
]
Expand Down Expand Up @@ -648,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])"
]
},
Expand Down Expand Up @@ -820,13 +822,11 @@
},
"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",
"# 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",
"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])"
]
},
Expand Down

0 comments on commit 2e63327

Please sign in to comment.