简体   繁体   English

在 ARM 模板中使用“格式”

[英]Use of 'format' in ARM templates

I want to know the meaning of 'format' in Azure ARM templates.我想知道 Azure ARM 模板中“格式”的含义。 For eg.例如。 "networkInterfaceName": "[format('{0}NetInt', parameters('vmName'))]", what does 'format' do here? "networkInterfaceName": "[format('{0}NetInt', parameters('vmName'))]", '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. format是内置的function可在 ARM 模板中使用,该模板根据输入值创建格式化的 string。

In your case, it should produce a string like myvmnameNetInt where myvmname is the value of the parameter vnName .在您的情况下,它应该生成一个 string ,例如myvmnameNetInt其中myvmname是参数vnName的值。

You can learn more about this function here: https://docs.microsoft.com/en-us/azure/azure-resource-manager/templates/template-functions-string#format .您可以在此处了解有关此 function 的更多信息: https://docs.microsoft.com/en-us/azure/azure-resource-manager/templates/template-functions-string#format

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM