From 609cb573c5b0869ba9b819431cc78315c6e54f99 Mon Sep 17 00:00:00 2001 From: praneesha Date: Fri, 7 Jul 2023 15:38:00 +0530 Subject: [PATCH] Update the Azure hello world description --- .../azure-functions-hello-world.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/examples/azure-functions-hello-world/azure-functions-hello-world.md b/examples/azure-functions-hello-world/azure-functions-hello-world.md index a43ab7162c..8ce7bb1c0d 100644 --- a/examples/azure-functions-hello-world/azure-functions-hello-world.md +++ b/examples/azure-functions-hello-world/azure-functions-hello-world.md @@ -2,6 +2,12 @@ This example demonstrates how to write a simple echo function in Azure Functions. +In Ballerina, triggers are represented by listeners. When the `af:HttpListener` gets attached to the service, it implies that the function is an HTTP Trigger. The resource method behaves exactly the same as a service written from `ballerina/http`. It supports `http:Payload` and `http:Header` annotations for parameters. Input binding annotations can be used to annotate parameters to make use of external services in Azure. If no annotations are specified for a parameter, it is identified as a query parameter. + +Output bindings are defined in the return type definition. For services with the `HttpListener` attachment, `HttpOutput` is the default output binding. You can override the default behavior by specifying them explicitly in the return type. + +In the code sample shown above, it has an empty service path and resource path named `hello`. The accessor is `get`. It expects a request with a query parameter for the field name. The required artifact generation and data binding will be handled by the `ballerinax/azure_functions` package automatically. + For more information, see the [Azure deployment guide](https://ballerina.io/learn/run-in-the-cloud/function-as-a-service/azure-functions/). ## Set up the prerequisites @@ -18,8 +24,6 @@ Follow the steps below to write the function. 2. Replace the content of the generated Ballerina file with the content below. ->**Info:** In the code sample shown above, it has an empty service path and resource path named `hello`. The accessor is `get`. It expects a request with a query parameter for the field `name`. The required artifact generation and data binding will be handled by the `ballerinax/azure_functions` package automatically. - ::: code azure-functions-hello-world.bal ::: ## Build the function