[英]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.