/
azure.ai.ml.entities.ManagedNetwork.yml
53 lines (53 loc) · 2.83 KB
/
azure.ai.ml.entities.ManagedNetwork.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
### YamlMime:PythonClass
uid: azure.ai.ml.entities.ManagedNetwork
name: ManagedNetwork
fullName: azure.ai.ml.entities.ManagedNetwork
module: azure.ai.ml.entities
inheritances:
- builtins.object
summary: "Managed Network settings for a workspace.\n\nCreating a ManagedNetwork object\
\ with one of each rule type.<!--[!code-python[Main](les\\ml_samples_workspace.py\
\ )]-->\n\n<!-- literal_block {\"ids\": [], \"classes\": [], \"names\": [], \"dupnames\"\
: [], \"backrefs\": [], \"source\": \"C:\\\\hostedtoolcache\\\\windows\\\\Python\\\
\\3.11.9\\\\x64\\\\Lib\\\\site-packages\\\\py2docfx\\\\dist_temp\\\\10\\\\azure-ai-ml-1.15.0\\\
\\samples\\\\ml_samples_workspace.py\", \"xml:space\": \"preserve\", \"force\":\
\ false, \"language\": \"python\", \"highlight_args\": {\"linenostart\": 1}, \"\
linenos\": false} -->\n\n````python\n\n from azure.ai.ml.entities import (\n \
\ Workspace,\n ManagedNetwork,\n IsolationMode,\n ServiceTagDestination,\n\
\ PrivateEndpointDestination,\n FqdnDestination,\n )\n\n # Example\
\ private endpoint outbound to a blob\n blobrule = PrivateEndpointDestination(\n\
\ name=\"blobrule\",\n service_resource_id=\"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/test-rg/providers/Microsoft.Storage/storageAccounts/storage-name\"\
,\n subresource_target=\"blob\",\n spark_enabled=False,\n )\n\n \
\ # Example service tag rule\n datafactoryrule = ServiceTagDestination(\n \
\ name=\"datafactory\", service_tag=\"DataFactory\", protocol=\"TCP\", port_ranges=\"\
80, 8080-8089\"\n )\n\n # Example FQDN rule\n pypirule = FqdnDestination(name=\"\
pypirule\", destination=\"pypi.org\")\n\n network = ManagedNetwork(\n isolation_mode=IsolationMode.ALLOW_ONLY_APPROVED_OUTBOUND,\n\
\ outbound_rules=[blobrule, datafactoryrule, pypirule],\n )\n\n # Workspace\
\ configuration\n ws = Workspace(name=\"ws-name\", location=\"eastus\", managed_network=network)\n\
\n ````"
constructor:
syntax: 'ManagedNetwork(*, isolation_mode: str = ''Disabled'', outbound_rules: List[OutboundRule]
| None = None, network_id: str | None = None, **kwargs: Any)'
parameters:
- name: isolation_mode
description: Isolation of the managed network, defaults to Disabled.
isRequired: true
types:
- <xref:str>
- name: outbound_rules
description: List of outbound rules for the managed network.
isRequired: true
types:
- <xref:typing.List>[<xref:azure.ai.ml.entities.OutboundRule>]
- name: network_id
description: Network id for the managed network, not meant to be set by user.
isRequired: true
types:
- <xref:str>
keywordOnlyParameters:
- name: isolation_mode
defaultValue: Disabled
- name: outbound_rules
isRequired: true
- name: network_id
isRequired: true