簡體   English   中英

使用 API 管理的 Azure Function App 文檔

[英]Azure Function App documentation using API Management

我創建了一個 Azure 函數應用程序。 函數應用程序連接到 SQL DB 並具有以下功能

  1. 返回一個表中的所有記錄
  2. 使用以下代碼根據列名返回記錄

public static async Task Run( [HttpTrigger(AuthorizationLevel.Function, "get", "post", Route = null)] HttpRequest req, ILogger log) { string Loan_id = req.Query["loanid"]; 字符串loan_amount = req.Query["loanamount"];

        if (string.IsNullOrEmpty(loan_id)) {
            //Do something when dont give loan id.
        } else if (string.IsNullOrEmpty(loan_amount)) { 
            //DO something when dont give loan amount.
        }

        return new OkObjectResult("This is a test.");
    }

我想使用 API 管理/Swagger 記錄函數應用程序。 你能告訴我這是如何實現的嗎?

提前致謝

您只需要從門戶創建一個 API 管理服務實例,並使用開放的 api 添加函數端點。

您可以按照此文檔進行操作。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM