WorkspaceConnectionsOperations Class

WorkspaceConnectionsOperations.

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
azure.ai.ml._scope_dependent_operations._ScopeDependentOperations
WorkspaceConnectionsOperations

Constructor

WorkspaceConnectionsOperations(operation_scope: OperationScope, operation_config: OperationConfig, service_client: AzureMachineLearningWorkspaces, all_operations: OperationsContainer, credentials: TokenCredential | None = None, **kwargs: Dict)

Parameters

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

Methods

create_or_update

Create or update a connection.

delete

Delete the connection.

get

Get a connection by name.

list

List all connections for a workspace.

create_or_update

Create or update a connection.

create_or_update(workspace_connection: WorkspaceConnection, *, populate_secrets: bool = False, **kwargs: Any) -> WorkspaceConnection

Parameters

Name Description
workspace_connection
Required

Definition of a Workspace Connection or one of its subclasses or object which can be translated to a connection.

Keyword-Only Parameters

Name Description
populate_secrets

If true, make a secondary API call to try filling in the workspace connections credentials. Currently only works for api key-based credentials. Defaults to False.

Returns

Type Description

Created or update connection.

delete

Delete the connection.

delete(name: str, **kwargs: Any) -> None

Parameters

Name Description
name
Required
str

Name of the connection.

Keyword-Only Parameters

Name Description
populate_secrets

If true, make a secondary API call to try filling in the workspace connections credentials. Currently only works for api key-based credentials. Defaults to False.

get

Get a connection by name.

get(name: str, *, populate_secrets: bool = False, **kwargs: Dict) -> WorkspaceConnection

Parameters

Name Description
name
Required
str

Name of the connection.

Keyword-Only Parameters

Name Description
populate_secrets

If true, make a secondary API call to try filling in the workspace connections credentials. Currently only works for api key-based credentials. Defaults to False.

Returns

Type Description

The connection with the provided name.

Exceptions

Type Description

Raised if the corresponding name and version cannot be retrieved from the service.

list

List all connections for a workspace.

list(connection_type: str | None = None, *, populate_secrets: bool = False, include_data_connections: bool = False, **kwargs: Any) -> Iterable[WorkspaceConnection]

Parameters

Name Description
connection_type
Required

Type of connection to list.

Keyword-Only Parameters

Name Description
populate_secrets

If true, make a secondary API call to try filling in the workspace connections credentials. Currently only works for api key-based credentials. Defaults to False.

include_data_connections

If true, also return data connections. Defaults to False.

Returns

Type Description

An iterator like instance of connection objects