WorkspaceOutboundRuleOperations Class

WorkspaceOutboundRuleOperations.

You should not instantiate this class directly. Instead, you should create an MLClient instance that instantiates it for you and attaches it as an attribute.

Inheritance
builtins.object
WorkspaceOutboundRuleOperations

Constructor

WorkspaceOutboundRuleOperations(operation_scope: OperationScope, service_client: AzureMachineLearningWorkspaces, all_operations: OperationsContainer, credentials: TokenCredential = None, **kwargs: Dict)

Parameters

Name Description
operation_scope
Required
service_client
Required
all_operations
Required
credentials
Default value: None

Methods

begin_create

Create a Workspace OutboundRule.

begin_remove

Remove a Workspace OutboundRule.

begin_update

Update a Workspace OutboundRule.

get

Get a workspace OutboundRule by name.

list

List Workspace OutboundRules.

begin_create

Create a Workspace OutboundRule.

begin_create(workspace_name: str, rule: OutboundRule, **kwargs: Any) -> LROPoller[OutboundRule]

Parameters

Name Description
workspace_name
Required
str

Name of the workspace.

rule
Required

OutboundRule definition (FqdnDestination, PrivateEndpointDestination, or ServiceTagDestination).

Returns

Type Description

An instance of LROPoller that returns an OutboundRule.

Examples

Create an FQDN outbound rule for a workspace with the given name, similar can be done for PrivateEndpointDestination or ServiceTagDestination.


   from azure.ai.ml.entities import FqdnDestination

   fqdn_rule = FqdnDestination(name="rulename", destination="google.com")
   rule = ml_client.workspace_outbound_rules.begin_create(workspace_name="test-ws", rule=fqdn_rule).result()

begin_remove

Remove a Workspace OutboundRule.

begin_remove(workspace_name: str, outbound_rule_name: str, **kwargs: Any) -> LROPoller[None]

Parameters

Name Description
workspace_name
Required
str

Name of the workspace.

outbound_rule_name
Required
str

Name of the outbound rule to remove.

Returns

Type Description

An Iterable of OutboundRule.

Examples

Remove the outbound rule for a workspace with the given name.


   ml_client.workspace_outbound_rules.begin_remove(workspace_name="test-ws", outbound_rule_name="rulename")

begin_update

Update a Workspace OutboundRule.

begin_update(workspace_name: str, rule: OutboundRule, **kwargs: Any) -> LROPoller[OutboundRule]

Parameters

Name Description
workspace_name
Required
str

Name of the workspace.

rule
Required

OutboundRule definition (FqdnDestination, PrivateEndpointDestination, or ServiceTagDestination).

Returns

Type Description

An instance of LROPoller that returns an OutboundRule.

Examples

Update an FQDN outbound rule for a workspace with the given name, similar can be done for PrivateEndpointDestination or ServiceTagDestination.


   from azure.ai.ml.entities import FqdnDestination

   fqdn_rule = FqdnDestination(name="rulename", destination="linkedin.com")
   rule = ml_client.workspace_outbound_rules.begin_update(workspace_name="test-ws", rule=fqdn_rule).result()

get

Get a workspace OutboundRule by name.

get(workspace_name: str, outbound_rule_name: str, **kwargs: Any) -> OutboundRule

Parameters

Name Description
workspace_name
Required
str

Name of the workspace.

outbound_rule_name
Required
str

Name of the outbound rule.

Returns

Type Description

The OutboundRule with the provided name for the workspace.

Examples

Get the outbound rule for a workspace with the given name.


   rule = ml_client.workspace_outbound_rules.get(workspace_name="test-ws", outbound_rule_name="sample-rule")

list

List Workspace OutboundRules.

list(workspace_name: str, **kwargs: Any) -> Iterable[OutboundRule]

Parameters

Name Description
workspace_name
Required
str

Name of the workspace.

Returns

Type Description

An Iterable of OutboundRule.

Examples

List the outbound rule for a workspace with the given name.


   rules = ml_client.workspace_outbound_rules.list(workspace_name="test-ws")