简体   繁体   English

如何使用 Python SDK 将身份设置为托管的 Azure 数据工厂?

[英]How to set identity to managed for Azure Data Factory using Python SDK?

From the docs I see that there's support for the .NET sdk in generating an Azure Data Factory with managed identity.文档中我看到在生成具有托管标识的 Azure 数据工厂时支持 .NET sdk。 However, I can't find anything out there for the Python SDK.但是,我在 Python SDK 那里找不到任何东西。 Here are a few of my attempts:以下是我的一些尝试:

factoryID = new FactoryIdentity()
    df_obj = {
        'location': self.location,
        'identity': factoryID
        }

    df_resource = Factory(df_obj)

Which returns syntax error:返回语法错误:

 factoryID = new FactoryIdentity()
                               ^
 SyntaxError: invalid syntax

And I also tried:我也试过:

        df_resource = Factory(location=self.location, Identity = new FactoryIdentity())

Which returned the same thing:它返回了同样的东西:

df_resource = Factory(location=self.location, Identity = new FactoryIdentity())
                                                                           ^
SyntaxError: invalid syntax

I've searched for hours in the docs and on SO Any suggestions?我在文档和 SO 上搜索了几个小时有什么建议吗?

Solved it.解决了。

df_resource = Factory(location=self.location, identity=FactoryIdentity() ) df_resource = Factory(location=self.location, identity=FactoryIdentity() )

Can't find anything about this online (for Python) so I'm sharing here.在网上(对于 Python)找不到任何关于此的信息,所以我在这里分享。

Works!作品!

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用带有 python 的托管标识创建 Azure 数据工厂链接服务 - creating Azure Data factory linked service using Managed identity with python 如何将“数据流/数据集”参数从 Python SDK 传递到 azure 数据工厂管道 - how to pass “Data Flow/Data Set” parameters to azure data factory pipeline from Python SDK 从 Azure 中的托管标识生成的访问令牌如何与 Python SDK 一起使用? - How is the access token generated from a managed identity in Azure used with the Python SDK? 使用Python的Azure数据工厂 - Azure Data Factory using Python 使用托管标识在 python 中使用 azure 函数应用程序 - Stuck with azure function app in python using managed identity 如何使用 Python 和托管标识/SAS 凭据从 VM 访问 Azure 存储帐户 - How to access Azure storage account from VM using Python and managed identity / SAS credentials Azure 数据工厂 HTTP 数据集使用 Python ZF20E3C5E54C0AB3D37AZ5D660B36 - Azure Data Factory HTTP Dataset using Python SDK , unable to find parameters Azure 数据工厂 Python SDK - 将 PipelineResource 转换为 JSON - Azure Data Factory Python SDK - Convert PipelineResource to JSON 如何在 Azure 数据工厂中集成 Python 代码 - How to integrate Python Code in Azure Data Factory 如何使用来自 Azure Cloud Function (python) 的用户管理身份向 Azure KeyVault 发出请求? - How to use User-Managed Identity from Azure Cloud Function (python) in making a request to Azure KeyVault?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM