![](/img/trans.png)
[英]How to set identity to managed for Azure Data Factory using Python SDK?
[英]creating Azure Data factory linked service using Managed identity with python
我正在使用 python 腳本來創建和管理數據工廠管道,當我想創建鏈接服務時,我只是使用以下代碼:
但現在我想使用托管標識而不是名稱和密鑰來創建鏈接服務,而且我找不到任何關於如何使用 python 進行操作的示例。
但我想用 python 來做。
謝謝!
service_endpoint str Azure Blob 存儲資源的必需 Blob 服務端點。 它與connectionString、sasUri 屬性互斥。
根據API 文檔,您應該使用service_endpoint
創建具有托管身份的鏈接服務。 您應該將 Blob 服務端點傳遞給service_endpoint
。
以下是我的測試代碼:
ls_name = 'storageLinkedService001'
endpoint_string = 'https://<account name>.blob.core.windows.net'
ls_azure_storage = LinkedServiceResource(properties=AzureBlobStorageLinkedService(service_endpoint=endpoint_string))
ls = adf_client.linked_services.create_or_update(rg_name, df_name, ls_name, ls_azure_storage)
結果:
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.