AIProjectConnectionsOperations.GetConnectionAsync Method

Definition

Get a connection by name.

public virtual System.Threading.Tasks.Task<System.ClientModel.ClientResult<Azure.AI.Projects.AIProjectConnection>> GetConnectionAsync(string connectionName, bool includeCredentials = false, System.Threading.CancellationToken cancellationToken = default);
abstract member GetConnectionAsync : string * bool * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.ClientModel.ClientResult<Azure.AI.Projects.AIProjectConnection>>
override this.GetConnectionAsync : string * bool * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.ClientModel.ClientResult<Azure.AI.Projects.AIProjectConnection>>
Public Overridable Function GetConnectionAsync (connectionName As String, Optional includeCredentials As Boolean = false, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ClientResult(Of AIProjectConnection))

Parameters

connectionName
String

The name of the connection. Required.

includeCredentials
Boolean

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

cancellationToken
CancellationToken

The cancellation token that can be used to cancel the operation.

Returns

A AIProjectConnection object.

Exceptions

Thrown when the request fails.

Applies to