对于宇宙DB触发功能的框架代码是:
[CosmosDBTrigger(
databaseName: "databaseName",
collectionName: "collectionName",
ConnectionStringSetting = "string",
LeaseCollectionName = "leases")]
ConnectionStringSetting
仅限于这里为AppSetting。我想去关键金库抓住这个秘密。
该属性的言论表明,有使用CosmosDBOptions方式:
/// Optional. A string value indicating the app setting to use as the CosmosDB connection string, if different
/// than the one specified in the <see cref="CosmosDBOptions"/>.
但目前还不清楚如何使用Azure的功能范围内该类。
这可能吗?
现在的解决方案是在Azure中提供的功能
你可以把你所有的钥匙,秘密和证书到关键库,并通过KEYVALUE URL访问(与管理身份)。随着管理的身份,你并不需要存储KeyVault凭证在Azure的功能配置。
所述CosmosDBOptions
是指能够在host.json
级别设置的配置。
目前,它是无法从Azure的关键库设置连接字符串,但它是我们希望包括特征。