API管理与服务流程 [英] API Management vs. Service Flow

查看:65
本文介绍了API管理与服务流程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个非常基本的设置:具有WebAPI无状态服务(Kestrel)的APIM + SF.只是尝试使此POC起作用.到目前为止没有成功...:(

I have a very basic setup: APIM + SF with WebAPI Stateless Service (Kestrel). Just trying to make this POC work. Unsuccessful so far... :(

按照可用的说明进行操作,直到我在APIM入站策略方面遇到问题... 我应该为后端ID使用什么? 除了"servicefabric"(来自示例)之外,我还尝试了"service fabric"实例元数据中的所有选项.它总是通过以下方式回到我身边: 找不到ID为'whatever-i-put-in-here'的后端."

Following the available instructions I got to the point, where I am having problems with the APIM inbound policies... What am I supposed to use for the backend-id? Besides the "servicefabric" one (from examples), I have tried probably all of the options from my "service fabric" instance metadata. It keeps coming back to me with: "Backend with id 'whatever-I-put-in-here' could not be found."

如果有人能阐明backend-id ="的确切含义,我将不胜感激!

I would really appreciate if someone could shed some light into what exactly is meant by backend-id=""!

谢谢, 彼得

推荐答案

后端ID必须引用通过API Management API(或部署模板)创建的后端资源",因为目前没有UI创建这些后端资源.在本文所指向的部署模板中,后端资源的定义在这里:

The backend-id has to reference a "backend resource" that has been created via the API Management API (or deployment template) as there currently is no UI to create these backend resources. In the deployment template pointed to by the article the definition of the backend resource is here:

https://github .com/Azure-Samples/service-fabric-api-management/blob/master/apim.json#L162

您可以使用此API调用列出服务的现有后端:

You can use this API call to list the existing backends for your service:

GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends?api-version=2017-03-01

https://docs.microsoft.com/en -us/rest/api/apimanagement/backend/listbyservice

这篇关于API管理与服务流程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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