使用格式'在手臂模板中

发布于 2025-02-13 05:31:54 字数 120 浏览 0 评论 0原文

我想知道Azure Arm模板中“格式”的含义。例如。 “ networkInterfaceName”:“ [format('{0} netint',parameters('vmname'))]”, “格式”在这里有什么作用?

I want to know the meaning of 'format' in Azure ARM templates. For eg.
"networkInterfaceName": "[format('{0}NetInt', parameters('vmName'))]",
what does 'format' do here?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

天煞孤星 2025-02-20 05:31:54

“格式”在这里做什么?

格式是一个内置函数在ARM模板中可用,该模板可根据输入值创建一个格式化的字符串。

在您的情况下,它应该产生一个字符串,例如myvmnamenetint其中myvmname是参数vnname的值。

您可以在此处了解有关此功能的更多信息: https://learn.microsoft.com/en-us/azure/azure-resource-manager/templates/template-functions-strunctions-string#format

what does 'format' do here?

format is an in-built function available in ARM templates which creates a formatted string based on the input values.

In your case, it should produce a string like myvmnameNetInt where myvmname is the value of the parameter vnName.

You can learn more about this function here: https://learn.microsoft.com/en-us/azure/azure-resource-manager/templates/template-functions-string#format.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文