AzureOpenAIConnection Class  
Note
This is an experimental class, and may change at any time. Please see https://aka.ms/azuremlexperimental for more information.
A Connection that is specifically designed for handling connections to Azure Open AI.
Constructor
AzureOpenAIConnection(*, azure_endpoint: str, api_key: str | None = None, api_version: str | None = None, api_type: str = 'Azure', open_ai_resource_id: str | None = None, metadata: Dict[Any, Any] | None = None, **kwargs: Any)Parameters
| Name | Description | 
|---|---|
| name 
				Required
			 | Name of the connection. | 
| azure_endpoint 
				Required
			 | The URL or ARM resource ID of the Azure Open AI Resource. | 
| api_key 
				Required
			 | The api key to connect to the azure endpoint. If unset, tries to use the user's Entra ID as credentials instead. | 
| open_ai_resource_id 
				Required
			 | The fully qualified ID of the Azure Open AI resource to connect to. | 
| api_version 
				Required
			 | The api version that this connection was created for. | 
| metadata 
				Required
			 | Metadata dictionary. | 
Keyword-Only Parameters
| Name | Description | 
|---|---|
| azure_endpoint 
				Required
			 |  | 
| api_key | Default value: None | 
| api_version | Default value: None | 
| api_type | Default value: Azure | 
| open_ai_resource_id | Default value: None | 
| metadata | Default value: None | 
Methods
| dump | Dump the connection spec into a file in yaml format. | 
dump
Dump the connection spec into a file in yaml format.
dump(dest: str | PathLike | IO, **kwargs: Any) -> NoneParameters
| Name | Description | 
|---|---|
| dest 
				Required
			 | The destination to receive this connection's spec. Must be either a path to a local file, or an already-open file stream. If dest is a file path, a new file will be created, and an exception is raised if the file exists. If dest is an open file, the file will be written to directly, and an exception will be raised if the file is not writable. | 
Attributes
api_base
Alternate name for the target of the connection, which is used by some connection subclasses.
Returns
| Type | Description | 
|---|---|
| The target of the connection. | 
api_key
api_version
azure_endpoint
Alternate name for the target of the connection, which is used by some connection subclasses.
Returns
| Type | Description | 
|---|---|
| The target of the connection. | 
base_path
creation_context
The creation context of the resource.
Returns
| Type | Description | 
|---|---|
| The creation metadata for the resource. | 
credentials
Credentials for connection.
Returns
| Type | Description | 
|---|---|
| Credentials for connection. | 
endpoint
Alternate name for the target of the connection, which is used by some connection subclasses.
Returns
| Type | Description | 
|---|---|
| The target of the connection. | 
id
is_shared
Get the Boolean describing if this connection is shared amongst its cohort within a hub. Only applicable for connections created within a project.
Returns
| Type | Description | 
|---|---|
metadata
The connection's metadata dictionary. :return: This connection's metadata. :rtype: Optional[Dict[str, Any]]
open_ai_resource_id
tags
Deprecated. Use metadata instead. :return: This connection's metadata. :rtype: Optional[Dict[str, Any]]
target
type
Type of the connection, supported are 'git', 'python_feed' and 'container_registry'.
Returns
| Type | Description | 
|---|---|
| Type of the job. | 
url
Alternate name for the target of the connection, which is used by some connection subclasses.
Returns
| Type | Description | 
|---|---|
| The target of the connection. |