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 Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
connection
|
path | True |
string |
Friendly name of the workspace connection Regex pattern: |
resource
|
path | True |
string |
The name of the resource group. The name is case insensitive. |
subscription
|
path | True |
string |
The ID of the target subscription. |
workspace
|
path | True |
string |
Name of Azure Machine Learning workspace. Regex pattern: |
api-version
|
query | True |
string |
The API version to use for this operation. |
Request Body
Responses
Name | Type | Description |
---|---|---|
200 OK |
The request was successful; the request was well-formed and received properly. |
|
Other Status Codes |
Error |
Security
azure_auth
Azure Active Directory OAuth2 Flow.
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Name | Description |
---|---|
user_impersonation | impersonate your user account |
Examples
CreateWorkspaceConnection
Sample request
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"
}
}
Sample response
{
"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"
}
}
Definitions
Name | Description |
---|---|
AADAuth |
This connection type covers the AAD auth for any applicable Azure service |
Access |
|
Account |
This connection type covers the account key connection for Azure storage |
Api |
This connection type covers the generic ApiKey auth connection categories, for examples: AzureOpenAI: Category:= AzureOpenAI AuthType:= ApiKey (as type discriminator) Credentials:= {ApiKey} as Microsoft.MachineLearning.AccountRP.Contracts.WorkspaceConnection.ApiKey Target:= {ApiBase} CognitiveService: Category:= CognitiveService AuthType:= ApiKey (as type discriminator) Credentials:= {SubscriptionKey} as Microsoft.MachineLearning.AccountRP.Contracts.WorkspaceConnection.ApiKey Target:= ServiceRegion={serviceRegion} CognitiveSearch: Category:= CognitiveSearch AuthType:= ApiKey (as type discriminator) Credentials:= {Key} as Microsoft.MachineLearning.AccountRP.Contracts.WorkspaceConnection.ApiKey Target:= {Endpoint} Use Metadata property bag for ApiType, ApiVersion, Kind and other metadata fields |
Connection |
Authentication type of the connection target |
Connection |
Category of the connection |
Connection |
Group based on connection category |
created |
The type of identity that created the resource. |
Custom |
Custom Keys credential object |
Custom |
Category:= CustomKeys AuthType:= CustomKeys (as type discriminator) Credentials:= {CustomKeys} as Microsoft.MachineLearning.AccountRP.Contracts.WorkspaceConnection.CustomKeys Target:= {any value} Use Metadata property bag for ApiVersion and other metadata fields |
Error |
The resource management error additional info. |
Error |
The error detail. |
Error |
Error response |
Managed |
|
None |
|
OAuth2Auth |
|
PATAuth |
|
SASAuth |
|
Service |
|
system |
Metadata pertaining to creation and last modification of the resource. |
Username |
|
Value |
format for the workspace connection value |
Workspace |
|
Workspace |
|
Workspace |
Api key object for workspace connection credential. |
Workspace |
|
Workspace |
ClientId and ClientSecret are required. Other properties are optional depending on each OAuth2 provider's implementation. |
Workspace |
|
Workspace |
|
Workspace |
|
Workspace |
|
Workspace |
AADAuthTypeWorkspaceConnectionProperties
This connection type covers the AAD auth for any applicable Azure service
Name | Type | Description |
---|---|---|
authType |
string:
AAD |
Authentication type of the connection target |
category |
Category of the connection |
|
createdByWorkspaceArmId |
string |
|
expiryTime |
string |
|
group |
Group based on connection category |
|
isSharedToAll |
boolean |
|
metadata |
object |
Store user metadata for this connection |
sharedUserList |
string[] |
|
target |
string |
|
value |
string |
Value details of the workspace connection. |
valueFormat |
format for the workspace connection value |
AccessKeyAuthTypeWorkspaceConnectionProperties
Name | Type | Description |
---|---|---|
authType |
string:
Access |
Authentication type of the connection target |
category |
Category of the connection |
|
createdByWorkspaceArmId |
string |
|
credentials | ||
expiryTime |
string |
|
group |
Group based on connection category |
|
isSharedToAll |
boolean |
|
metadata |
object |
Store user metadata for this connection |
sharedUserList |
string[] |
|
target |
string |
|
value |
string |
Value details of the workspace connection. |
valueFormat |
format for the workspace connection value |
AccountKeyAuthTypeWorkspaceConnectionProperties
This connection type covers the account key connection for Azure storage
Name | Type | Description |
---|---|---|
authType |
string:
Account |
Authentication type of the connection target |
category |
Category of the connection |
|
createdByWorkspaceArmId |
string |
|
credentials | ||
expiryTime |
string |
|
group |
Group based on connection category |
|
isSharedToAll |
boolean |
|
metadata |
object |
Store user metadata for this connection |
sharedUserList |
string[] |
|
target |
string |
|
value |
string |
Value details of the workspace connection. |
valueFormat |
format for the workspace connection value |
ApiKeyAuthWorkspaceConnectionProperties
This connection type covers the generic ApiKey auth connection categories, for examples: AzureOpenAI: Category:= AzureOpenAI AuthType:= ApiKey (as type discriminator) Credentials:= {ApiKey} as Microsoft.MachineLearning.AccountRP.Contracts.WorkspaceConnection.ApiKey Target:= {ApiBase}
CognitiveService: Category:= CognitiveService AuthType:= ApiKey (as type discriminator) Credentials:= {SubscriptionKey} as Microsoft.MachineLearning.AccountRP.Contracts.WorkspaceConnection.ApiKey Target:= ServiceRegion={serviceRegion}
CognitiveSearch: Category:= CognitiveSearch AuthType:= ApiKey (as type discriminator) Credentials:= {Key} as Microsoft.MachineLearning.AccountRP.Contracts.WorkspaceConnection.ApiKey Target:= {Endpoint}
Use Metadata property bag for ApiType, ApiVersion, Kind and other metadata fields
Name | Type | Description |
---|---|---|
authType |
string:
Api |
Authentication type of the connection target |
category |
Category of the connection |
|
createdByWorkspaceArmId |
string |
|
credentials |
Api key object for workspace connection credential. |
|
expiryTime |
string |
|
group |
Group based on connection category |
|
isSharedToAll |
boolean |
|
metadata |
object |
Store user metadata for this connection |
sharedUserList |
string[] |
|
target |
string |
|
value |
string |
Value details of the workspace connection. |
valueFormat |
format for the workspace connection value |
ConnectionAuthType
Authentication type of the connection target
Name | Type | Description |
---|---|---|
AAD |
string |
|
AccessKey |
string |
|
AccountKey |
string |
|
ApiKey |
string |
|
CustomKeys |
string |
|
ManagedIdentity |
string |
|
None |
string |
|
OAuth2 |
string |
|
PAT |
string |
|
SAS |
string |
|
ServicePrincipal |
string |
|
UsernamePassword |
string |
ConnectionCategory
Category of the connection
Name | Type | Description |
---|---|---|
ADLSGen2 |
string |
|
AIServices |
string |
|
AmazonMws |
string |
|
AmazonRdsForOracle |
string |
|
AmazonRdsForSqlServer |
string |
|
AmazonRedshift |
string |
|
AmazonS3Compatible |
string |
|
ApiKey |
string |
|
AzureBlob |
string |
|
AzureDataExplorer |
string |
|
AzureDatabricksDeltaLake |
string |
|
AzureMariaDb |
string |
|
AzureMySqlDb |
string |
|
AzureOneLake |
string |
|
AzureOpenAI |
string |
|
AzurePostgresDb |
string |
|
AzureSqlDb |
string |
|
AzureSqlMi |
string |
|
AzureSynapseAnalytics |
string |
|
AzureTableStorage |
string |
|
BingLLMSearch |
string |
|
Cassandra |
string |
|
CognitiveSearch |
string |
|
CognitiveService |
string |
|
Concur |
string |
|
ContainerRegistry |
string |
|
CosmosDb |
string |
|
CosmosDbMongoDbApi |
string |
|
Couchbase |
string |
|
CustomKeys |
string |
|
Db2 |
string |
|
Drill |
string |
|
Dynamics |
string |
|
DynamicsAx |
string |
|
DynamicsCrm |
string |
|
Elasticsearch |
string |
|
Eloqua |
string |
|
FileServer |
string |
|
FtpServer |
string |
|
GenericContainerRegistry |
string |
|
GenericHttp |
string |
|
GenericRest |
string |
|
Git |
string |
|
GoogleAdWords |
string |
|
GoogleBigQuery |
string |
|
GoogleCloudStorage |
string |
|
Greenplum |
string |
|
Hbase |
string |
|
Hdfs |
string |
|
Hive |
string |
|
Hubspot |
string |
|
Impala |
string |
|
Informix |
string |
|
Jira |
string |
|
Magento |
string |
|
ManagedOnlineEndpoint |
string |
|
MariaDb |
string |
|
Marketo |
string |
|
MicrosoftAccess |
string |
|
MongoDbAtlas |
string |
|
MongoDbV2 |
string |
|
MySql |
string |
|
Netezza |
string |
|
ODataRest |
string |
|
Odbc |
string |
|
Office365 |
string |
|
OpenAI |
string |
|
Oracle |
string |
|
OracleCloudStorage |
string |
|
OracleServiceCloud |
string |
|
PayPal |
string |
|
Phoenix |
string |
|
Pinecone |
string |
|
PostgreSql |
string |
|
Presto |
string |
|
PythonFeed |
string |
|
QuickBooks |
string |
|
Redis |
string |
|
Responsys |
string |
|
S3 |
string |
|
Salesforce |
string |
|
SalesforceMarketingCloud |
string |
|
SalesforceServiceCloud |
string |
|
SapBw |
string |
|
SapCloudForCustomer |
string |
|
SapEcc |
string |
|
SapHana |
string |
|
SapOpenHub |
string |
|
SapTable |
string |
|
Serp |
string |
|
Serverless |
string |
|
ServiceNow |
string |
|
Sftp |
string |
|
SharePointOnlineList |
string |
|
Shopify |
string |
|
Snowflake |
string |
|
Spark |
string |
|
SqlServer |
string |
|
Square |
string |
|
Sybase |
string |
|
Teradata |
string |
|
Vertica |
string |
|
WebTable |
string |
|
Xero |
string |
|
Zoho |
string |
ConnectionGroup
Group based on connection category
Name | Type | Description |
---|---|---|
Azure |
string |
|
AzureAI |
string |
|
Database |
string |
|
File |
string |
|
GenericProtocol |
string |
|
NoSQL |
string |
|
ServicesAndApps |
string |
createdByType
The type of identity that created the resource.
Name | Type | Description |
---|---|---|
Application |
string |
|
Key |
string |
|
ManagedIdentity |
string |
|
User |
string |
CustomKeys
Custom Keys credential object
Name | Type | Description |
---|---|---|
keys |
object |
CustomKeysWorkspaceConnectionProperties
Category:= CustomKeys AuthType:= CustomKeys (as type discriminator) Credentials:= {CustomKeys} as Microsoft.MachineLearning.AccountRP.Contracts.WorkspaceConnection.CustomKeys Target:= {any value} Use Metadata property bag for ApiVersion and other metadata fields
Name | Type | Description |
---|---|---|
authType | string: |
Authentication type of the connection target |
category |
Category of the connection |
|
createdByWorkspaceArmId |
string |
|
credentials |
Custom Keys credential object |
|
expiryTime |
string |
|
group |
Group based on connection category |
|
isSharedToAll |
boolean |
|
metadata |
object |
Store user metadata for this connection |
sharedUserList |
string[] |
|
target |
string |
|
value |
string |
Value details of the workspace connection. |
valueFormat |
format for the workspace connection value |
ErrorAdditionalInfo
The resource management error additional info.
Name | Type | Description |
---|---|---|
info |
object |
The additional info. |
type |
string |
The additional info type. |
ErrorDetail
The error detail.
Name | Type | Description |
---|---|---|
additionalInfo |
The error additional info. |
|
code |
string |
The error code. |
details |
The error details. |
|
message |
string |
The error message. |
target |
string |
The error target. |
ErrorResponse
Error response
Name | Type | Description |
---|---|---|
error |
The error object. |
ManagedIdentityAuthTypeWorkspaceConnectionProperties
Name | Type | Description |
---|---|---|
authType |
string:
Managed |
Authentication type of the connection target |
category |
Category of the connection |
|
createdByWorkspaceArmId |
string |
|
credentials | ||
expiryTime |
string |
|
group |
Group based on connection category |
|
isSharedToAll |
boolean |
|
metadata |
object |
Store user metadata for this connection |
sharedUserList |
string[] |
|
target |
string |
|
value |
string |
Value details of the workspace connection. |
valueFormat |
format for the workspace connection value |
NoneAuthTypeWorkspaceConnectionProperties
Name | Type | Description |
---|---|---|
authType |
string:
None |
Authentication type of the connection target |
category |
Category of the connection |
|
createdByWorkspaceArmId |
string |
|
expiryTime |
string |
|
group |
Group based on connection category |
|
isSharedToAll |
boolean |
|
metadata |
object |
Store user metadata for this connection |
sharedUserList |
string[] |
|
target |
string |
|
value |
string |
Value details of the workspace connection. |
valueFormat |
format for the workspace connection value |
OAuth2AuthTypeWorkspaceConnectionProperties
Name | Type | Description |
---|---|---|
authType |
string:
OAuth2 |
Authentication type of the connection target |
category |
Category of the connection |
|
createdByWorkspaceArmId |
string |
|
credentials |
ClientId and ClientSecret are required. Other properties are optional depending on each OAuth2 provider's implementation. |
|
expiryTime |
string |
|
group |
Group based on connection category |
|
isSharedToAll |
boolean |
|
metadata |
object |
Store user metadata for this connection |
sharedUserList |
string[] |
|
target |
string |
|
value |
string |
Value details of the workspace connection. |
valueFormat |
format for the workspace connection value |
PATAuthTypeWorkspaceConnectionProperties
Name | Type | Description |
---|---|---|
authType |
string:
PAT |
Authentication type of the connection target |
category |
Category of the connection |
|
createdByWorkspaceArmId |
string |
|
credentials | ||
expiryTime |
string |
|
group |
Group based on connection category |
|
isSharedToAll |
boolean |
|
metadata |
object |
Store user metadata for this connection |
sharedUserList |
string[] |
|
target |
string |
|
value |
string |
Value details of the workspace connection. |
valueFormat |
format for the workspace connection value |
SASAuthTypeWorkspaceConnectionProperties
Name | Type | Description |
---|---|---|
authType |
string:
SAS |
Authentication type of the connection target |
category |
Category of the connection |
|
createdByWorkspaceArmId |
string |
|
credentials | ||
expiryTime |
string |
|
group |
Group based on connection category |
|
isSharedToAll |
boolean |
|
metadata |
object |
Store user metadata for this connection |
sharedUserList |
string[] |
|
target |
string |
|
value |
string |
Value details of the workspace connection. |
valueFormat |
format for the workspace connection value |
ServicePrincipalAuthTypeWorkspaceConnectionProperties
Name | Type | Description |
---|---|---|
authType |
string:
Service |
Authentication type of the connection target |
category |
Category of the connection |
|
createdByWorkspaceArmId |
string |
|
credentials | ||
expiryTime |
string |
|
group |
Group based on connection category |
|
isSharedToAll |
boolean |
|
metadata |
object |
Store user metadata for this connection |
sharedUserList |
string[] |
|
target |
string |
|
value |
string |
Value details of the workspace connection. |
valueFormat |
format for the workspace connection value |
systemData
Metadata pertaining to creation and last modification of the resource.
Name | Type | Description |
---|---|---|
createdAt |
string |
The timestamp of resource creation (UTC). |
createdBy |
string |
The identity that created the resource. |
createdByType |
The type of identity that created the resource. |
|
lastModifiedAt |
string |
The timestamp of resource last modification (UTC) |
lastModifiedBy |
string |
The identity that last modified the resource. |
lastModifiedByType |
The type of identity that last modified the resource. |
UsernamePasswordAuthTypeWorkspaceConnectionProperties
Name | Type | Description |
---|---|---|
authType |
string:
Username |
Authentication type of the connection target |
category |
Category of the connection |
|
createdByWorkspaceArmId |
string |
|
credentials | ||
expiryTime |
string |
|
group |
Group based on connection category |
|
isSharedToAll |
boolean |
|
metadata |
object |
Store user metadata for this connection |
sharedUserList |
string[] |
|
target |
string |
|
value |
string |
Value details of the workspace connection. |
valueFormat |
format for the workspace connection value |
ValueFormat
format for the workspace connection value
Name | Type | Description |
---|---|---|
JSON |
string |
WorkspaceConnectionAccessKey
Name | Type | Description |
---|---|---|
accessKeyId |
string |
|
secretAccessKey |
string |
WorkspaceConnectionAccountKey
Name | Type | Description |
---|---|---|
key |
string |
WorkspaceConnectionApiKey
Api key object for workspace connection credential.
Name | Type | Description |
---|---|---|
key |
string |
WorkspaceConnectionManagedIdentity
Name | Type | Description |
---|---|---|
clientId |
string |
|
resourceId |
string |
WorkspaceConnectionOAuth2
ClientId and ClientSecret are required. Other properties are optional depending on each OAuth2 provider's implementation.
Name | Type | Description |
---|---|---|
authUrl |
string |
Required by Concur connection category |
clientId |
string |
Client id in the format of UUID |
clientSecret |
string |
|
developerToken |
string |
Required by GoogleAdWords connection category |
password |
string |
|
refreshToken |
string |
Required by GoogleBigQuery, GoogleAdWords, Hubspot, QuickBooks, Square, Xero, Zoho where user needs to get RefreshToken offline |
tenantId |
string |
Required by QuickBooks and Xero connection categories |
username |
string |
Concur, ServiceNow auth server AccessToken grant type is 'Password' which requires UsernamePassword |
WorkspaceConnectionPersonalAccessToken
Name | Type | Description |
---|---|---|
pat |
string |
WorkspaceConnectionPropertiesV2BasicResource
WorkspaceConnectionServicePrincipal
Name | Type | Description |
---|---|---|
clientId |
string |
|
clientSecret |
string |
|
tenantId |
string |
WorkspaceConnectionSharedAccessSignature
Name | Type | Description |
---|---|---|
sas |
string |
WorkspaceConnectionUsernamePassword
Name | Type | Description |
---|---|---|
password |
string |
|
securityToken |
string |
Optional, required by connections like SalesForce for extra security in addition to UsernamePassword |
username |
string |