Azure函数命名准则 [英] Azure Function Naming Guidelines

查看:116
本文介绍了Azure函数命名准则的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于.NET框架,《 MSDN设计指南》是用于命名项目(类,字段等)的有用资源.

For the .NET framework, the MSDN Design Guidelines was a useful resource for the naming of project items (classes, fields, etc).

但是对于Azure Functions,没有已发布"消息.准则(我知道).

But for Azure Functions, there is no "published" guidelines (that I'm aware of).

例如,某物"将msg写入Azure服务总线Q.收到此消息后触发的azure函数将创建一个msq,以发送到ASB主题.在主题订阅上触发了另一个天蓝色函数.我该如何命名 功能?

For example, "something" writes a msg to an Azure Service Bus Q. An azure function, triggered on receipt of this message creates a msq to be sent to an ASB Topic. Another azure function is triggered on a topic subscription. How should I name my functions?

在函数的命名中我应该使用现在(对于Q)还是过去(对于主题,因为它们代表事件)时态?他们是否应该在名称中包含队列/主题(基于触发器的来源)?有任何指导吗?任何人都花时间吗?

Should I use present (for Q) or past (for topic as these represent events) tense in the naming of the functions? Should they have Queue / Topic in the names (based on what is the source of the trigger)? Any guidance available? Anyone spent any time on this?

推荐答案

我们没有用于命名特定于Azure Functions的约定的最佳实践.

We don't have any best practices for naming conventions specific to Azure Functions. 

我们确实有一些有关命名Azure资源的常规指南

We do have some general guidance on naming Azure Resources

https://docs.microsoft.com/en-us/azure /architecture/best-practices/naming-conventions

就个人而言,我建议您坚持使用命名约定,以使函数识别更加容易.如果您将功能与服务总线一起使用,则可以执行类似SBFunction1或SBFunctionQueue

Personally, I would suggest you stick to a naming convention that makes identifying your functions easier. If you are using a Function with Service Bus you could do something like SBFunction1 or SBFunctionQueue

管理资源的另一种简便方法是将所有相关资源放在同一资源组中.

Another easy way to manage you resources is to put all related resources in the same resource group. 

因此,您可能会遇到类似资源组名称=服务总线查询"的信息

So you could have something like Resource Group name = Service Bus Queries 

然后,您可以简单地命名与您喜欢的任何内容相关联的资源,并查看资源组级别以对哪些资源相互关联进行排序.命名约定实际上取决于对您和公司最有效的命名方式.许多 公司已经制定了命名标准,因此,如果那样的话,我建议您也执行这些标准.

Then you could simply name the resources associated anything you like and look at the resource group level to sort what resources are associated with each other. The naming convention really just comes down to what works best for you and the company. Many companies have naming standards in place so if that is the case I would suggest you implement those as well. 


这篇关于Azure函数命名准则的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