【问题标题】:Unable to parse parameter: promoteorqurantineFunctionName无法解析参数:promoteorqurantineFunctionName
【发布时间】:2022-10-15 16:21:09
【问题描述】:

我正在将 Azure 函数应用程序作为安全实施的一部分部署到其中,并且我收到了标题部分中提到的上述错误。这是我正在运行的 powershell 脚本

az 部署组创建
--name fss-promote-or-quarantine-plugin-deployment
--resource-group $RESOURCE_GROUP_NAME
--template-uri https://raw.githubusercontent.com/trendmicro/cloudone-filestorage 插件/master/post-scan-actions/azure-python-promote-or-quarantine/template.json
-p 提升或隔离功能名称=$FUNCTION_NAME
扫描StorageAccountResourceID=$BLOB_STORAGE_ACCOUNT_RESOURCE_ID
scanResultTopicResourceID=$SCAN_RESULT_TOPIC_RESOURCE_ID
提升StorageAccountConnectionString="$PROMOTE_STORAGE_ACCOUNT_CONNECTION_STRING"
提升模式=移动
隔离StorageAccountConnectionString="$QUARANTINE_STORAGE_ACCOUNT_CONNECTION_STRING"
隔离模式=移动

我收到的错误截图:

【问题讨论】:

  • 屏幕截图中的代码不是您在上面发布的代码吗?
  • 您好 Mathias,类似,我刚刚在屏幕截图中添加了订阅 ID 和其他必填字段。
  • 有很大的不同 - 在屏幕截图中,参数名称和参数之间有空格。尝试使用 --parameters promoteFunctionName=nameOfFunction 而不是 --parameters promoteFunctionName = nameOfFunction
  • 感谢 Mathias,它起作用了!!,也针对其他领域进行了编辑。

标签: azure powershell azure-functions cloud-security


【解决方案1】:

我尝试在参数名称和值之间留出空格,但它给出了相同的错误:

此 cmdlet 创建存储帐户,取自 GitHub ARM 文章。

正如@Mathias R. Jessen 所说,在 CLI Cmdlet 中传递的参数名称和参数之间不应有空格:

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2019-03-25
    • 2021-09-12
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-12-17
    • 2021-08-07
    相关资源
    最近更新 更多