Connections - Get With Credentials
按名称获取连接及其连接凭证
POST {endpoint}/connections/{name}/getConnectionWithCredentials?api-version=v1
URI 参数
| 名称 | 在 | 必需 | 类型 | 说明 |
|---|---|---|---|---|
|
endpoint
|
path | True |
string (uri) |
Project 端点。 在格式 “https://your-ai-services-account-name.services.ai.azure.com/api/projects/_project"如果您的 Foundry Hub 只有一个 Project,或者使用 Hub 中的默认 Project。 或以 “https://your-ai-services-account-name.services.ai.azure.com/api/projects/your-project-name"如果要显式指定 Foundry Project 名称。 |
|
name
|
path | True |
string |
由用户提供的连接的友好名称。 |
|
api-version
|
query | True |
string minLength: 1 |
用于此操作的 API 版本。 |
请求头
| 名称 | 必需 | 类型 | 说明 |
|---|---|---|---|
| x-ms-client-request-id |
string (uuid) |
请求的不透明、全局唯一的客户端生成的字符串标识符。 |
响应
| 名称 | 类型 | 说明 |
|---|---|---|
| 200 OK |
请求已成功。 标头 x-ms-client-request-id: string |
|
| Other Status Codes |
意外的错误响应。 标头 x-ms-error-code: string |
安全性
OAuth2Auth
类型:
oauth2
流向:
implicit
授权 URL:
https://login.microsoftonline.com/common/oauth2/v2.0/authorize
作用域
| 名称 | 说明 |
|---|---|
| https://ai.azure.com/.default |
示例
Connections_GetWithCredentials_MaximumSet
示例请求
POST {endpoint}/connections/jqgcfdexf/getConnectionWithCredentials?api-version=v1
示例响应
{
"name": "we",
"id": "unique-id",
"type": "AzureOpenAI",
"target": "bbzo",
"isDefault": true,
"credentials": {
"type": "BaseCredentials"
},
"metadata": {
"key9765": "voknfqanbxnseqg"
}
}
定义
| 名称 | 说明 |
|---|---|
|
Api |
API Key 凭证定义 |
|
Azure. |
错误对象。 |
|
Azure. |
包含错误详细信息的响应。 |
|
Azure. |
包含有关错误的更具体信息的对象。 根据 Azure REST API 准则 - https://aka.ms/AzureRestApiGuidelines#handling-errors。 |
| Connection |
来自列表的响应和获取连接作 |
|
Connection |
连接的类型(或类别) |
|
Credential |
连接使用的凭证类型 |
|
Entra |
Entra ID 凭证定义 |
|
No |
不需要身份验证的凭据 |
| SASCredentials |
共享访问签名 (SAS) 凭据定义 |
ApiKeyCredentials
API Key 凭证定义
| 名称 | 类型 | 说明 |
|---|---|---|
| key |
string |
API 密钥 |
| type |
string:
Api |
连接使用的凭据类型 |
Azure.Core.Foundations.Error
错误对象。
| 名称 | 类型 | 说明 |
|---|---|---|
| code |
string |
服务器定义的错误代码集之一。 |
| details |
导致此报告错误的特定错误的详细信息数组。 |
|
| innererror |
包含与当前对象有关错误的更具体信息的对象。 |
|
| message |
string |
有关错误的可读的表示形式。 |
| target |
string |
错误的目标。 |
Azure.Core.Foundations.ErrorResponse
包含错误详细信息的响应。
| 名称 | 类型 | 说明 |
|---|---|---|
| error |
错误对象。 |
Azure.Core.Foundations.InnerError
包含有关错误的更具体信息的对象。 根据 Azure REST API 准则 - https://aka.ms/AzureRestApiGuidelines#handling-errors。
| 名称 | 类型 | 说明 |
|---|---|---|
| code |
string |
服务器定义的错误代码集之一。 |
| innererror |
内部错误。 |
Connection
来自列表的响应和获取连接作
| 名称 | 类型 | 说明 |
|---|---|---|
| credentials | BaseCredentials: |
连接使用的凭据 |
| id |
string |
由服务生成的连接的唯一标识符 |
| isDefault |
boolean |
是否将连接标记为其类型的默认连接 |
| metadata |
object |
连接的元数据 |
| name |
string |
由用户提供的连接的友好名称。 |
| target |
string |
要用于此服务的连接 URL |
| type |
连接的类别 |
ConnectionType
连接的类型(或类别)
| 值 | 说明 |
|---|---|
| AzureOpenAI |
Azure OpenAI 服务 |
| AzureBlob |
具有指定容器的 Azure Blob 存储 |
| AzureStorageAccount |
未指定容器的 Azure Blob 存储(由代理使用) |
| CognitiveSearch |
Azure AI 搜索 |
| CosmosDB |
科斯莫斯DB |
| ApiKey |
使用 API 密钥身份验证的通用连接 |
| AppConfig |
应用程序配置 |
| AppInsights |
Application Insights |
| CustomKeys |
自定义键 |
CredentialType
连接使用的凭证类型
| 值 | 说明 |
|---|---|
| ApiKey |
API 密钥凭证 |
| AAD |
Entra ID 凭据(以前称为 AAD) |
| SAS |
共享访问签名 (SAS) 凭据 |
| CustomKeys |
自定义凭证 |
| None |
无凭证 |
EntraIDCredentials
Entra ID 凭证定义
| 名称 | 类型 | 说明 |
|---|---|---|
| type |
string:
AAD |
连接使用的凭据类型 |
NoAuthenticationCredentials
不需要身份验证的凭据
| 名称 | 类型 | 说明 |
|---|---|---|
| type |
string:
None |
连接使用的凭据类型 |
SASCredentials
共享访问签名 (SAS) 凭据定义
| 名称 | 类型 | 说明 |
|---|---|---|
| SAS |
string |
SAS 令牌 |
| type |
string:
SAS |
连接使用的凭据类型 |