Workspace Connections - Create
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}?api-version=2024-10-01
URI 參數
名稱 | 位於 | 必要 | 類型 | Description |
---|---|---|---|---|
connection
|
path | True |
string pattern: ^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$ |
工作區聯機的易記名稱 |
resource
|
path | True |
string minLength: 1maxLength: 90 |
資源群組的名稱。 名稱不區分大小寫。 |
subscription
|
path | True |
string minLength: 1 |
目標訂用帳戶的標識碼。 |
workspace
|
path | True |
string pattern: ^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$ |
Azure Machine Learning 工作區的名稱。 |
api-version
|
query | True |
string minLength: 1 |
要用於這項作業的 API 版本。 |
要求本文
回應
名稱 | 類型 | Description |
---|---|---|
200 OK |
要求成功;要求格式正確,且已正確接收。 |
|
Other Status Codes |
錯誤 |
安全性
azure_auth
Azure Active Directory OAuth2 Flow。
類型:
oauth2
Flow:
implicit
授權 URL:
https://login.microsoftonline.com/common/oauth2/authorize
範圍
名稱 | Description |
---|---|
user_impersonation | 模擬您的用戶帳戶 |
範例
CreateWorkspaceConnection
範例要求
PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup-1/providers/Microsoft.MachineLearningServices/workspaces/workspace-1/connections/connection-1?api-version=2024-10-01
{
"properties": {
"category": "ContainerRegistry",
"target": "www.facebook.com",
"authType": "None"
}
}
範例回覆
{
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup-1/providers/Microsoft.MachineLearningServices/workspaces/workspace-1/connections/connection-1",
"name": "connection-1",
"type": "Microsoft.MachineLearningServices/workspaces/connections",
"properties": {
"category": "ContainerRegistry",
"target": "www.facebook.com",
"authType": "None"
}
}
定義
名稱 | Description |
---|---|
AADAuth |
此連線類型涵蓋任何適用的 Azure 服務的 AAD 驗證 |
Access |
|
Account |
此連線類型涵蓋 Azure 記憶體的帳戶金鑰連線 |
Api |
此聯機類型涵蓋一般 ApiKey 驗證聯機類別,例如:AzureOpenAI:Category:= AzureOpenAI AuthType:= ApiKey (作為類型歧視性認證:= {ApiKey} 作為 Microsoft.MachineLearning.AccountRP.Contracts.WorkspaceConnection.ApiKey Target:= {ApiBase} CognitiveService: Category:= CognitiveService AuthType:= ApiKey (類型歧視性) 認證:= {SubscriptionKey} as Microsoft.MachineLearning.AccountRP.Contracts.WorkspaceConnection.ApiKey Target:= ServiceRegion={serviceRegion} CognitiveSearch: Category:= CognitiveSearch AuthType:= ApiKey (作為類型歧視性)認證:= {Key} as Microsoft.MachineLearning.AccountRP.Contracts.WorkspaceConnection.ApiKey Target:= {Endpoint} 針對 ApiType、ApiVersion、Kind 和其他元數據欄位使用元數據屬性包 |
Connection |
線上目標的驗證類型 |
Connection |
線上的類別 |
Connection |
以連線類別為基礎的群組 |
created |
建立資源的身分識別類型。 |
Custom |
自訂金鑰認證物件 |
Custom |
Category:= CustomKeys AuthType:= CustomKeys (作為類型歧視性)認證:= {CustomKeys} as Microsoft.MachineLearning.AccountRP.Contracts.WorkspaceConnection.CustomKeys Target:= {any value} 使用 ApiVersion 和其他元數據字段的元數據包屬性 |
Error |
資源管理錯誤其他資訊。 |
Error |
錯誤詳細數據。 |
Error |
錯誤回應 |
Managed |
|
None |
|
OAuth2Auth |
|
PATAuth |
|
SASAuth |
|
Service |
|
system |
與建立和上次修改資源相關的元數據。 |
Username |
|
Value |
工作區連接值的格式 |
Workspace |
|
Workspace |
|
Workspace |
工作區連線認證的 API 金鑰物件。 |
Workspace |
|
Workspace |
需要 ClientId 和 ClientSecret。 根據每個 OAuth2 提供者的實作而定,其他屬性是選擇性的。 |
Workspace |
|
Workspace |
|
Workspace |
|
Workspace |
|
Workspace |
AADAuthTypeWorkspaceConnectionProperties
此連線類型涵蓋任何適用的 Azure 服務的 AAD 驗證
名稱 | 類型 | Description |
---|---|---|
authType |
string:
AAD |
線上目標的驗證類型 |
category |
線上的類別 |
|
createdByWorkspaceArmId |
string (arm-id) |
|
expiryTime |
string (date-time) |
|
group |
以連線類別為基礎的群組 |
|
isSharedToAll |
boolean |
|
metadata |
object |
儲存此連線的用戶元數據 |
sharedUserList |
string[] |
|
target |
string |
|
value |
string |
工作區聯機的值詳細數據。 |
valueFormat |
工作區連接值的格式 |
AccessKeyAuthTypeWorkspaceConnectionProperties
名稱 | 類型 | Description |
---|---|---|
authType |
string:
Access |
線上目標的驗證類型 |
category |
線上的類別 |
|
createdByWorkspaceArmId |
string (arm-id) |
|
credentials | ||
expiryTime |
string (date-time) |
|
group |
以連線類別為基礎的群組 |
|
isSharedToAll |
boolean |
|
metadata |
object |
儲存此連線的用戶元數據 |
sharedUserList |
string[] |
|
target |
string |
|
value |
string |
工作區聯機的值詳細數據。 |
valueFormat |
工作區連接值的格式 |
AccountKeyAuthTypeWorkspaceConnectionProperties
此連線類型涵蓋 Azure 記憶體的帳戶金鑰連線
名稱 | 類型 | Description |
---|---|---|
authType |
string:
Account |
線上目標的驗證類型 |
category |
線上的類別 |
|
createdByWorkspaceArmId |
string (arm-id) |
|
credentials | ||
expiryTime |
string (date-time) |
|
group |
以連線類別為基礎的群組 |
|
isSharedToAll |
boolean |
|
metadata |
object |
儲存此連線的用戶元數據 |
sharedUserList |
string[] |
|
target |
string |
|
value |
string |
工作區聯機的值詳細數據。 |
valueFormat |
工作區連接值的格式 |
ApiKeyAuthWorkspaceConnectionProperties
此聯機類型涵蓋一般 ApiKey 驗證聯機類別,例如:AzureOpenAI:Category:= AzureOpenAI AuthType:= ApiKey (作為類型歧視性認證:= {ApiKey} 作為 Microsoft.MachineLearning.AccountRP.Contracts.WorkspaceConnection.ApiKey Target:= {ApiBase}
CognitiveService: Category:= CognitiveService AuthType:= ApiKey (類型歧視性) 認證:= {SubscriptionKey} as Microsoft.MachineLearning.AccountRP.Contracts.WorkspaceConnection.ApiKey Target:= ServiceRegion={serviceRegion}
CognitiveSearch: Category:= CognitiveSearch AuthType:= ApiKey (作為類型歧視性)認證:= {Key} as Microsoft.MachineLearning.AccountRP.Contracts.WorkspaceConnection.ApiKey Target:= {Endpoint}
針對 ApiType、ApiVersion、Kind 和其他元數據欄位使用元數據屬性包
名稱 | 類型 | Description |
---|---|---|
authType |
string:
Api |
線上目標的驗證類型 |
category |
線上的類別 |
|
createdByWorkspaceArmId |
string (arm-id) |
|
credentials |
工作區連線認證的 API 金鑰物件。 |
|
expiryTime |
string (date-time) |
|
group |
以連線類別為基礎的群組 |
|
isSharedToAll |
boolean |
|
metadata |
object |
儲存此連線的用戶元數據 |
sharedUserList |
string[] |
|
target |
string |
|
value |
string |
工作區聯機的值詳細數據。 |
valueFormat |
工作區連接值的格式 |
ConnectionAuthType
線上目標的驗證類型
值 | Description |
---|---|
AAD | |
AccessKey | |
AccountKey | |
ApiKey | |
CustomKeys | |
ManagedIdentity | |
None | |
OAuth2 | |
PAT | |
SAS | |
ServicePrincipal | |
UsernamePassword |
ConnectionCategory
線上的類別
值 | Description |
---|---|
ADLSGen2 | |
AIServices | |
AmazonMws | |
AmazonRdsForOracle | |
AmazonRdsForSqlServer | |
AmazonRedshift | |
AmazonS3Compatible | |
ApiKey | |
AzureBlob | |
AzureDataExplorer | |
AzureDatabricksDeltaLake | |
AzureMariaDb | |
AzureMySqlDb | |
AzureOneLake | |
AzureOpenAI | |
AzurePostgresDb | |
AzureSqlDb | |
AzureSqlMi | |
AzureSynapseAnalytics | |
AzureTableStorage | |
BingLLMSearch | |
Cassandra | |
CognitiveSearch | |
CognitiveService | |
Concur | |
ContainerRegistry | |
CosmosDb | |
CosmosDbMongoDbApi | |
Couchbase | |
CustomKeys | |
Db2 | |
Drill | |
Dynamics | |
DynamicsAx | |
DynamicsCrm | |
Elasticsearch | |
Eloqua | |
FileServer | |
FtpServer | |
GenericContainerRegistry | |
GenericHttp | |
GenericRest | |
Git | |
GoogleAdWords | |
GoogleBigQuery | |
GoogleCloudStorage | |
Greenplum | |
Hbase | |
Hdfs | |
Hive | |
Hubspot | |
Impala | |
Informix | |
Jira | |
Magento | |
ManagedOnlineEndpoint | |
MariaDb | |
Marketo | |
MicrosoftAccess | |
MongoDbAtlas | |
MongoDbV2 | |
MySql | |
Netezza | |
ODataRest | |
Odbc | |
Office365 | |
OpenAI | |
Oracle | |
OracleCloudStorage | |
OracleServiceCloud | |
PayPal | |
Phoenix | |
Pinecone | |
PostgreSql | |
Presto | |
PythonFeed | |
QuickBooks | |
Redis | |
Responsys | |
S3 | |
Salesforce | |
SalesforceMarketingCloud | |
SalesforceServiceCloud | |
SapBw | |
SapCloudForCustomer | |
SapEcc | |
SapHana | |
SapOpenHub | |
SapTable | |
Serp | |
Serverless | |
ServiceNow | |
Sftp | |
SharePointOnlineList | |
Shopify | |
Snowflake | |
Spark | |
SqlServer | |
Square | |
Sybase | |
Teradata | |
Vertica | |
WebTable | |
Xero | |
Zoho |
ConnectionGroup
以連線類別為基礎的群組
值 | Description |
---|---|
Azure | |
AzureAI | |
Database | |
File | |
GenericProtocol | |
NoSQL | |
ServicesAndApps |
createdByType
建立資源的身分識別類型。
值 | Description |
---|---|
Application | |
Key | |
ManagedIdentity | |
User |
CustomKeys
自訂金鑰認證物件
名稱 | 類型 | Description |
---|---|---|
keys |
object |
CustomKeysWorkspaceConnectionProperties
Category:= CustomKeys AuthType:= CustomKeys (作為類型歧視性)認證:= {CustomKeys} as Microsoft.MachineLearning.AccountRP.Contracts.WorkspaceConnection.CustomKeys Target:= {any value} 使用 ApiVersion 和其他元數據字段的元數據包屬性
名稱 | 類型 | Description |
---|---|---|
authType | string: |
線上目標的驗證類型 |
category |
線上的類別 |
|
createdByWorkspaceArmId |
string (arm-id) |
|
credentials |
自訂金鑰認證物件 |
|
expiryTime |
string (date-time) |
|
group |
以連線類別為基礎的群組 |
|
isSharedToAll |
boolean |
|
metadata |
object |
儲存此連線的用戶元數據 |
sharedUserList |
string[] |
|
target |
string |
|
value |
string |
工作區聯機的值詳細數據。 |
valueFormat |
工作區連接值的格式 |
ErrorAdditionalInfo
資源管理錯誤其他資訊。
名稱 | 類型 | Description |
---|---|---|
info |
object |
其他資訊。 |
type |
string |
其他信息類型。 |
ErrorDetail
錯誤詳細數據。
名稱 | 類型 | Description |
---|---|---|
additionalInfo |
錯誤其他資訊。 |
|
code |
string |
錯誤碼。 |
details |
錯誤詳細數據。 |
|
message |
string |
錯誤訊息。 |
target |
string |
錯誤目標。 |
ErrorResponse
錯誤回應
名稱 | 類型 | Description |
---|---|---|
error |
error 物件。 |
ManagedIdentityAuthTypeWorkspaceConnectionProperties
名稱 | 類型 | Description |
---|---|---|
authType |
string:
Managed |
線上目標的驗證類型 |
category |
線上的類別 |
|
createdByWorkspaceArmId |
string (arm-id) |
|
credentials | ||
expiryTime |
string (date-time) |
|
group |
以連線類別為基礎的群組 |
|
isSharedToAll |
boolean |
|
metadata |
object |
儲存此連線的用戶元數據 |
sharedUserList |
string[] |
|
target |
string |
|
value |
string |
工作區聯機的值詳細數據。 |
valueFormat |
工作區連接值的格式 |
NoneAuthTypeWorkspaceConnectionProperties
名稱 | 類型 | Description |
---|---|---|
authType |
string:
None |
線上目標的驗證類型 |
category |
線上的類別 |
|
createdByWorkspaceArmId |
string (arm-id) |
|
expiryTime |
string (date-time) |
|
group |
以連線類別為基礎的群組 |
|
isSharedToAll |
boolean |
|
metadata |
object |
儲存此連線的用戶元數據 |
sharedUserList |
string[] |
|
target |
string |
|
value |
string |
工作區聯機的值詳細數據。 |
valueFormat |
工作區連接值的格式 |
OAuth2AuthTypeWorkspaceConnectionProperties
名稱 | 類型 | Description |
---|---|---|
authType |
string:
OAuth2 |
線上目標的驗證類型 |
category |
線上的類別 |
|
createdByWorkspaceArmId |
string (arm-id) |
|
credentials |
需要 ClientId 和 ClientSecret。 根據每個 OAuth2 提供者的實作而定,其他屬性是選擇性的。 |
|
expiryTime |
string (date-time) |
|
group |
以連線類別為基礎的群組 |
|
isSharedToAll |
boolean |
|
metadata |
object |
儲存此連線的用戶元數據 |
sharedUserList |
string[] |
|
target |
string |
|
value |
string |
工作區聯機的值詳細數據。 |
valueFormat |
工作區連接值的格式 |
PATAuthTypeWorkspaceConnectionProperties
名稱 | 類型 | Description |
---|---|---|
authType |
string:
PAT |
線上目標的驗證類型 |
category |
線上的類別 |
|
createdByWorkspaceArmId |
string (arm-id) |
|
credentials | ||
expiryTime |
string (date-time) |
|
group |
以連線類別為基礎的群組 |
|
isSharedToAll |
boolean |
|
metadata |
object |
儲存此連線的用戶元數據 |
sharedUserList |
string[] |
|
target |
string |
|
value |
string |
工作區聯機的值詳細數據。 |
valueFormat |
工作區連接值的格式 |
SASAuthTypeWorkspaceConnectionProperties
名稱 | 類型 | Description |
---|---|---|
authType |
string:
SAS |
線上目標的驗證類型 |
category |
線上的類別 |
|
createdByWorkspaceArmId |
string (arm-id) |
|
credentials | ||
expiryTime |
string (date-time) |
|
group |
以連線類別為基礎的群組 |
|
isSharedToAll |
boolean |
|
metadata |
object |
儲存此連線的用戶元數據 |
sharedUserList |
string[] |
|
target |
string |
|
value |
string |
工作區聯機的值詳細數據。 |
valueFormat |
工作區連接值的格式 |
ServicePrincipalAuthTypeWorkspaceConnectionProperties
名稱 | 類型 | Description |
---|---|---|
authType |
string:
Service |
線上目標的驗證類型 |
category |
線上的類別 |
|
createdByWorkspaceArmId |
string (arm-id) |
|
credentials | ||
expiryTime |
string (date-time) |
|
group |
以連線類別為基礎的群組 |
|
isSharedToAll |
boolean |
|
metadata |
object |
儲存此連線的用戶元數據 |
sharedUserList |
string[] |
|
target |
string |
|
value |
string |
工作區聯機的值詳細數據。 |
valueFormat |
工作區連接值的格式 |
systemData
與建立和上次修改資源相關的元數據。
名稱 | 類型 | Description |
---|---|---|
createdAt |
string (date-time) |
資源建立的時間戳(UTC)。 |
createdBy |
string |
建立資源的身分識別。 |
createdByType |
建立資源的身分識別類型。 |
|
lastModifiedAt |
string (date-time) |
上次修改的資源時間戳 (UTC) |
lastModifiedBy |
string |
上次修改資源的身分識別。 |
lastModifiedByType |
上次修改資源的身分識別類型。 |
UsernamePasswordAuthTypeWorkspaceConnectionProperties
名稱 | 類型 | Description |
---|---|---|
authType |
string:
Username |
線上目標的驗證類型 |
category |
線上的類別 |
|
createdByWorkspaceArmId |
string (arm-id) |
|
credentials | ||
expiryTime |
string (date-time) |
|
group |
以連線類別為基礎的群組 |
|
isSharedToAll |
boolean |
|
metadata |
object |
儲存此連線的用戶元數據 |
sharedUserList |
string[] |
|
target |
string |
|
value |
string |
工作區聯機的值詳細數據。 |
valueFormat |
工作區連接值的格式 |
ValueFormat
工作區連接值的格式
值 | Description |
---|---|
JSON |
WorkspaceConnectionAccessKey
名稱 | 類型 | Description |
---|---|---|
accessKeyId |
string |
|
secretAccessKey |
string |
WorkspaceConnectionAccountKey
名稱 | 類型 | Description |
---|---|---|
key |
string |
WorkspaceConnectionApiKey
工作區連線認證的 API 金鑰物件。
名稱 | 類型 | Description |
---|---|---|
key |
string |
WorkspaceConnectionManagedIdentity
名稱 | 類型 | Description |
---|---|---|
clientId |
string |
|
resourceId |
string |
WorkspaceConnectionOAuth2
需要 ClientId 和 ClientSecret。 根據每個 OAuth2 提供者的實作而定,其他屬性是選擇性的。
名稱 | 類型 | Description |
---|---|---|
authUrl |
string (url) |
Concur 連線類別的必要專案 |
clientId |
string (uuid) |
UUID 格式的用戶端識別碼 |
clientSecret |
string |
|
developerToken |
string |
GoogleAdWords 連線類別的必要專案 |
password |
string |
|
refreshToken |
string |
GoogleBigQuery、GoogleAdWords、Hubspot、QuickBooks、Square、Xero、Zoho 所需,使用者需要讓 RefreshToken 脫機 |
tenantId |
string |
QuickBooks 和 Xero 連線類別的必要專案 |
username |
string |
Concur,ServiceNow 驗證伺服器 AccessToken 授與類型為 'Password',需要 UsernamePassword |
WorkspaceConnectionPersonalAccessToken
名稱 | 類型 | Description |
---|---|---|
pat |
string |
WorkspaceConnectionPropertiesV2BasicResource
名稱 | 類型 | Description |
---|---|---|
id |
string |
資源的完整資源標識碼。 例如 - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} |
name |
string |
資源的名稱 |
properties |
WorkspaceConnectionPropertiesV2:
|
|
systemData |
包含 createdBy 和 modifiedBy 資訊的 Azure Resource Manager 元數據。 |
|
type |
string |
資源的型別。 例如“Microsoft.Compute/virtualMachines” 或 “Microsoft.Storage/storageAccounts” |
WorkspaceConnectionServicePrincipal
名稱 | 類型 | Description |
---|---|---|
clientId |
string |
|
clientSecret |
string |
|
tenantId |
string |
WorkspaceConnectionSharedAccessSignature
名稱 | 類型 | Description |
---|---|---|
sas |
string |
WorkspaceConnectionUsernamePassword
名稱 | 類型 | Description |
---|---|---|
password |
string |
|
securityToken |
string |
除了 UsernamePassword 以外,SalesForce 這類連線還需要額外的安全性 |
username |
string |