WorkspaceConnection 類別

注意

這是實驗性類別,可以隨時變更。 請參閱 https://aka.ms/azuremlexperimental 以取得詳細資訊。

Azure ML 工作區連線提供安全的方式來儲存連線及與外部資源互動所需的驗證和設定資訊。

繼承
azure.ai.ml.entities._resource.Resource
WorkspaceConnection

建構函式

WorkspaceConnection(*, target: str, type: str, credentials: PatTokenConfiguration | SasTokenConfiguration | UsernamePasswordConfiguration | ManagedIdentityConfiguration | ServicePrincipalConfiguration | AccessKeyConfiguration, metadata: Dict[str, Any] | None = None, **kwargs)

參數

name
str
必要

工作區連線的名稱。

target
str
必要

外部資源的 URL 或 ARM 資源識別碼。

credentials
Union[ PatTokenConfiguration, SasTokenConfiguration, UsernamePasswordConfiguration, <xref:azure.ai.ml.entities.ManagedIdentityConfiguration ~azure.ai.ml.entities.ServicePrincipalConfiguration>, AccessKeyConfiguration, ApiKeyConfiguration ]
必要

向外部資源進行驗證的認證。

type
<xref:<xref:The type> of <xref:workspace connection>, <xref:possible values are: "git">, <xref:"python_feed">, <xref:"container_registry">, <xref:"feature_store">, <xref:"s3">, <xref:"snowflake">, <xref:"azure_sql_db">, <xref:"azure_synapse_analytics">, <xref:"azure_my_sql_db">, <xref:"azure_postgres_db">, <xref:"azure_open_ai">, <xref:"cognitive_search">, <xref:"cognitive_service">>
必要

此連線的外部資源類別。

方法

dump

以 yaml 格式將工作區連線規格傾印到檔案中。

dump

以 yaml 格式將工作區連線規格傾印到檔案中。

dump(dest: str | PathLike | IO, **kwargs) -> None

參數

dest
Union[<xref:PathLike>, str, IO[AnyStr]]
必要

接收此工作區連線規格的目的地。必須是本機檔案的路徑,或是已開啟的檔案資料流程。 如果 dest 是檔案路徑,則會建立新的檔案,並在檔案存在時引發例外狀況。 如果 dest 是開啟的檔案,檔案將直接寫入,如果檔案無法寫入,則會引發例外狀況。

屬性

base_path

資源的基底路徑。

傳回

資源的基底路徑。

傳回類型

str

creation_context

資源的建立內容。

傳回

資源的建立中繼資料。

傳回類型

credentials

工作區連線的認證。

]

傳回

工作區連線的認證。

傳回類型

Union[ <xref:PatTokenCredentialsConfiguration>, <xref:SasTokenCredentialsConfiguration>, <xref:UsernamePasswordCredentialsConfiguration>, ManagedIdentityConfiguration, <xref:ServicePrincipalCredentialsConfiguration>, <xref:AccessKeyCredentialsConfiguration>,

id

資源識別碼。

傳回

資源的全域識別碼,Azure Resource Manager (ARM) 識別碼。

傳回類型

metadata

工作區連線的中繼資料。

傳回

工作區連線的中繼資料。

傳回類型

target

工作區連線的目標 URL。

傳回

工作區連線的目標。

傳回類型

str

type

支援的工作區連線類型為 'git'、'python_feed' 和 'container_registry'。

傳回

作業類型。

傳回類型

str