-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmachine-learning-workspace-connection.bicep
52 lines (48 loc) · 1.6 KB
/
machine-learning-workspace-connection.bicep
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
@export()
@description('Connection information for the AI/ML workspace.')
type connectionInfo = {
@description('Name of the connection.')
name: string
@description('Category of the connection.')
category: string
@description('Target of the connection.')
target: string
@description('Authentication type for the connection target.')
authType:
| 'AAD'
| 'AccessKey'
| 'AccountKey'
| 'ApiKey'
| 'CustomKeys'
| 'ManagedIdentity'
| 'None'
| 'OAuth2'
| 'PAT'
| 'SAS'
| 'ServicePrincipal'
| 'UsernamePassword'
@description('Credentials for the connection target.')
credentials: object?
}
@description('Name of the AI/ML workspace associated with the connection.')
param workspaceName string
@description('Connection information.')
param connection connectionInfo
resource workspace 'Microsoft.MachineLearningServices/workspaces@2024-04-01-preview' existing = {
name: workspaceName
resource workspaceConnection 'connections@2024-01-01-preview' = {
name: connection.name
properties: {
category: connection.category
target: connection.target
authType: connection.authType
credentials: connection.credentials
}
}
}
@description('The deployed ML workspace connection resource.')
output resource resource = workspace::workspaceConnection
@description('ID for the deployed ML workspace connection resource.')
output id string = workspace::workspaceConnection.id
@description('Name for the deployed ML workspace connection resource.')
output name string = workspace::workspaceConnection.name