ConnectionsOperations Class

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through

AIProjectClient's

<xref:connections> attribute.

Constructor

ConnectionsOperations(*args, **kwargs)

Methods

get

Get a connection by name.

get_default

Get the default connection for a given connection type.

list

List connections.

Returns the connections available in the current project, optionally filtered by type or default status.

get

Get a connection by name.

get(name: str, *, include_credentials: bool | None = False, **kwargs: Any) -> Connection

Parameters

Name Description
name
Required
str

The name of the connection. Required.

Keyword-Only Parameters

Name Description
include_credentials

Whether to include credentials in the response. Default is False.

Default value: False

Returns

Type Description

Connection. The Connection is compatible with MutableMapping

Exceptions

Type Description

get_default

Get the default connection for a given connection type.

get_default(connection_type: str | ConnectionType, *, include_credentials: bool | None = False, **kwargs: Any) -> Connection

Parameters

Name Description
connection_type
Required

The type of the connection. Required.

Keyword-Only Parameters

Name Description
include_credentials

Whether to include credentials in the response. Default is False.

Default value: False

Returns

Type Description

Connection. The Connection is compatible with MutableMapping

Exceptions

Type Description

If no default connection is found for the given type.

list

List connections.

Returns the connections available in the current project, optionally filtered by type or default status.

list(*, connection_type: str | ConnectionType | None = None, default_connection: bool | None = None, **kwargs: Any) -> ItemPaged[Connection]

Keyword-Only Parameters

Name Description
connection_type

Lists connections of this specific type. Known values are: "AzureOpenAI", "AzureBlob", "AzureStorageAccount", "CognitiveSearch", "CosmosDB", "ApiKey", "AppConfig", "AppInsights", "CustomKeys", and "RemoteTool_Preview". Default value is None.

Default value: None
default_connection

Lists connections that are default connections. Default value is None.

Default value: None

Returns

Type Description

An iterator like instance of Connection

Exceptions

Type Description