我有一个由事件中心触发的 Azure 函数。这是我的 index.js 文件的片段。
module.exports = async function (context, eventHubMessages) {
context.log(`JavaScript eventhub trigger function called for message array ${eventHubMessages}`);
context.log('Event Hub Trigger: ', JSON.stringify(eventHubMessages));
const product = context.bindingData.propertiesArray[0].productFilter;
eventHubMessages.forEach(message =>
{
deviceId = message.deviceId;
context.log('For each message:', JSON.stringify(eventHubMessages));
context.log('Device ID is', deviceId);
});
context.log('Output Device ID is', deviceId);
if ( product == 'prod1') {
context.bindings.outputprod1 = eventHubMessages;
} else if ( product == 'prod2') {
context.bindings.prod2 = eventHubMessages;
else {
context.log("Product not found - " + product);
} …Run Code Online (Sandbox Code Playgroud) 我有以下代码行:
from azure.storage.blob import BlobServiceClient
Run Code Online (Sandbox Code Playgroud)
我收到以下错误:
from azure.storage.blob import BlobServiceClient
ImportError: cannot import name 'BlobServiceClient' from 'azure.storage.blob' (/home/user-name/.local/lib/python3.7/site-packages/azure/storage/blob/__init__.py)
Run Code Online (Sandbox Code Playgroud)
我在 PythonAnywhere 和我的本地机器上都有这个错误。我正在关注这里的教程
我已经通读了 github 上的这篇文章,但无济于事。
有什么不见了?我试图实现的目标是当我有一个 URI 和一个共享密钥时访问容器中的 blob。
感谢任何帮助。
python azure azure-storage azure-storage-blobs azure-blob-storage
创建虚拟机时,可以选择为计算机创建托管标识,以对其他 Azure 资源(例如存储帐户)进行身份验证,如以下 Microsoft 文档中所述。
https://learn.microsoft.com/en-us/azure/active-directory/managed-identities-azure-resources/
我有一个运行 IIS FTP 服务的虚拟机。我想将 Windows 服务作为托管标识运行,以便它可以访问用于 ftp 根目录的存储帐户,但我找不到在“此帐户”区域下成功指定此托管标识原则的方法服务的登录选项卡。
假设系统分配的托管标识已打开,是否可以使用 VM 的托管标识在 Azure VM 中运行 Windows 服务?如果是这样,当以特定用户身份运行服务时,您是否像常规托管服务帐户一样格式化它,在末尾附加 $ 且不带密码?