Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Joharrington/Workspace Managed Network #28879

Merged
merged 6 commits into from
Feb 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,15 @@
"metadata": {
"description": "ARM identifier of primary user assigned managed identity, in case multiple ones are specified. Also the default managed identity for clusterless compute."
}
},
"managedNetwork": {
"type": "object",
"defaultValue": {
"isolationMode": "Disabled"
},
"metadata": {
"description": "Managed network settings to be used for the workspace. If not specified, isolation mode Disabled is the default"
}
}
},
"variables": {
Expand Down Expand Up @@ -543,7 +552,7 @@
{
"condition": "[variables('enablePE')]",
"type": "Microsoft.MachineLearningServices/workspaces",
"apiVersion": "2022-01-01-preview",
"apiVersion": "2022-12-01-preview",
"tags": "[parameters('tagValues')]",
"name": "[parameters('workspaceName')]",
"location": "[parameters('location')]",
Expand Down Expand Up @@ -576,7 +585,8 @@
"storageAccountArmId": "[parameters('encryption_storage_resourceid')]",
"SearchAccountArmId": "[parameters('encryption_search_resourceid')]"
},
"primaryUserAssignedIdentity": "[parameters('primaryUserAssignedIdentity')]"
"primaryUserAssignedIdentity": "[parameters('primaryUserAssignedIdentity')]",
"managedNetwork": "[parameters('managedNetwork')]"
}
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,5 +115,8 @@
},
"primaryUserAssignedIdentity": {
"value": ""
},
"managedNetwork": {
"value": {}
}
}
19 changes: 18 additions & 1 deletion sdk/ml/azure-ai-ml/azure/ai/ml/_ml_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@
VirtualClusterOperations,
WorkspaceConnectionsOperations,
WorkspaceOperations,
WorkspaceOutboundRuleOperations,
)
from azure.ai.ml.operations._code_operations import CodeOperations
from azure.ai.ml.operations._local_deployment_helper import _LocalDeploymentHelper
Expand Down Expand Up @@ -223,7 +224,7 @@ def __init__(
**kwargs,
)

