Azure资源ID的最大长度是什么?

huangapple go评论52阅读模式
英文:

Maximum length of Azure Resource IDs?

问题

Azure资源ID的绝对最大长度是否独立于资源类型?

结构的某些部分是固定的(例如订阅ID),而像组和资源名称之类的部分有记录的限制。但RP命名空间和资源类型似乎会添加一些未知因素。

英文:

Is there an absolute maximum length of Azure Resource IDs, independent of the resource type?

Some parts of the structure are fixed (like subscription id) and others like group and resource name have documented limits. But RP namespace and resource types seem to add some unknown into the mix.

/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/{resource-provider-namespace}/{resource-type}/{resource-name}

答案1

得分: 1

Azure资源ID的最大字符限制没有官方文档明确规定。

请注意:这不是答案,而是尝试回答的内容。

资源的完全限定资源ID的格式如下文档中所述:

/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}

此外,此文档规定了最大允许的限制:

  • subscriptionId:36
  • resourceGroupName:90
  • 根据文档中的信息,resourceProviderNamespace的最长条目为45,但可以假定为64个字符。
  • resourceType:这些不能被猜测。虽然有命令来列出类型。假设大约为256个字符。
  • resourceName:在文档中快速查看后为512个字符。
字段 大约字符数
subscriptionId 36
resourceGroupName 90
resourceProviderNamespace 64
resourceType 256
resourceName 512
固定字符 44
总计 1002

警告:这是一个经过推测的答案。如果将来提供官方数据,您可以随时进行改进或引用。

英文:

There is no official documentation which specifies the max character limit for Azure Resource ID.

Note: So this is not the answer, but an attempt to answer.

Fully qualified resource IDs for the resources have format as mentioned in docs:

/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}

Also, this doc specifies the max allowed limits:

  • subscriptionId: 36
  • resourceGroupName: 90
  • longest entry for resourceProviderNamespace as per docs is: 45, but may be assume it to be 64 chars.
  • resourceType: These can't be guessed. Although there is command to list the types. And Assume it to be about 256 chars.
  • resourceName: 512 chars after a quick look at the docs.
fields Approx. chars
subscriptionId 36
resourceGroupName 90
resourceProviderNamespace 64
resourceType 256
resourceName 512
fixed chars 44
Total 1002

Warning: This is an educated guess. You're welcome to improve or quote the official figure, if available in future.

huangapple
  • 本文由 发表于 2023年2月13日 23:45:40
  • 转载请务必保留本文链接:https://go.coder-hub.com/75438141.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定