简体   繁体   English

Mulesoft - 在正在运行的应用程序中检索 Cloudhub versionID

[英]Mulesoft - retrieve the Cloudhub versionID within a running application

When a Mulesoft application is deployed to Cloudhub, it gets assigned an ID that is available from the Cloudhub API .当 Mulesoft 应用程序部署到 Cloudhub 时,它会被分配一个ID ,该ID可从Cloudhub API 获得 In Cloudhub API v2, this value is named versionID .在 Cloudhub API v2 中,此值被命名为versionID

Can I retrieve this ID value within the app itself while it's running?我可以在应用程序运行时在应用程序本身内检索此 ID 值吗? I want to use it to refer to the application on a remote log.我想用它来引用远程日志上的应用程序。 Some values appear to be available as predefined variables , but I don't see this one.有些值似乎可以作为预定义变量使用,但我没有看到这个。

It might be the ${application.id} property.它可能是${application.id}属性。 Be aware that a property is not a variable.请注意,属性不是变量。 If so it is an undocumented property and may be removed or changed at any time.如果是这样,则它是无证财产,可能随时被删除或更改。 I recommend to avoid depending on such undocumented features.我建议避免依赖此类未记录的功能。

Another option is to call the CloudHub API directly from the running application, or to define your own property set an unique value.另一种选择是直接从正在运行的应用程序调用 CloudHub API,或者定义您自己的属性设置一个唯一值。

Note that in CloudHub application names are unique, so you could use just that.请注意,在 CloudHub 中,应用程序名称是唯一的,因此您可以仅使用它。

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

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