From 5c41c98caa163ddef904fa4edea8f3efd5bcf5a2 Mon Sep 17 00:00:00 2001 From: praneesha Date: Fri, 7 Jul 2023 15:32:23 +0530 Subject: [PATCH 1/2] Address review comments --- .../aws-lambda-dynamodb-trigger.md | 2 -- .../aws-lambda-dynamodb-trigger.metatags | 2 +- .../aws-lambda-execution-context.bal | 1 - .../aws-lambda-execution-context.md | 2 -- .../aws-lambda-execution-context.metatags | 2 +- examples/aws-lambda-hello-world/aws-lambda-hello-world.bal | 4 ++-- examples/aws-lambda-hello-world/aws-lambda-hello-world.md | 2 -- examples/aws-lambda-hello-world/invoke_functions.out | 2 +- examples/aws-lambda-s3-trigger/aws-lambda-s3-trigger.bal | 2 +- examples/aws-lambda-s3-trigger/aws-lambda-s3-trigger.md | 2 -- .../aws-lambda-s3-trigger/aws-lambda-s3-trigger.metatags | 2 +- .../azure-functions-cosmosdb-trigger.bal | 4 ++-- .../azure-functions-cosmosdb-trigger.md | 2 -- .../azure-functions-cosmosdb-trigger.metatags | 2 +- .../azure-functions-hello-world.md | 4 +--- .../az_deploy.out | 2 -- .../azure-functions-http-trigger-with-queue.bal} | 2 +- .../azure-functions-http-trigger-with-queue.md} | 6 ++---- .../azure-functions-http-trigger-with-queue.metatags} | 2 +- .../bal_build.out | 0 .../azure-functions-http-trigger-with-queue/bal_new.out | 1 + .../execute_function.out | 2 +- examples/azure-functions-http-trigger/bal_new.out | 1 - .../azure-functions-timer-trigger.md | 2 -- .../azure-functions-timer-trigger.metatags | 2 +- examples/index.json | 4 ++-- 26 files changed, 20 insertions(+), 39 deletions(-) rename examples/{azure-functions-http-trigger => azure-functions-http-trigger-with-queue}/az_deploy.out (94%) rename examples/{azure-functions-http-trigger/azure-functions-http-trigger.bal => azure-functions-http-trigger-with-queue/azure-functions-http-trigger-with-queue.bal} (99%) rename examples/{azure-functions-http-trigger/azure-functions-http-trigger.md => azure-functions-http-trigger-with-queue/azure-functions-http-trigger-with-queue.md} (86%) rename examples/{azure-functions-http-trigger/azure-functions-http-trigger.metatags => azure-functions-http-trigger-with-queue/azure-functions-http-trigger-with-queue.metatags} (64%) rename examples/{azure-functions-http-trigger => azure-functions-http-trigger-with-queue}/bal_build.out (100%) create mode 100644 examples/azure-functions-http-trigger-with-queue/bal_new.out rename examples/{azure-functions-http-trigger => azure-functions-http-trigger-with-queue}/execute_function.out (86%) delete mode 100644 examples/azure-functions-http-trigger/bal_new.out diff --git a/examples/aws-lambda-dynamodb-trigger/aws-lambda-dynamodb-trigger.md b/examples/aws-lambda-dynamodb-trigger/aws-lambda-dynamodb-trigger.md index 34c423410f..a8d57fbdc9 100644 --- a/examples/aws-lambda-dynamodb-trigger/aws-lambda-dynamodb-trigger.md +++ b/examples/aws-lambda-dynamodb-trigger/aws-lambda-dynamodb-trigger.md @@ -30,8 +30,6 @@ Execute the command below to generate the AWS Lambda artifacts. Execute the AWS CLI command given by the compiler to create and publish the functions by replacing the respective AWS `$LAMBDA_ROLE_ARN`, `$REGION_ID`, and `$FUNCTION_NAME` values given in the command with your values. ->**Tip:** For instructions on getting the values, see [Set up an AWS account](https://ballerina.io/learn/run-in-the-cloud/function-as-a-service/aws-lambda/#set-up-an-aws-account). - ::: out aws_deploy.out ::: ## Invoke the function diff --git a/examples/aws-lambda-dynamodb-trigger/aws-lambda-dynamodb-trigger.metatags b/examples/aws-lambda-dynamodb-trigger/aws-lambda-dynamodb-trigger.metatags index 00806a5bdd..ad99d516d2 100644 --- a/examples/aws-lambda-dynamodb-trigger/aws-lambda-dynamodb-trigger.metatags +++ b/examples/aws-lambda-dynamodb-trigger/aws-lambda-dynamodb-trigger.metatags @@ -1,2 +1,2 @@ description: This example creates a function, which will be executed for each entry added to a database in the DynamoDB. -keywords: ballerina, ballerina by example, bbe, aws lambda, dynamodb, +keywords: ballerina, ballerina by example, aws lambda, dynamodb, serverless, cloud, function as a service diff --git a/examples/aws-lambda-execution-context/aws-lambda-execution-context.bal b/examples/aws-lambda-execution-context/aws-lambda-execution-context.bal index ffbe324623..36bb967d82 100644 --- a/examples/aws-lambda-execution-context/aws-lambda-execution-context.bal +++ b/examples/aws-lambda-execution-context/aws-lambda-execution-context.bal @@ -1,6 +1,5 @@ import ballerinax/awslambda; -// The `awslambda:Context` object contains request execution context information. @awslambda:Function public function ctxinfo(awslambda:Context ctx, json input) returns json|error { return { diff --git a/examples/aws-lambda-execution-context/aws-lambda-execution-context.md b/examples/aws-lambda-execution-context/aws-lambda-execution-context.md index 73422a59c6..24fbc442fa 100644 --- a/examples/aws-lambda-execution-context/aws-lambda-execution-context.md +++ b/examples/aws-lambda-execution-context/aws-lambda-execution-context.md @@ -30,8 +30,6 @@ Execute the command below to generate the AWS Lambda artifacts. Execute the AWS CLI command given by the compiler to create and publish the functions by replacing the respective AWS `$LAMBDA_ROLE_ARN`, `$REGION_ID`, and `$FUNCTION_NAME` values given in the command with your values. ->**Tip:** For instructions on getting the values, see [Set up an AWS account](https://ballerina.io/learn/run-in-the-cloud/function-as-a-service/aws-lambda/#set-up-an-aws-account). - ::: out aws_deploy.out ::: ## Invoke the function diff --git a/examples/aws-lambda-execution-context/aws-lambda-execution-context.metatags b/examples/aws-lambda-execution-context/aws-lambda-execution-context.metatags index d4fbe6944c..d75a357ce1 100644 --- a/examples/aws-lambda-execution-context/aws-lambda-execution-context.metatags +++ b/examples/aws-lambda-execution-context/aws-lambda-execution-context.metatags @@ -1,2 +1,2 @@ description: The example below demonstrates how the execution context information of an AWS function can be retrieved. -keywords: ballerina, ballerina by example, aws lambda, execution context +keywords: ballerina, ballerina by example, aws lambda, execution context, serverless, cloud, function as a service diff --git a/examples/aws-lambda-hello-world/aws-lambda-hello-world.bal b/examples/aws-lambda-hello-world/aws-lambda-hello-world.bal index 687e73a20c..252c7878f8 100644 --- a/examples/aws-lambda-hello-world/aws-lambda-hello-world.bal +++ b/examples/aws-lambda-hello-world/aws-lambda-hello-world.bal @@ -1,9 +1,9 @@ -import ballerina/log; +import ballerina/io; import ballerinax/awslambda; // The `@awslambda:Function` annotation marks a function to generate an AWS Lambda function. @awslambda:Function public function echo(awslambda:Context ctx, json input) returns json { - log:printInfo(input.toJsonString()); + io:println(input.toJsonString()); return input; } diff --git a/examples/aws-lambda-hello-world/aws-lambda-hello-world.md b/examples/aws-lambda-hello-world/aws-lambda-hello-world.md index e3e99b3aff..c20fd64db5 100644 --- a/examples/aws-lambda-hello-world/aws-lambda-hello-world.md +++ b/examples/aws-lambda-hello-world/aws-lambda-hello-world.md @@ -30,8 +30,6 @@ Execute the command below to generate the AWS Lambda artifacts. Execute the AWS CLI command given by the compiler to create and publish the functions by replacing the respective AWS `$LAMBDA_ROLE_ARN`, `$REGION_ID`, and `$FUNCTION_NAME` values given in the command with your values. ->**Tip:** For instructions on getting the values, see [Set up an AWS account](https://ballerina.io/learn/run-in-the-cloud/function-as-a-service/aws-lambda/#set-up-an-aws-account). - ::: out aws_deploy.out ::: ## Invoke the function diff --git a/examples/aws-lambda-hello-world/invoke_functions.out b/examples/aws-lambda-hello-world/invoke_functions.out index 59881e570c..c45754e688 100644 --- a/examples/aws-lambda-hello-world/invoke_functions.out +++ b/examples/aws-lambda-hello-world/invoke_functions.out @@ -5,4 +5,4 @@ $ aws lambda invoke --function-name echo --payload fileb://input.json echo-respo "StatusCode": 200 } $ cat echo-response.txt -{"MESSAGE":"HELLO"} \ No newline at end of file +{"MESSAGE":"HELLO"} diff --git a/examples/aws-lambda-s3-trigger/aws-lambda-s3-trigger.bal b/examples/aws-lambda-s3-trigger/aws-lambda-s3-trigger.bal index a4a11a117b..e6160d6e75 100644 --- a/examples/aws-lambda-s3-trigger/aws-lambda-s3-trigger.bal +++ b/examples/aws-lambda-s3-trigger/aws-lambda-s3-trigger.bal @@ -5,4 +5,4 @@ import ballerinax/awslambda; public function s3Trigger(awslambda:Context ctx, awslambda:S3Event event) { io:println(event.Records[0].s3.'object.key); -} \ No newline at end of file +} diff --git a/examples/aws-lambda-s3-trigger/aws-lambda-s3-trigger.md b/examples/aws-lambda-s3-trigger/aws-lambda-s3-trigger.md index 603d43c20f..abe3bfcd4a 100644 --- a/examples/aws-lambda-s3-trigger/aws-lambda-s3-trigger.md +++ b/examples/aws-lambda-s3-trigger/aws-lambda-s3-trigger.md @@ -30,8 +30,6 @@ Execute the command below to generate the AWS Lambda artifacts. Execute the AWS CLI command given by the compiler to create and publish the functions by replacing the respective AWS `$LAMBDA_ROLE_ARN`, `$REGION_ID`, and `$FUNCTION_NAME` values given in the command with your values. ->**Tip:** For instructions on getting the values, see [Set up an AWS account](https://ballerina.io/learn/run-in-the-cloud/function-as-a-service/aws-lambda/#set-up-an-aws-account). - ::: out aws_deploy.out ::: ## Invoke the function diff --git a/examples/aws-lambda-s3-trigger/aws-lambda-s3-trigger.metatags b/examples/aws-lambda-s3-trigger/aws-lambda-s3-trigger.metatags index f5625bdf8c..17fd5bcb3c 100644 --- a/examples/aws-lambda-s3-trigger/aws-lambda-s3-trigger.metatags +++ b/examples/aws-lambda-s3-trigger/aws-lambda-s3-trigger.metatags @@ -1,2 +1,2 @@ description: This example creates a function, which will be executed for each object creation in AWS S3. -keywords: ballerina, ballerina by example, bbe, aws lambda, s3, trigger +keywords: ballerina, ballerina by example, aws lambda, s3, trigger, serverless, cloud, function as a service diff --git a/examples/azure-functions-cosmosdb-trigger/azure-functions-cosmosdb-trigger.bal b/examples/azure-functions-cosmosdb-trigger/azure-functions-cosmosdb-trigger.bal index 00c391e514..30ffd4e072 100644 --- a/examples/azure-functions-cosmosdb-trigger/azure-functions-cosmosdb-trigger.bal +++ b/examples/azure-functions-cosmosdb-trigger/azure-functions-cosmosdb-trigger.bal @@ -1,4 +1,4 @@ -import ballerina/log; +import ballerina/io; import ballerinax/azure_functions as af; public type DBEntry record { @@ -12,7 +12,7 @@ listener af:CosmosDBListener cosmosEp = new (); service "cosmos" on cosmosEp { remote function onUpdate(DBEntry[] entries) returns @af:QueueOutput {queueName: "people"} string { string name = entries[0].name; - log:printInfo(entries.toJsonString()); + io:println(entries.toJsonString()); return "Hello, " + name; } } \ No newline at end of file diff --git a/examples/azure-functions-cosmosdb-trigger/azure-functions-cosmosdb-trigger.md b/examples/azure-functions-cosmosdb-trigger/azure-functions-cosmosdb-trigger.md index 7231806ec2..6c8a16a3f8 100644 --- a/examples/azure-functions-cosmosdb-trigger/azure-functions-cosmosdb-trigger.md +++ b/examples/azure-functions-cosmosdb-trigger/azure-functions-cosmosdb-trigger.md @@ -49,8 +49,6 @@ Execute the command below to generate the Azure Functions artifacts. Execute the Azure CLI command given by the compiler to create and publish the functions by replacing the sample app name given in the command with your respective Azure ``. ->**Tip:** For instructions on getting the values, see [Set up the prerequisites](https://ballerina.io/learn/run-in-the-cloud/function-as-a-service/azure-functions/#set-up-the-prerequisites). - ## Invoke the function Once the function is deployed, add an item to the collection. diff --git a/examples/azure-functions-cosmosdb-trigger/azure-functions-cosmosdb-trigger.metatags b/examples/azure-functions-cosmosdb-trigger/azure-functions-cosmosdb-trigger.metatags index 3258599bc3..8a9cb7e4cf 100644 --- a/examples/azure-functions-cosmosdb-trigger/azure-functions-cosmosdb-trigger.metatags +++ b/examples/azure-functions-cosmosdb-trigger/azure-functions-cosmosdb-trigger.metatags @@ -1,2 +1,2 @@ description: This example demonstrates using a Cosmos DB trigger to invoke an AWS Lambda function and a queue output binding to write an entry to a queue. -keywords: ballerina, ballerina by example, bbe, aws lambda, cosmos db, trigger +keywords: ballerina, ballerina by example, aws lambda, cosmos db, trigger, serverless, cloud, function as a service 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 cbb4f677f7..a43ab7162c 100644 --- a/examples/azure-functions-hello-world/azure-functions-hello-world.md +++ b/examples/azure-functions-hello-world/azure-functions-hello-world.md @@ -1,6 +1,6 @@ # Azure Functions - Hello world -This example demonstrates how to expose a simple echo function in Azure Functions. +This example demonstrates how to write a simple echo function in Azure Functions. For more information, see the [Azure deployment guide](https://ballerina.io/learn/run-in-the-cloud/function-as-a-service/azure-functions/). @@ -32,8 +32,6 @@ Execute the command below to generate the Azure Functions artifacts. Execute the Azure CLI command given by the compiler to create and publish the functions by replacing the sample app name given in the command with your respective Azure ``. ->**Tip:** For instructions on getting the values, see [Set up the prerequisites](https://ballerina.io/learn/run-in-the-cloud/function-as-a-service/azure-functions/#set-up-the-prerequisites). - ::: out az_deploy.out ::: ## Invoke the function diff --git a/examples/azure-functions-http-trigger/az_deploy.out b/examples/azure-functions-http-trigger-with-queue/az_deploy.out similarity index 94% rename from examples/azure-functions-http-trigger/az_deploy.out rename to examples/azure-functions-http-trigger-with-queue/az_deploy.out index 968f927b8e..cdd093ffbd 100644 --- a/examples/azure-functions-http-trigger/az_deploy.out +++ b/examples/azure-functions-http-trigger-with-queue/az_deploy.out @@ -8,5 +8,3 @@ Syncing triggers... Functions in bal-bbe: get-hello - [httpTrigger] Invoke url: https://bal-bbe.azurewebsites.net/hello - - timer - [timerTrigger] diff --git a/examples/azure-functions-http-trigger/azure-functions-http-trigger.bal b/examples/azure-functions-http-trigger-with-queue/azure-functions-http-trigger-with-queue.bal similarity index 99% rename from examples/azure-functions-http-trigger/azure-functions-http-trigger.bal rename to examples/azure-functions-http-trigger-with-queue/azure-functions-http-trigger-with-queue.bal index 9f5fda5ba3..2ad7b7ee2f 100644 --- a/examples/azure-functions-http-trigger/azure-functions-http-trigger.bal +++ b/examples/azure-functions-http-trigger-with-queue/azure-functions-http-trigger-with-queue.bal @@ -13,4 +13,4 @@ service / on new af:HttpListener() { }; return [httpRes, person.name + " is " + person.age.toString() + " years old."]; } -} \ No newline at end of file +} diff --git a/examples/azure-functions-http-trigger/azure-functions-http-trigger.md b/examples/azure-functions-http-trigger-with-queue/azure-functions-http-trigger-with-queue.md similarity index 86% rename from examples/azure-functions-http-trigger/azure-functions-http-trigger.md rename to examples/azure-functions-http-trigger-with-queue/azure-functions-http-trigger-with-queue.md index c9aef5f579..3184f6156d 100644 --- a/examples/azure-functions-http-trigger/azure-functions-http-trigger.md +++ b/examples/azure-functions-http-trigger-with-queue/azure-functions-http-trigger-with-queue.md @@ -1,4 +1,4 @@ -# Azure Functions- HTTP trigger +# Azure Functions- HTTP trigger with queue This example demonstrates using an HTTP trigger to invoke an Azure function with multiple output bindings to return the HTTP response and queue output binding to write an entry to a queue. @@ -21,7 +21,7 @@ Follow the steps below to write the function. 2. Replace the content of the generated Ballerina file with the content below. -::: code azure-functions-http-trigger.bal ::: +::: code azure-functions-http-trigger-with-queue.bal ::: ## Build the function @@ -33,8 +33,6 @@ Execute the command below to generate the Azure Functions artifacts. Execute the Azure CLI command given by the compiler to create and publish the functions by replacing the sample app name given in the command with your respective Azure ``. ->**Tip:** For instructions on getting the values, see [Set up the prerequisites](https://ballerina.io/learn/run-in-the-cloud/function-as-a-service/azure-functions/#set-up-the-prerequisites). - ## Invoke the function Execute the commands below to invoke the function. diff --git a/examples/azure-functions-http-trigger/azure-functions-http-trigger.metatags b/examples/azure-functions-http-trigger-with-queue/azure-functions-http-trigger-with-queue.metatags similarity index 64% rename from examples/azure-functions-http-trigger/azure-functions-http-trigger.metatags rename to examples/azure-functions-http-trigger-with-queue/azure-functions-http-trigger-with-queue.metatags index 0fd392ee22..bfb22ffc2f 100644 --- a/examples/azure-functions-http-trigger/azure-functions-http-trigger.metatags +++ b/examples/azure-functions-http-trigger-with-queue/azure-functions-http-trigger-with-queue.metatags @@ -1,2 +1,2 @@ description: This example demonstrates using an HTTP trigger to invoke an Azure function with multiple output bindings to return the HTTP response and queue output binding to write an entry to a queue. -keywords: ballerina, ballerina by example, bbe, aws lambda, http, trigger +keywords: ballerina, ballerina by example, aws lambda, http, trigger, serverless, cloud, function as a service diff --git a/examples/azure-functions-http-trigger/bal_build.out b/examples/azure-functions-http-trigger-with-queue/bal_build.out similarity index 100% rename from examples/azure-functions-http-trigger/bal_build.out rename to examples/azure-functions-http-trigger-with-queue/bal_build.out diff --git a/examples/azure-functions-http-trigger-with-queue/bal_new.out b/examples/azure-functions-http-trigger-with-queue/bal_new.out new file mode 100644 index 0000000000..3425a3298e --- /dev/null +++ b/examples/azure-functions-http-trigger-with-queue/bal_new.out @@ -0,0 +1 @@ +$ bal new azure-functions-http-trigger-with-queue diff --git a/examples/azure-functions-http-trigger/execute_function.out b/examples/azure-functions-http-trigger-with-queue/execute_function.out similarity index 86% rename from examples/azure-functions-http-trigger/execute_function.out rename to examples/azure-functions-http-trigger-with-queue/execute_function.out index ed4539d051..168340bfc7 100644 --- a/examples/azure-functions-http-trigger/execute_function.out +++ b/examples/azure-functions-http-trigger-with-queue/execute_function.out @@ -2,4 +2,4 @@ $ curl --header "Content-Type: application/json" \ --request POST \ --data '{"name":"Jack","age":21}' \ "https://.azurewebsites.net/queue" -Jack Added to the Queue! \ No newline at end of file +Jack Added to the Queue! diff --git a/examples/azure-functions-http-trigger/bal_new.out b/examples/azure-functions-http-trigger/bal_new.out deleted file mode 100644 index a58faf07b6..0000000000 --- a/examples/azure-functions-http-trigger/bal_new.out +++ /dev/null @@ -1 +0,0 @@ -$ bal new azure-functions-timer-trigger diff --git a/examples/azure-functions-timer-trigger/azure-functions-timer-trigger.md b/examples/azure-functions-timer-trigger/azure-functions-timer-trigger.md index 19809f36f4..adfaa79be2 100644 --- a/examples/azure-functions-timer-trigger/azure-functions-timer-trigger.md +++ b/examples/azure-functions-timer-trigger/azure-functions-timer-trigger.md @@ -30,8 +30,6 @@ Execute the command below to generate the Azure Functions artifacts. Execute the Azure CLI command given by the compiler to create and publish the functions by replacing the sample app name given in the command with your respective Azure ``. ->**Tip:** For instructions on getting the values, see [Set up the prerequisites](https://ballerina.io/learn/run-in-the-cloud/function-as-a-service/azure-functions/#set-up-the-prerequisites). - ## Invoke the function The `timer` function is triggered by the Azure Functions app from a timer. You can check the queue storage to see the output. diff --git a/examples/azure-functions-timer-trigger/azure-functions-timer-trigger.metatags b/examples/azure-functions-timer-trigger/azure-functions-timer-trigger.metatags index c10e03f87b..6646778ffd 100644 --- a/examples/azure-functions-timer-trigger/azure-functions-timer-trigger.metatags +++ b/examples/azure-functions-timer-trigger/azure-functions-timer-trigger.metatags @@ -1,2 +1,2 @@ description: This example demonstrates how a function can be scheduled to execute periodically by the Azure Functions app. -keywords: ballerina, ballerina by example, bbe, aws lambda, timer, trigger +keywords: ballerina, ballerina by example, aws lambda, timer, trigger, serverless, cloud, function as a service diff --git a/examples/index.json b/examples/index.json index 0149b0e29c..d9fef78ae0 100644 --- a/examples/index.json +++ b/examples/index.json @@ -4370,8 +4370,8 @@ "isLearnByExample": false }, { - "name": "HTTP trigger", - "url": "azure-functions-http-trigger", + "name": "HTTP trigger with queue", + "url": "azure-functions-http-trigger-with-queue", "verifyBuild": false, "verifyOutput": false, "disableVerificationReason": "Needs prerequisite condition", From 609cb573c5b0869ba9b819431cc78315c6e54f99 Mon Sep 17 00:00:00 2001 From: praneesha Date: Fri, 7 Jul 2023 15:38:00 +0530 Subject: [PATCH 2/2] 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