@@ -26,12 +26,16 @@ class AzureOpenAIConnection(BaseConnection):
26
26
:type target: str
27
27
:param tags: Tag dictionary. Tags can be added, removed, and updated.
28
28
:type tags: dict
29
- :param credentials: The credentials for authenticating to the external resource.
29
+ :param credentials: The credentials for authenticating the external resource.
30
30
:type credentials: ~azure.ai.ml.entities.ApiKeyConfiguration
31
31
:param api_version: The api version that this connection was created for.
32
32
:type api_version: Optional[str]
33
33
:param api_type: The api type that this connection was created for. Defaults to "Azure" and currently rarely changes.
34
34
:type api_type: str
35
+ :param is_shared: For connections created for a project, this determines if the connection
36
+ is shared amongst other connections with that project's parent AI resource.
37
+ Defaults to true.
38
+ :type is_shared: bool
35
39
"""
36
40
37
41
def __init__ (
@@ -136,10 +140,14 @@ class AzureAISearchConnection(BaseConnection):
136
140
:type target: str
137
141
:param tags: Tag dictionary. Tags can be added, removed, and updated.
138
142
:type tags: dict
139
- :param credentials: The credentials for authenticating to the external resource.
143
+ :param credentials: The credentials for authenticating the external resource.
140
144
:type credentials: ~azure.ai.ml.entities.ApiKeyConfiguration
141
145
:param api_version: The api version that this connection was created for. Only applies to certain connection types.
142
146
:type api_version: Optional[str]
147
+ :param is_shared: For connections created for a project, this determines if the connection
148
+ is shared amongst other connections with that project's parent AI resource.
149
+ Defaults to true.
150
+ :type is_shared: bool
143
151
"""
144
152
145
153
def __init__ (
@@ -195,21 +203,25 @@ def set_current_environment(self, credential: Optional[TokenCredential] = None):
195
203
class AzureAIServiceConnection (BaseConnection ):
196
204
"""A Connection for an Azure Cognitive Service. Note: This object usually shouldn't be created manually by users.
197
205
To get the default AzureOpenAIConnection for an AI Resource, use an AIClient object to call the
198
- 'get_default_aoai_connection ' function.
206
+ 'get_default_content_safety_connection ' function.
199
207
200
208
:param name: Name of the connection.
201
209
:type name: str
202
210
:param target: The URL or ARM resource ID of the external resource.
203
211
:type target: str
204
212
:param tags: Tag dictionary. Tags can be added, removed, and updated.
205
213
:type tags: dict
206
- :param credentials: The credentials for authenticating to the external resource.
214
+ :param credentials: The credentials for authenticating the external resource.
207
215
:type credentials: ~azure.ai.ml.entities.ApiKeyConfiguration
208
216
:param api_version: The api version that this connection was created for.
209
217
:type api_version: Optional[str]
210
218
:param kind: The kind of ai service that this connection points to. Valid inputs include:
211
219
"AzureOpenAI", "ContentSafety", and "Speech"
212
220
:type kind: str
221
+ :param is_shared: For connections created for a project, this determines if the connection
222
+ is shared amongst other connections with that project's parent AI resource.
223
+ Defaults to true.
224
+ :type is_shared: bool
213
225
"""
214
226
215
227
def __init__ (
@@ -263,3 +275,56 @@ def kind(self, value: str) -> str:
263
275
:rtype: str
264
276
"""
265
277
self ._workspace_connection .tags [CONNECTION_KIND_KEY ] = value
278
+
279
+ class GitHubConnection (BaseConnection ):
280
+ """A Connection to GitHub.
281
+
282
+ :param name: Name of the connection.
283
+ :type name: str
284
+ :param target: The URL or ARM resource ID of the external resource.
285
+ :type target: str
286
+ :param tags: Tag dictionary. Tags can be added, removed, and updated.
287
+ :type tags: dict
288
+ :param credentials: The credentials for authenticating the external resource.
289
+ :type credentials: ~azure.ai.ml.entities.ApiKeyConfiguration
290
+ :param is_shared: For connections created for a project, this determines if the connection
291
+ is shared amongst other connections with that project's parent AI resource.
292
+ Defaults to true.
293
+ :type is_shared: bool
294
+ """
295
+
296
+ def __init__ (
297
+ self ,
298
+ * ,
299
+ target : str ,
300
+ credentials : ApiKeyConfiguration ,
301
+ ** kwargs ,
302
+ ):
303
+ kwargs .pop ("type" , None ) # make sure we never somehow use wrong type
304
+ super ().__init__ (target = target , type = "git" , credentials = credentials , ** kwargs )
305
+
306
+ class CustomConnection (BaseConnection ):
307
+ """A Connection to system that's not encapsulated by other connection types.
308
+
309
+ :param name: Name of the connection.
310
+ :type name: str
311
+ :param target: The URL or ARM resource ID of the external resource.
312
+ :type target: str
313
+ :param tags: Tag dictionary. Tags can be added, removed, and updated.
314
+ :type tags: dict
315
+ :param credentials: The credentials for authenticating the external resource.
316
+ :type credentials: ~azure.ai.ml.entities.ApiKeyConfiguration
317
+ :param is_shared: For connections created for a project, this determines if the connection
318
+ is shared amongst other connections with that project's parent AI resource.
319
+ Defaults to true.
320
+ :type is_shared: bool
321
+ """
322
+ def __init__ (
323
+ self ,
324
+ * ,
325
+ target : str ,
326
+ credentials : ApiKeyConfiguration ,
327
+ ** kwargs ,
328
+ ):
329
+ kwargs .pop ("type" , None ) # make sure we never somehow use wrong type
330
+ super ().__init__ (target = target , type = "custom" , credentials = credentials , ** kwargs )
0 commit comments