self._rp_service_client = ServiceClient102022Preview(
self._rp_service_client = ServiceClient122022Preview(
subscription_id=self._operation_scope._subscription_id,
credential=self._credential,
base_url=base_url,
Expand Down Expand Up @@ -296,6 +297,14 @@ def __init__(
**app_insights_handler_kwargs,
)

self._workspace_outbound_rule = WorkspaceOutboundRuleOperations(
self._operation_scope,
self._rp_service_client,
self._operation_container,
self._credential,
**kwargs,
)

# TODO make sure that at least one reviewer who understands operation initialization details reviews this
self._registries = RegistryOperations(
self._operation_scope,
Expand Down Expand Up @@ -553,6 +562,14 @@ def workspaces(self) -> WorkspaceOperations:
"""
return self._workspaces

@property
def workspace_outbound_rule(self) -> WorkspaceOutboundRuleOperations:
"""A collection of workspace managed network outbound rule related operations.
:return: Workspace Outbound Rule operations
:rtype: WorkspaceOutboundRuleOperations
"""
return self._workspace_outbound_rule

@property
@experimental
def registries(self) -> RegistryOperations:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

from . import models
from ._configuration import AzureMachineLearningWorkspacesConfiguration
from .operations import BatchDeploymentsOperations, BatchEndpointsOperations, CodeContainersOperations, CodeVersionsOperations, ComponentContainersOperations, ComponentVersionsOperations, ComputeOperations, DataContainersOperations, DataVersionsOperations, DatastoresOperations, EnvironmentContainersOperations, EnvironmentVersionsOperations, JobsOperations, LabelingJobsOperations, ModelContainersOperations, ModelVersionsOperations, OnlineDeploymentsOperations, OnlineEndpointsOperations, Operations, PrivateEndpointConnectionsOperations, PrivateLinkResourcesOperations, QuotasOperations, RegistriesOperations, RegistryCodeContainersOperations, RegistryCodeVersionsOperations, RegistryComponentContainersOperations, RegistryComponentVersionsOperations, RegistryEnvironmentContainersOperations, RegistryEnvironmentVersionsOperations, RegistryModelContainersOperations, RegistryModelVersionsOperations, SchedulesOperations, UsagesOperations, VirtualMachineSizesOperations, WorkspaceConnectionsOperations, WorkspaceFeaturesOperations, WorkspacesOperations
from .operations import BatchDeploymentsOperations, BatchEndpointsOperations, CodeContainersOperations, CodeVersionsOperations, ComponentContainersOperations, ComponentVersionsOperations, ComputeOperations, DataContainersOperations, DataVersionsOperations, DatastoresOperations, EnvironmentContainersOperations, EnvironmentVersionsOperations, JobsOperations, LabelingJobsOperations, ManagedNetworkSettingsOperations, ManagedNetworkSettingsRuleOperations, ModelContainersOperations, ModelVersionsOperations, OnlineDeploymentsOperations, OnlineEndpointsOperations, Operations, PrivateEndpointConnectionsOperations, PrivateLinkResourcesOperations, QuotasOperations, RegistriesOperations, RegistryCodeContainersOperations, RegistryCodeVersionsOperations, RegistryComponentContainersOperations, RegistryComponentVersionsOperations, RegistryEnvironmentContainersOperations, RegistryEnvironmentVersionsOperations, RegistryModelContainersOperations, RegistryModelVersionsOperations, SchedulesOperations, UsagesOperations, VirtualMachineSizesOperations, WorkspaceConnectionsOperations, WorkspaceFeaturesOperations, WorkspacesOperations

if TYPE_CHECKING:
# pylint: disable=unused-import,ungrouped-imports
Expand Down Expand Up @@ -49,6 +49,12 @@ class AzureMachineLearningWorkspaces(object): # pylint: disable=too-many-inst
:ivar workspace_connections: WorkspaceConnectionsOperations operations
:vartype workspace_connections:
azure.mgmt.machinelearningservices.operations.WorkspaceConnectionsOperations
:ivar managed_network_settings: ManagedNetworkSettingsOperations operations
:vartype managed_network_settings:
azure.mgmt.machinelearningservices.operations.ManagedNetworkSettingsOperations
:ivar managed_network_settings_rule: ManagedNetworkSettingsRuleOperations operations
:vartype managed_network_settings_rule:
azure.mgmt.machinelearningservices.operations.ManagedNetworkSettingsRuleOperations
:ivar registries: RegistriesOperations operations
:vartype registries: azure.mgmt.machinelearningservices.operations.RegistriesOperations
:ivar workspace_features: WorkspaceFeaturesOperations operations
Expand Down Expand Up @@ -162,6 +168,8 @@ def __init__(
self.private_endpoint_connections = PrivateEndpointConnectionsOperations(self._client, self._config, self._serialize, self._deserialize)
self.private_link_resources = PrivateLinkResourcesOperations(self._client, self._config, self._serialize, self._deserialize)
self.workspace_connections = WorkspaceConnectionsOperations(self._client, self._config, self._serialize, self._deserialize)
self.managed_network_settings = ManagedNetworkSettingsOperations(self._client, self._config, self._serialize, self._deserialize)
self.managed_network_settings_rule = ManagedNetworkSettingsRuleOperations(self._client, self._config, self._serialize, self._deserialize)
self.registries = RegistriesOperations(self._client, self._config, self._serialize, self._deserialize)
self.workspace_features = WorkspaceFeaturesOperations(self._client, self._config, self._serialize, self._deserialize)
self.registry_code_containers = RegistryCodeContainersOperations(self._client, self._config, self._serialize, self._deserialize)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

from .. import models
from ._configuration import AzureMachineLearningWorkspacesConfiguration
from .operations import BatchDeploymentsOperations, BatchEndpointsOperations, CodeContainersOperations, CodeVersionsOperations, ComponentContainersOperations, ComponentVersionsOperations, ComputeOperations, DataContainersOperations, DataVersionsOperations, DatastoresOperations, EnvironmentContainersOperations, EnvironmentVersionsOperations, JobsOperations, LabelingJobsOperations, ModelContainersOperations, ModelVersionsOperations, OnlineDeploymentsOperations, OnlineEndpointsOperations, Operations, PrivateEndpointConnectionsOperations, PrivateLinkResourcesOperations, QuotasOperations, RegistriesOperations, RegistryCodeContainersOperations, RegistryCodeVersionsOperations, RegistryComponentContainersOperations, RegistryComponentVersionsOperations, RegistryEnvironmentContainersOperations, RegistryEnvironmentVersionsOperations, RegistryModelContainersOperations, RegistryModelVersionsOperations, SchedulesOperations, UsagesOperations, VirtualMachineSizesOperations, WorkspaceConnectionsOperations, WorkspaceFeaturesOperations, WorkspacesOperations
from .operations import BatchDeploymentsOperations, BatchEndpointsOperations, CodeContainersOperations, CodeVersionsOperations, ComponentContainersOperations, ComponentVersionsOperations, ComputeOperations, DataContainersOperations, DataVersionsOperations, DatastoresOperations, EnvironmentContainersOperations, EnvironmentVersionsOperations, JobsOperations, LabelingJobsOperations, ManagedNetworkSettingsOperations, ManagedNetworkSettingsRuleOperations, ModelContainersOperations, ModelVersionsOperations, OnlineDeploymentsOperations, OnlineEndpointsOperations, Operations, PrivateEndpointConnectionsOperations, PrivateLinkResourcesOperations, QuotasOperations, RegistriesOperations, RegistryCodeContainersOperations, RegistryCodeVersionsOperations, RegistryComponentContainersOperations, RegistryComponentVersionsOperations, RegistryEnvironmentContainersOperations, RegistryEnvironmentVersionsOperations, RegistryModelContainersOperations, RegistryModelVersionsOperations, SchedulesOperations, UsagesOperations, VirtualMachineSizesOperations, WorkspaceConnectionsOperations, WorkspaceFeaturesOperations, WorkspacesOperations

if TYPE_CHECKING:
# pylint: disable=unused-import,ungrouped-imports
Expand Down Expand Up @@ -47,6 +47,12 @@ class AzureMachineLearningWorkspaces: # pylint: disable=too-many-instance-att
:ivar workspace_connections: WorkspaceConnectionsOperations operations
:vartype workspace_connections:
azure.mgmt.machinelearningservices.aio.operations.WorkspaceConnectionsOperations
:ivar managed_network_settings: ManagedNetworkSettingsOperations operations
:vartype managed_network_settings:
azure.mgmt.machinelearningservices.aio.operations.ManagedNetworkSettingsOperations
:ivar managed_network_settings_rule: ManagedNetworkSettingsRuleOperations operations
:vartype managed_network_settings_rule:
azure.mgmt.machinelearningservices.aio.operations.ManagedNetworkSettingsRuleOperations
:ivar registries: RegistriesOperations operations
:vartype registries: azure.mgmt.machinelearningservices.aio.operations.RegistriesOperations
:ivar workspace_features: WorkspaceFeaturesOperations operations
Expand Down Expand Up @@ -163,6 +169,8 @@ def __init__(
self.private_endpoint_connections = PrivateEndpointConnectionsOperations(self._client, self._config, self._serialize, self._deserialize)
self.private_link_resources = PrivateLinkResourcesOperations(self._client, self._config, self._serialize, self._deserialize)
self.workspace_connections = WorkspaceConnectionsOperations(self._client, self._config, self._serialize, self._deserialize)
self.managed_network_settings = ManagedNetworkSettingsOperations(self._client, self._config, self._serialize, self._deserialize)
self.managed_network_settings_rule = ManagedNetworkSettingsRuleOperations(self._client, self._config, self._serialize, self._deserialize)
self.registries = RegistriesOperations(self._client, self._config, self._serialize, self._deserialize)
self.workspace_features = WorkspaceFeaturesOperations(self._client, self._config, self._serialize, self._deserialize)
self.registry_code_containers = RegistryCodeContainersOperations(self._client, self._config, self._serialize, self._deserialize)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
from ._private_endpoint_connections_operations import PrivateEndpointConnectionsOperations
from ._private_link_resources_operations import PrivateLinkResourcesOperations
from ._workspace_connections_operations import WorkspaceConnectionsOperations
from ._managed_network_settings_operations import ManagedNetworkSettingsOperations
from ._managed_network_settings_rule_operations import ManagedNetworkSettingsRuleOperations
from ._registries_operations import RegistriesOperations
from ._workspace_features_operations import WorkspaceFeaturesOperations
from ._registry_code_containers_operations import RegistryCodeContainersOperations
Expand Down Expand Up @@ -54,6 +56,8 @@
'PrivateEndpointConnectionsOperations',
'PrivateLinkResourcesOperations',
'WorkspaceConnectionsOperations',
'ManagedNetworkSettingsOperations',
'ManagedNetworkSettingsRuleOperations',
'RegistriesOperations',
'WorkspaceFeaturesOperations',
'RegistryCodeContainersOperations',
Expand Down
Loading