使用格式'在手臂模板中
我想知道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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
格式
是一个内置函数在ARM模板中可用,该模板可根据输入值创建一个格式化的字符串。在您的情况下,它应该产生一个字符串,例如
myvmnamenetint
其中myvmname
是参数vnname
的值。您可以在此处了解有关此功能的更多信息: https://learn.microsoft.com/en-us/azure/azure-resource-manager/templates/template-functions-strunctions-string#format 。
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
wheremyvmname
is the value of the parametervnName
.You can learn more about this function here: https://learn.microsoft.com/en-us/azure/azure-resource-manager/templates/template-functions-string#format.